/* ════════════════════════════════════════════════════════════
   style.css — Misagh Momeni Portfolio
   Fonts: JetBrains Mono (code/display) · Yekan Bakh (Persian)
   Theme: Glassmorphism · Void Dark · Violet × Cyan
════════════════════════════════════════════════════════════ */

/* ── YEKAN BAKH (Persian) ── */
@font-face {
  font-family: 'Yekan Bakh';
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ════════════════════════════
   CSS CUSTOM PROPERTIES
════════════════════════════ */
:root {
  --void:               #07070d;
  --glass-base:         #0f0f1a;
  --violet:             #7c3aed;
  --violet-glow:        #a855f7;
  --cyan:               #06b6d4;
  --cyan-glow:          #22d3ee;
  --white:              #f0f0ff;
  --muted:              #6b7280;
  --glass-bg:           rgba(255, 255, 255, 0.03);
  --glass-border:       rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(124, 58, 237, 0.5);
}

/* ════════════════════════════
   RESET & BASE
════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void);
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Persian content helper */
.fa-text {
  font-family: 'Yekan Bakh', sans-serif;
  direction: rtl;
}

/* ════════════════════════════
   BACKGROUND CANVAS
════════════════════════════ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ════════════════════════════
   NOISE OVERLAY
════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

/* ════════════════════════════
   AMBIENT GLOW ORBS
════════════════════════════ */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(124, 58, 237, 0.06);
  top: -100px;
  right: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.05);
  bottom: 20%;
  left: -100px;
}

/* ════════════════════════════
   MAIN WRAPPER
════════════════════════════ */
.wrap {
  position: relative;
  z-index: 2;
}

/* ════════════════════════════
   NAVIGATION
════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 7, 13, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(7, 7, 13, 0.9);
  border-bottom-color: rgba(124, 58, 237, 0.2);
}

.nav-logo {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

.nav-logo span {
  color: var(--violet-glow);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--violet-glow);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ════════════════════════════
   HERO SECTION
════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.hero-inner {
  max-width: 900px;
  width: 100%;
}

/* Status badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--violet-glow);
  margin-bottom: 2.5rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--violet-glow);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Name */
.hero-name {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-name .line1 {
  color: var(--white);
  display: block;
}

.hero-name .line2 {
  display: block;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Typed subtitle */
.hero-title {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* Skill chips */
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--white);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  cursor: default;
}

.chip:hover {
  border-color: var(--violet-glow);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.2);
}

.chip i {
  font-size: 0.8rem;
}

.go-text {
  font-size: 0.85rem;
  font-weight: 800;
  color: #00acd7;
}

/* CTA buttons */
.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  background: linear-gradient(135deg, var(--violet), #5b21b6);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
}

.btn-primary.btn-sm {
  font-size: 0.6rem;
  padding: 0.6rem 1.2rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-ghost:hover {
  border-color: var(--cyan-glow);
  color: var(--cyan-glow);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.15);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--violet), transparent);
  animation: scroll-anim 2s ease-in-out infinite;
}

/* ════════════════════════════
   SECTION BASE
════════════════════════════ */
section {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--violet-glow);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  max-width: 60px;
  background: linear-gradient(to right, var(--violet), transparent);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  line-height: 1.15;
}

/* Glow divider */
.glow-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--violet), var(--cyan), transparent);
  opacity: 0.2;
  margin: 0 2rem;
}

/* ════════════════════════════
   GLASS CARD
════════════════════════════ */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), transparent 60%);
  pointer-events: none;
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow:
    0 20px 60px rgba(124, 58, 237, 0.12),
    0 0 0 1px rgba(124, 58, 237, 0.1);
}

/* ════════════════════════════
   ABOUT SECTION
════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.about-main {
  grid-column: 1 / -1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--violet-glow), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ════════════════════════════
   TERMINAL COMPONENT
════════════════════════════ */
.terminal {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.td-red    { background: #ff5f57; }
.td-yellow { background: #ffbd2e; }
.td-green  { background: #28c840; }

.terminal-title {
  font-size: 0.6rem;
  color: var(--muted);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.25rem;
  font-size: 0.7rem;
  line-height: 2;
  color: rgba(240, 240, 255, 0.6);
}

.terminal-content {
  margin-top: 0.5rem;
  color: rgba(240, 240, 255, 0.75);
  line-height: 1.9;
}

.terminal-contact-list {
  color: rgba(240, 240, 255, 0.7);
  line-height: 2;
}

/* Terminal color helpers */
.t-green   { color: #34d399; }
.t-violet  { color: var(--violet-glow); }
.t-cyan    { color: var(--cyan-glow); }
.t-comment { color: rgba(240, 240, 255, 0.25); }
.t-insta   { color: #e1306c; }
.t-twitter { color: #1d9bf0; }

/* ════════════════════════════
   TECH STACK SECTION
════════════════════════════ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.75rem 1rem;
  text-align: center;
}

.tech-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  font-size: 1.5rem;
  transition: all 0.3s;
}

.tech-icon-wrap.go-icon {
  font-size: 1.1rem;
  font-weight: 900;
  color: #00acd7;
}

.tech-item:hover .tech-icon-wrap {
  border-color: var(--violet-glow);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  transform: scale(1.08);
}

.tech-name {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tech-level {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.tech-level-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
}

/* ════════════════════════════
   PROJECTS SECTION
════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  cursor: default;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--violet-glow);
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--white);
}

.project-desc {
  font-size: 0.7rem;
  line-height: 1.7;
  color: rgba(240, 240, 255, 0.55);
  margin-bottom: 1.25rem;
}

.project-langs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.lang-dot {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  color: var(--muted);
}

.lang-dot .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cyan-glow);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: gap 0.2s;
}

.project-link:hover {
  gap: 0.6rem;
}

/* GitHub CTA card */
.project-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 200px;
  border-style: dashed;
}

.project-cta-icon {
  font-size: 2.5rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.project-cta-text {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ════════════════════════════
   CONTACT SECTION
════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-main {
  grid-column: 1 / -1;
}

/* Social links */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.social-link:hover {
  border-color: var(--glass-border-hover);
  background: rgba(124, 58, 237, 0.07);
  transform: translateX(4px);
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1rem;
  flex-shrink: 0;
  color: #fff;
}

/* Social icon variants */
.si-github    { background: rgba(255, 255, 255, 0.06); color: #fff; }
.si-linkedin  { background: rgba(10, 102, 194, 0.15);  color: #0a66c2; }
.si-instagram { background: rgba(225, 48, 108, 0.1);   color: #e1306c; }
.si-x         { background: rgba(29, 155, 240, 0.1);   color: #fff; }
.si-telegram  { background: rgba(0, 136, 204, 0.1);    color: #0088cc; }

.social-info {
  flex: 1;
}

.social-platform {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.social-handle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white);
}

.social-arrow {
  color: var(--muted);
  font-size: 0.7rem;
  transition: all 0.25s;
}

.social-link:hover .social-arrow {
  color: var(--violet-glow);
  transform: translateX(3px);
}

/* ════════════════════════════
   FOOTER
════════════════════════════ */
footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--glass-border);
  padding: 2rem;
  text-align: center;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.footer-name {
  color: var(--violet-glow);
}

.footer-handle {
  color: var(--cyan-glow);
}

.footer-copy {
  margin-top: 0.5rem;
  opacity: 0.4;
}

/* ════════════════════════════
   SCROLL ANIMATIONS
════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════
   KEYFRAME ANIMATIONS
════════════════════════════ */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

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

@keyframes scroll-anim {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.7); }
}

/* ════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════ */
@media (max-width: 768px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 4rem 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-main {
    grid-column: 1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-main {
    grid-column: 1;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: clamp(2rem, 10vw, 3rem);
  }
}

@media (max-width: 480px) {
  .cta-row {
    flex-direction: column;
    align-items: center;
  }

  .skill-chips {
    gap: 0.4rem;
  }

  .chip {
    font-size: 0.6rem;
    padding: 0.35rem 0.7rem;
  }
}