﻿﻿/* ==== 4 PREMIUM THEMES ==== */
:root,
[data-theme="dark"] {
  --bg: #090d14;
  --bg2: #0e1420;
  --card: #131b2c;
  --cardh: #1a2440;
  --nav: rgba(9, 13, 20, .85);
  --text: #f0f4fa;
  --text2: #a8b4c9;
  --muted: #5d6b82;
  --acc: #6366f1;
  --acc2: #ec4899;
  --glow: rgba(99, 102, 241, .4);
  --bd: #1e2a42;
  --sh: 0 8px 32px rgba(0, 0, 0, .5);
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%)
}

[data-theme="light"] {
  --bg: #faf9f7;
  --bg2: #ffffff;
  --card: #ffffff;
  --cardh: #f5f2ed;
  --nav: rgba(250, 249, 247, .92);
  --text: #1a1614;
  --text2: #4a4540;
  --muted: #8a837a;
  --acc: #d97706;
  --acc2: #be123c;
  --glow: rgba(217, 119, 6, .25);
  --bd: #e8e2d8;
  --sh: 0 8px 32px rgba(26, 22, 20, .08);
  --grad: linear-gradient(135deg, #d97706 0%, #dc2626 100%)
}

[data-theme="midnight"] {
  --bg: #0a1628;
  --bg2: #0f1d33;
  --card: #152640;
  --cardh: #1c3252;
  --nav: rgba(10, 22, 40, .88);
  --text: #e8f0ff;
  --text2: #a0b4d4;
  --muted: #5f7192;
  --acc: #0ea5e9;
  --acc2: #06d6a0;
  --glow: rgba(14, 165, 233, .4);
  --bd: #1c3454;
  --sh: 0 8px 32px rgba(0, 0, 0, .5);
  --grad: linear-gradient(135deg, #0ea5e9 0%, #06d6a0 100%)
}

[data-theme="emerald"] {
  --bg: #081410;
  --bg2: #0c1c17;
  --card: #12291f;
  --cardh: #173528;
  --nav: rgba(8, 20, 16, .88);
  --text: #e8f5ee;
  --text2: #a7c9b5;
  --muted: #5f8474;
  --acc: #10b981;
  --acc2: #fbbf24;
  --glow: rgba(16, 185, 129, .4);
  --bd: #1a3d2e;
  --sh: 0 8px 32px rgba(0, 0, 0, .5);
  --grad: linear-gradient(135deg, #10b981 0%, #fbbf24 100%)
}

/* ==== BASE ==== */
html {
  scroll-behavior: smooth
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto
  }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important
  }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 12% 8%, color-mix(in srgb, var(--acc) 15%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 88% 92%, color-mix(in srgb, var(--acc2) 12%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  transition: background .4s, color .4s;
  overflow-x: hidden;
  min-height: 100vh;
  padding-top: 64px;
  line-height: 1.6
}

*,
*::before,
*::after {
  box-sizing: border-box
}

a {
  color: var(--acc);
  text-decoration: none;
  transition: color .2s
}

a:hover {
  color: white
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

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

.bg-gray-900,
.bg-gray-800,
.bg-gray-900\/50,
.bg-gray-900\/80,
.bg-gray-900\/95,
.bg-gray-800\/40,
.bg-gray-800\/50,
.bg-gray-800\/60 {
  background: var(--bg2) !important
}

.bg-gray-800.rounded-xl,
.bg-gray-800.card-st,
.bg-gray-800.rounded-2xl,
.bg-gray-800.rounded-lg {
  background: var(--card) !important
}

.text-gray-300 {
  color: var(--text2) !important
}

.text-gray-400,
.text-gray-500 {
  color: var(--muted) !important
}

.text-white {
  color: var(--text) !important
}

.border-gray-800,
.border-gray-700 {
  border-color: var(--bd) !important
}

/* ==== NAV ==== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bd)
}

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

.brand-logo {
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap
}

.nav-links {
  display: none;
  gap: 1.6rem;
  align-items: center
}

@media (min-width:960px) {
  .nav-links {
    display: flex
  }
}

.nav-links a {
  color: var(--text2);
  font-size: .86rem;
  font-weight: 500;
  position: relative;
  padding: .5rem 0;
  transition: color .2s
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--grad);
  transition: width .3s;
  border-radius: 2px
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--acc)
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0
}

/* ==== DROPDOWNS ==== */
.dd-wrap {
  position: relative
}

.dd-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--card);
  color: var(--text2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
  font-family: inherit
}

.dd-btn:hover {
  border-color: var(--acc);
  color: var(--text)
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--bd);
  transition: background .3s
}

.theme-dot[data-theme-dot="dark"] {
  background: #090d14
}

.theme-dot[data-theme-dot="light"] {
  background: #faf9f7
}

.theme-dot[data-theme-dot="midnight"] {
  background: linear-gradient(135deg, #0ea5e9, #06d6a0)
}

.theme-dot[data-theme-dot="emerald"] {
  background: linear-gradient(135deg, #10b981, #fbbf24)
}

.dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: .4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .22s cubic-bezier(.4, 0, .2, 1);
  z-index: 300
}

.dd-wrap.open .dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.dd-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .55rem .75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text2);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit
}

.dd-item:hover {
  background: var(--cardh);
  color: var(--text)
}

.dd-item.active {
  background: var(--cardh);
  color: var(--acc);
  font-weight: 600
}

.lang-current {
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  letter-spacing: .5px
}

/* ==== HAMBURGER ==== */
.menu-toggle {
  width: 36px;
  height: 36px;
  position: relative;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 8px;
  cursor: pointer;
  padding: 0
}

@media (min-width:960px) {
  .menu-toggle {
    display: none !important
  }
}

.menu-toggle span {
  position: absolute;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  left: 50%;
  top: 50%;
  transition: all .35s cubic-bezier(.68, -.55, .27, 1.55);
  pointer-events: none
}

.menu-toggle span:nth-child(1) {
  transform: translate(-50%, -7px)
}

.menu-toggle span:nth-child(2) {
  transform: translate(-50%, -1px)
}

.menu-toggle span:nth-child(3) {
  transform: translate(-50%, 5px)
}

.menu-toggle.open span:nth-child(1) {
  transform: translate(-50%, -1px) rotate(45deg);
  width: 20px
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -1px) scaleX(0)
}

.menu-toggle.open span:nth-child(3) {
  transform: translate(-50%, -1px) rotate(-45deg);
  width: 20px
}

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .4s ease, opacity .3s ease, padding .3s ease;
  z-index: 55
}

.mobile-menu.open {
  max-height: 600px;
  opacity: 1;
  padding: .75rem 1rem
}

.mobile-menu a {
  display: block;
  padding: .75rem 1rem;
  border-radius: 6px;
  color: var(--text2);
  font-size: .95rem;
  transition: background .2s, color .2s
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--cardh);
  color: var(--text)
}

/* ==== CARDS BASE ==== */
.card-st,
.service-card,
.pricing-card,
.team-card,
.contact-card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 14px;
  transition: transform .3s, box-shadow .3s, border-color .3s, background .3s
}

.btn-glow {
  background: var(--grad) !important;
  box-shadow: 0 0 20px var(--glow);
  transition: box-shadow .3s, transform .2s;
  color: #fff !important;
  display: inline-block;
  text-align: center
}

.btn-glow:hover {
  box-shadow: 0 0 35px var(--glow);
  transform: translateY(-2px);
  color: #fff !important
}

.btn-outline {
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--text);
  transition: all .2s;
  display: inline-block;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit
}

.btn-outline:hover {
  border-color: var(--acc);
  color: var(--acc)
}

/* ==== PORTFOLIO FILTER ==== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem
}

.filter-btn {
  padding: .55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--card);
  color: var(--text2);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit
}

.filter-btn:hover {
  border-color: var(--acc);
  color: var(--text)
}

.filter-btn.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 20px var(--glow)
}

.portfolio-card {
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform
}

.portfolio-card.hidden {
  display: none !important;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  position: absolute;
  visibility: hidden
}

/* ==== ACCORDION ==== */
.accordion-item {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  transition: all .3s;
  overflow: hidden;
  margin-bottom: .75rem
}

.accordion-item.open {
  border-color: var(--acc);
  box-shadow: 0 0 20px var(--glow)
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  user-select: none
}

.accordion-header:hover {
  color: var(--acc)
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.16, 1, .3, 1), padding .3s ease;
  padding: 0 1.5rem;
  color: var(--text2);
  line-height: 1.7
}

.accordion-item.open .accordion-body {
  max-height: 600px;
  padding: 0 1.5rem 1.25rem
}

.accordion-icon {
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
  color: var(--acc);
  font-size: 1rem;
  flex-shrink: 0;
  display: inline-block
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg)
}

/* ==== FORMS ==== */
.form-input,
input[type=text],
input[type=email],
input[type=password],
textarea {
  background: var(--card) !important;
  border: 1px solid var(--bd) !important;
  color: var(--text) !important;
  transition: border-color .2s, box-shadow .2s;
  border-radius: 8px;
  font-family: inherit;
  padding: .75rem 1rem;
  width: 100%
}

.form-input:focus,
input:focus,
textarea:focus {
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 3px var(--glow);
  outline: none
}

/* ==== FOOTER ==== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--bd);
  padding: 3rem 1.5rem 1.5rem
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr
}

@media (min-width:768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr
  }
}

.footer-brand p {
  margin-top: .75rem;
  font-size: .9rem;
  color: var(--muted)
}

.footer-col h4 {
  color: var(--text);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1rem;
  font-weight: 600
}

.footer-col a {
  display: block;
  padding: .3rem 0;
  font-size: .9rem;
  color: var(--muted);
  transition: color .2s
}

.footer-col a:hover {
  color: var(--acc)
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bd);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: var(--muted)
}

.footer-legal {
  display: flex;
  gap: 1.5rem
}

.footer-legal a {
  color: var(--muted);
  transition: color .2s
}

.footer-legal a:hover {
  color: var(--acc)
}

/* ==== TIMELINE ==== */
.timeline {
  position: relative;
  padding-left: 2rem
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bd)
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px var(--glow);
  border: 3px solid var(--bg)
}

/* ==== MAP + AVAILABILITY ==== */
.map-frame {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--sh);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1) .15s,
    transform .8s cubic-bezier(.16, 1, .3, 1) .15s;
  animation: contactForceVisible 0s linear 1s forwards
}

.map-frame.revealed,
section.revealed .map-frame {
  opacity: 1;
  transform: translateY(0)
}

.availability {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1) .3s,
    transform .8s cubic-bezier(.16, 1, .3, 1) .3s;
  animation: contactForceVisible 0s linear 1s forwards
}

.availability.revealed,
.card-st[data-reveal].revealed .availability,
section.revealed .availability {
  opacity: 1;
  transform: translateY(0)
}

.availability h4 {
  color: var(--acc);
  margin-bottom: .75rem;
  font-size: 1rem
}

.availability li {
  display: flex;
  justify-content: space-between;
  padding: .4rem 0;
  color: var(--text2);
  font-size: .9rem;
  list-style: none
}

.availability ul {
  list-style: none;
  padding: 0;
  margin: 0
}

/* ==== RTL ==== */
[dir="rtl"] body {
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif
}

[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0
}

[dir="rtl"] .dd-menu {
  right: auto;
  left: 0
}

[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 2rem
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 7px
}

[dir="rtl"] .timeline-item::before {
  left: auto;
  right: -25px
}

[dir="rtl"] [data-reveal="left"] {
  transform: translateX(40px)
}

[dir="rtl"] [data-reveal="right"] {
  transform: translateX(-40px)
}

[dir="rtl"] .footer-inner {
  direction: rtl;
  text-align: right
}

[dir="rtl"] .footer-col a,
[dir="rtl"] .footer-brand p,
[dir="rtl"] .footer-legal a {
  text-align: right
}

/* ==== UTILS ==== */
.section {
  padding: 4rem 1.5rem
}

.container {
  max-width: 1200px;
  margin: 0 auto
}

.text-center {
  text-align: center
}

.grid {
  display: grid;
  gap: 1.5rem
}

.grid-2,
.grid-3 {
  grid-template-columns: 1fr
}

@media (min-width:640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr)
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (min-width:960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr)
  }
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem)
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem)
}

h3 {
  font-size: 1.15rem
}

p {
  margin: 0 0 1rem
}

/* ==== CENTERING (LTR + RTL) ==== */
.text-center,
.text-center * {
  text-align: center !important
}

p[style*="auto"],
h1[style*="auto"],
h2[style*="auto"],
h3[style*="auto"] {
  text-align: center !important
}

.section>.container>h1,
.section>.container>h2 {
  text-align: center !important
}

.section>.container>h1+p,
.section>.container>h2+p {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important
}

/* ==== TERMINAL ==== */
.code-terminal {
  background: #0b1220;
  border: 1px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  box-shadow: var(--sh)
}

.terminal-bar {
  background: rgba(255, 255, 255, .03);
  border-bottom: 1px solid var(--bd);
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem
}

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

.terminal-dot.red { background: #ef4444 }
.terminal-dot.yellow { background: #eab308 }
.terminal-dot.green { background: #22c55e }

.terminal-title {
  margin-left: auto;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .05em
}

.terminal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  font-size: .85rem;
  line-height: 1.75;
  color: var(--text2);
  position: relative;
  transition: height .18s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
  direction: ltr;
  text-align: left
}

.terminal-line {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1.75em;
  text-align: left;
  direction: ltr
}

.terminal-keyword { color: #c084fc }
.terminal-string { color: #34d399 }
.terminal-number { color: #fbbf24 }
.terminal-fn { color: #60a5fa }
.terminal-comment { color: #64748b; font-style: italic }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--acc);
  animation: blink 1s steps(2) infinite;
  vertical-align: text-bottom;
  margin-left: 2px
}

@keyframes blink {
  50% { opacity: 0 }
}

/* ==== BIGGER SUBHEADINGS ==== */
.section .container>h1+p,
.section .container>h2+p {
  font-size: 1.15rem !important;
  line-height: 1.7 !important;
  color: var(--text2)
}

@media (min-width:640px) {
  .section .container>h1+p,
  .section .container>h2+p {
    font-size: 1.25rem !important
  }
}

.card-st>p,
.card-st>div>p,
.pricing-card>p,
.pricing-card>div>p {
  font-size: 1rem !important;
  line-height: 1.65 !important
}

/* ========== REVEAL ANIMATION ========== */
body {
  opacity: 1
}

body.loading .anim-item,
body.loading [data-reveal],
body.loading [data-stagger]>*,
body.loading .card-st,
body.loading .section>.container>h1,
body.loading .section>.container>h2,
body.loading .section>.container>h3,
body.loading .section>.container>p,
body.loading .section>.container>ul,
body.loading .section>.container>ol,
body.loading .section>.container>div:not(.container),
body.loading .footer-brand,
body.loading .footer-col,
body.loading .footer-bottom,
body.loading .filter-bar,
body.loading .accordion-item,
body.loading .timeline-item,
body.loading .portfolio-card {
  opacity: 0;
  transform: translateY(28px)
}

html.reveal-ready body.ready .anim-item:not(.revealed),
html.reveal-ready body.ready [data-reveal]:not(.revealed),
html.reveal-ready body.ready [data-stagger]:not(.revealed)>*,
html.reveal-ready body.ready .card-st:not(.revealed),
html.reveal-ready body.ready .section>.container>h1:not(.revealed),
html.reveal-ready body.ready .section>.container>h2:not(.revealed),
html.reveal-ready body.ready .section>.container>h3:not(.revealed),
html.reveal-ready body.ready .section>.container>p:not(.revealed),
html.reveal-ready body.ready .section>.container>ul:not(.revealed),
html.reveal-ready body.ready .section>.container>ol:not(.revealed),
html.reveal-ready body.ready .footer-brand:not(.revealed),
html.reveal-ready body.ready .footer-col:not(.revealed),
html.reveal-ready body.ready .footer-bottom:not(.revealed),
html.reveal-ready body.ready .filter-bar:not(.revealed),
html.reveal-ready body.ready .accordion-item:not(.revealed),
html.reveal-ready body.ready .timeline-item:not(.revealed),
html.reveal-ready body.ready .portfolio-card:not(.revealed) {
  opacity: 0;
  transform: translateY(28px)
}

body.ready .anim-item.revealed,
body.ready [data-reveal].revealed,
body.ready [data-stagger].revealed>*,
body.ready .card-st.revealed,
body.ready .section>.container>h1.revealed,
body.ready .section>.container>h2.revealed,
body.ready .section>.container>h3.revealed,
body.ready .section>.container>p.revealed,
body.ready .section>.container>ul.revealed,
body.ready .section>.container>ol.revealed,
body.ready .footer-brand.revealed,
body.ready .footer-col.revealed,
body.ready .footer-bottom.revealed,
body.ready .filter-bar.revealed,
body.ready .accordion-item.revealed,
body.ready .timeline-item.revealed,
body.ready .portfolio-card.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1)
}

body.ready [data-stagger].revealed>*:nth-child(1) { transition-delay: .05s }
body.ready [data-stagger].revealed>*:nth-child(2) { transition-delay: .10s }
body.ready [data-stagger].revealed>*:nth-child(3) { transition-delay: .15s }
body.ready [data-stagger].revealed>*:nth-child(4) { transition-delay: .20s }
body.ready [data-stagger].revealed>*:nth-child(5) { transition-delay: .25s }
body.ready [data-stagger].revealed>*:nth-child(6) { transition-delay: .30s }
body.ready [data-stagger].revealed>*:nth-child(7) { transition-delay: .35s }
body.ready [data-stagger].revealed>*:nth-child(8) { transition-delay: .40s }

body.ready .section:first-of-type>.container>h1 { transition-delay: .05s }
body.ready .section:first-of-type>.container>p { transition-delay: .20s }
body.ready .section:first-of-type>.container>div { transition-delay: .35s }

html.reveal-ready body.ready [data-reveal="left"]:not(.revealed) {
  transform: translateX(-30px)
}

html.reveal-ready body.ready [data-reveal="right"]:not(.revealed) {
  transform: translateX(30px)
}

body.ready [data-reveal="left"].revealed,
body.ready [data-reveal="right"].revealed {
  transform: translateX(0)
}

@media (prefers-reduced-motion: reduce) {
  body.loading *,
  html.reveal-ready body.ready [data-reveal]:not(.revealed),
  html.reveal-ready body.ready [data-stagger]:not(.revealed)>*,
  html.reveal-ready body.ready .card-st:not(.revealed),
  html.reveal-ready body.ready .section>.container>h1:not(.revealed),
  html.reveal-ready body.ready .section>.container>h2:not(.revealed),
  html.reveal-ready body.ready .section>.container>p:not(.revealed),
  html.reveal-ready body.ready .anim-item:not(.revealed) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important
  }
}

/* ========== FULLSCREEN MENU ========== */
.fs-menu {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s cubic-bezier(.4, 0, .2, 1), visibility .5s;
  overflow-y: auto
}

.fs-menu.open {
  opacity: 1;
  visibility: visible
}

.fs-menu-inner {
  max-width: 760px;
  margin: 0 auto;
  width: 100%
}

.fs-menu a {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .5s cubic-bezier(.16, 1, .3, 1),
    transform .5s cubic-bezier(.16, 1, .3, 1),
    color .25s ease;
  position: relative
}

[dir="rtl"] .fs-menu a {
  transform: translateX(-40px)
}

.fs-menu.open a {
  opacity: 1;
  transform: translateX(0)
}

.fs-menu.open a:nth-child(1) { transition-delay: .05s }
.fs-menu.open a:nth-child(2) { transition-delay: .12s }
.fs-menu.open a:nth-child(3) { transition-delay: .19s }
.fs-menu.open a:nth-child(4) { transition-delay: .26s }
.fs-menu.open a:nth-child(5) { transition-delay: .33s }
.fs-menu.open a:nth-child(6) { transition-delay: .40s }
.fs-menu.open a:nth-child(7) { transition-delay: .47s }

.fs-menu a .num {
  font-size: .85rem;
  font-weight: 500;
  color: var(--acc);
  letter-spacing: .05em;
  min-width: 2.5rem;
  font-family: 'JetBrains Mono', monospace
}

.fs-menu a .label {
  transition: background .3s;
  background: linear-gradient(90deg, var(--text) 0%, var(--text) 50%, var(--acc) 50%, var(--acc2) 100%);
  background-size: 200% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position .4s ease
}

.fs-menu a:hover .label,
.fs-menu a:focus .label {
  background-position: -100% 0
}

.fs-menu-footer {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  padding: 0 2rem;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
  color: var(--muted);
  opacity: 0;
  transition: opacity .4s ease .55s
}

.fs-menu.open .fs-menu-footer {
  opacity: 1
}

.fs-menu-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
  font-size: .85rem;
  font-weight: 400;
  padding: 0;
  gap: 0;
  opacity: 1;
  transform: none;
  display: inline
}

.fs-menu-footer a:hover {
  color: var(--acc)
}

body.fs-menu-open {
  overflow: hidden
}

/* ========== SKILL CARDS SAFETY ========== */
@keyframes cardForceVisible {
  to { opacity: 1; transform: translateY(0) }
}

[data-stagger]>.card-st {
  animation: cardForceVisible 0s linear 2s forwards
}

/* ========== CONTACT PAGE FIX ========== */
.grid[data-stagger]>.card-st,
.grid[data-stagger]>.contact-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1),
    transform .7s cubic-bezier(.16, 1, .3, 1),
    border-color .3s ease,
    box-shadow .3s ease
}

.grid[data-stagger].revealed>.card-st,
.grid[data-stagger].revealed>.contact-card {
  opacity: 1;
  transform: translateY(0)
}

.grid[data-stagger].revealed>.card-st:nth-child(1),
.grid[data-stagger].revealed>.contact-card:nth-child(1) { transition-delay: .1s }
.grid[data-stagger].revealed>.card-st:nth-child(2),
.grid[data-stagger].revealed>.contact-card:nth-child(2) { transition-delay: .22s }
.grid[data-stagger].revealed>.card-st:nth-child(3),
.grid[data-stagger].revealed>.contact-card:nth-child(3) { transition-delay: .34s }
.grid[data-stagger].revealed>.card-st:nth-child(4),
.grid[data-stagger].revealed>.contact-card:nth-child(4) { transition-delay: .46s }

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

.grid[data-stagger]>.card-st {
  animation: contactForceVisible 0s linear 1.2s forwards
}

.grid[data-stagger]>.contact-card {
  animation: contactForceVisible 0s linear 1.2s forwards
}

/* ========== TERMINAL OPEN ANIMATION ========== */
.terminal-reveal {
  opacity: 0;
  transform: translateY(20px) scaleY(0.8);
  transform-origin: top center;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.16, 1, .3, 1)
}

.terminal-reveal.revealed {
  opacity: 1;
  transform: translateY(0) scaleY(1)
}

/* ========== STATS GRID ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem !important;
  background: transparent !important;
  border: none !important;
  border-radius: 16px;
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto
}

.stat-card {
  background: var(--card);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: background .3s ease;
  border-radius: 16px !important
}

.stat-number {
  display: inline-block;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums
}

.stat-plus {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 700;
  vertical-align: top;
  margin-top: 4px;
  margin-left: 2px
}

.stat-label {
  margin-top: .75rem;
  margin-bottom: 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .05em
}

@media (max-width:768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr) }
  .stat-card { padding: 1.75rem 1rem }
  .stat-number { font-size: 2rem }
  .stat-plus { font-size: 1.2rem }
}

/* ========== PREMIUM CONTACT UI ========== */
.contact-split-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2)
}

.contact-info-panel {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  padding: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden
}

.contact-info-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, .4), transparent 50%);
  pointer-events: none
}

.contact-info-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem
}

.ci-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.ci-icon svg {
  width: 18px;
  height: 18px;
  color: #fff
}

.ci-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255, 255, 255, .6);
  margin: 0 0 .25rem
}

.ci-value {
  font-size: .95rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500
}

a.ci-value:hover {
  color: #a78bfa
}

.contact-form-panel {
  padding: 3rem;
  background: var(--card)
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem
}

.form-group {
  display: flex;
  flex-direction: column
}

.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: .5rem
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .9rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--glow)
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted)
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all .2s ease
}

.social-btn:hover {
  background: rgba(255, 255, 255, .2);
  transform: translateY(-2px)
}

@media (max-width:900px) {
  .contact-split-card { grid-template-columns: 1fr }
  .contact-info-panel,
  .contact-form-panel { padding: 2rem }
}

@media (max-width:600px) {
  .form-row { grid-template-columns: 1fr }
}

/* ========== CONTACT BTN PROGRESS & STATES ========== */
#submitBtn {
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease
}

#submitBtn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: #fff;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 0 8px 8px
}

#submitBtn.btn-loading {
  background: var(--cardh) !important;
  color: var(--text2) !important;
  box-shadow: none !important;
  cursor: wait
}

#submitBtn.btn-loading::after {
  width: 100%;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc)
}

#submitBtn.btn-success {
  background: #10b981 !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important
}

#submitBtn.btn-success::after {
  background: #047857;
  width: 100%
}

#submitBtn.btn-error {
  background: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4) !important
}

#submitBtn.btn-error::after {
  background: #b91c1c;
  width: 100%
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0 }
  70% { transform: scale(1.1) }
  100% { transform: scale(1); opacity: 1 }
}

.btn-icon-pop {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards
}

/* ========== FORM ERROR STATES ========== */
@keyframes shake {
  0%, 100% { transform: translateX(0) }
  25% { transform: translateX(-6px) }
  50% { transform: translateX(6px) }
  75% { transform: translateX(-6px) }
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both
}

.form-error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.4rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none
}

.form-group.has-error .form-error-msg {
  opacity: 1;
  transform: translateY(0)
}

/* ========== TESTIMONIAL MARQUEE ========== */
.testimonial-marquee {
  cursor: grab;
  user-select: none;
  position: relative;
  width: 100%;
  padding: 2rem 0;
  margin: -2rem 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%)
}

.testimonial-marquee::-webkit-scrollbar {
  display: none
}

.testimonial-marquee:active {
  cursor: grabbing
}

.testimonial-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: gMarquee 60s linear infinite;
  will-change: transform
}

.testimonial-marquee:hover .testimonial-track {
  animation-play-state: paused
}

@keyframes gMarquee {
  0% { transform: translateX(0) }
  100% { transform: translateX(-50%) }
}

[dir="rtl"] .testimonial-track {
  animation-direction: reverse
}

.testimonial-card p.quote {
  color: var(--text2);
  font-style: italic;
  line-height: 1.7;
  margin: 0 0 1rem
}

.testimonial-card .author {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--bd)
}

.testimonial-card .author strong {
  display: block;
  color: var(--text)
}

.testimonial-card .author span {
  color: var(--muted);
  font-size: .85rem
}

.testimonial-card .stars {
  color: var(--acc);
  margin-bottom: .5rem
}

/* ============================================================
   GLOBAL GLASS CARD STYLE (final effective)
   ============================================================ */
.card-st, .service-card, .pricing-card, .team-card, .contact-card,
.testimonial-card, .stat-card, .code-terminal {
  position: relative;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--acc) 6%, rgba(255, 255, 255, 0.05)) 0%,
    rgba(255, 255, 255, 0.01) 100%) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 10px 40px -10px rgba(0, 0, 0, 0.5) !important;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .3s, box-shadow .3s !important;
  overflow: hidden
}

/* Mouse-following spotlight (card-st / service / testimonial / stat) */
.card-st::before, .service-card::before, .pricing-card::before,
.testimonial-card::before, .stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  height: 1px;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--acc) 35%, transparent),
    transparent 50%
  );
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0
}

/* Top hairline for the terminal */
.code-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
  z-index: 1
}

.card-st:hover::before, .service-card:hover::before,
.testimonial-card:hover::before, .stat-card:hover::before {
  opacity: 1
}

/* Top edge highlight */
.card-st::after, .service-card::after, .testimonial-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
  pointer-events: none;
  z-index: 1
}

/* Hover — primary set */
.card-st:hover, .service-card:hover, .testimonial-card:hover, .stat-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 20px 50px -12px rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
  transition: all .3s !important
}

/* Hover — pricing + terminal */
.pricing-card:hover, .code-terminal:hover {
  transform: translateY(-4px) !important;
  border-color: color-mix(in srgb, var(--acc) 50%, var(--bd)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 15px 40px -12px rgba(0, 0, 0, 0.6) !important
}

/* Hover — team + contact */
.team-card:hover, .contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--acc);
  box-shadow: var(--sh), 0 0 30px var(--glow);
  background: var(--cardh)
}

.card-st > *, .service-card > *, .testimonial-card > *, .stat-card > * {
  position: relative;
  z-index: 2
}

/* Alternating section glow */
.section[style*="background: var(--bg2)"],
.section[style*="background:var(--bg2)"] {
  background:
    radial-gradient(ellipse 60% 50% at 10% 10%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 90%, color-mix(in srgb, var(--acc2) 12%, transparent), transparent 60%),
    var(--bg2) !important
}

/* ============================================================
   ALL-IN-ONE — GLASS HERO, SECTIONS, BUTTONS
   ============================================================ */
.g-glass {
  position: relative;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--acc) 6%, rgba(255, 255, 255, 0.05)) 0%,
    rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 10px 40px -10px rgba(0, 0, 0, 0.5);
  will-change: transform;
  transform: translateZ(0);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .3s, box-shadow .3s;
  overflow: hidden
}

.g-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--acc) 35%, transparent),
    transparent 50%
  );
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0
}

.g-glass:hover::before {
  opacity: 1
}

.g-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
  pointer-events: none;
  z-index: 1
}

[data-theme="light"] .g-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 10px 40px -10px rgba(0, 0, 0, 0.2)
}

[data-theme="light"] .g-glass::before {
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--acc) 35%, transparent), transparent 50%)
}

[data-theme="light"] .g-glass::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent)
}

.g-glass-hover:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 20px 50px -12px rgba(0, 0, 0, 0.6)
}

.g-glass > * {
  position: relative;
  z-index: 2
}

/* HERO */
.g-hero {
  position: relative;
  min-height: calc(100vh - 64px);
  overflow: hidden;
  isolation: isolate
}

.g-hero::before {
  content: '';
  position: absolute;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 90%;
  background: radial-gradient(ellipse 50% 60% at 50% 20%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 65%);
  pointer-events: none;
  z-index: -1
}

.g-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 64px)
}

@media (min-width:900px) {
  .g-hero-inner {
    grid-template-columns: 1.15fr 1fr;
    gap: 5rem
  }
}

.g-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .95rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 1.5rem;
  background: color-mix(in srgb, var(--card) 75%, transparent);
  border: 1px solid color-mix(in srgb, var(--bd) 60%, transparent)
}

.g-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981
}

.g-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
  margin: 0 0 1.5rem;
  color: var(--text)
}

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

.g-hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--text2);
  margin: 0 0 2rem;
  max-width: 52ch
}

.g-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem
}

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 1.75rem;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              background-color 0.25s ease
}

.g-btn-primary {
  background: var(--grad);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 4px 15px -4px color-mix(in srgb, var(--acc) 55%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .2)
}

.g-btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 25px -8px color-mix(in srgb, var(--acc) 75%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .4)
}

.g-btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 5px -2px color-mix(in srgb, var(--acc) 50%, transparent)
}

.g-btn-ghost {
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--bd) 80%, transparent);
  background: rgba(255, 255, 255, 0.02)
}

.g-btn-ghost:hover {
  border-color: var(--acc);
  color: var(--acc);
  background: color-mix(in srgb, var(--acc) 8%, transparent);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--acc) 30%, transparent)
}

.g-btn-ghost:active {
  transform: translateY(1px) scale(0.98)
}

.g-hero-card {
  border-radius: 20px;
  padding: 2rem
}

.g-card-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem
}

.g-stat { text-align: center }

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

.g-stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-top: .35rem;
  font-weight: 600
}

.g-card-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bd), transparent);
  margin: 1.25rem 0
}

.g-card-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 0;
  font-size: .9rem;
  color: var(--text2)
}

.g-card-row i {
  width: 18px;
  height: 18px;
  color: var(--acc);
  flex-shrink: 0
}

.g-card-row span {
  color: var(--text);
  font-weight: 500
}

/* ============================================================
   CURVED STACKING SECTIONS
   ============================================================ */
.g-section {
  position: relative;
  padding: 6rem 1.5rem;
  background: var(--bg);
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 48px 48px 0 0;
  z-index: 10
}

.g-hero + .g-section {
  position: relative;
  padding: 6rem 1.5rem;
  background: var(--bg);
  margin-top: 0;
  border-radius: 0
}

.g-section.g-alt {
  background:
    radial-gradient(ellipse 60% 50% at 10% 10%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 90%, color-mix(in srgb, var(--acc2) 12%, transparent), transparent 60%),
    var(--bg2);
  background-color: var(--bg2)
}

#services { z-index: 1 }
#skills { z-index: 2 }
#projects { z-index: 3 }
#testimonials { z-index: 4 }
.g-section.g-alt:last-of-type { z-index: 5 }

.g-section-inner {
  max-width: 1200px;
  margin: 0 auto
}

.g-head {
  text-align: center;
  margin-bottom: 3rem
}

.g-h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
  margin: 0 0 1rem;
  color: var(--text)
}

.g-sub {
  color: var(--text2);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.65
}

/* GRID SYSTEM */
.g-grid {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: 1fr
}

@media (min-width:640px) {
  .g-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
    align-items: start
  }
}

@media (min-width:900px) {
  .g-grid-3 {
    grid-template-columns: repeat(3, 1fr)
  }
}

/* FEATURE CARDS */
.g-feature {
  border-radius: 16px;
  padding: 1.75rem
}

.g-feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--acc) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent);
  margin-bottom: 1rem;
  color: var(--acc)
}

.g-feature-icon i {
  width: 20px;
  height: 20px
}

.g-feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  color: var(--text)
}

.g-feature p {
  color: var(--text2);
  line-height: 1.6;
  font-size: .92rem;
  margin: 0
}

/* SKILL CARDS */
.g-skill-card {
  border-radius: 14px;
  padding: 1.5rem
}

.g-skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem
}

.g-skill-name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text)
}

.g-skill-pct {
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent
}

.g-skill-bar {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bd) 80%, transparent);
  overflow: hidden
}

.g-skill-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(.16, 1, .3, 1);
  box-shadow: 0 0 12px color-mix(in srgb, var(--acc) 40%, transparent)
}

.g-skill-desc {
  color: var(--text2);
  font-size: .88rem;
  line-height: 1.55;
  margin: .75rem 0 0
}

/* SEE MORE COLLAPSE */
.skills-grid-target {
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 420px
}

.skills-grid-target.expanded {
  max-height: none
}

.skills-grid-target.collapsed > .g-skill-card:nth-child(n+5) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: -0.675rem;
  margin-bottom: -0.675rem;
  border: none;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1)
}

.skills-grid-target.expanded > .g-skill-card:nth-child(n+5) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  max-height: 400px;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  margin-top: 0;
  margin-bottom: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s
}

/* PROJECT CARDS */
.g-project {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit
}

.g-project-img {
  width: 100%;
  height: 220px;
  overflow: hidden
}

.g-project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1)
}

.g-project:hover .g-project-img img {
  transform: scale(1.04)
}

.g-project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1
}

.g-project-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .4rem;
  color: var(--text)
}

.g-project-body p {
  color: var(--text2);
  font-size: .9rem;
  line-height: 1.5;
  margin: 0
}

.g-project-arrow {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--acc);
  gap: .35rem
}

/* TESTIMONIAL CARDS */
.g-testi {
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 320px;
  max-width: 380px;
  flex-shrink: 0
}

.g-stars {
  color: var(--acc);
  font-size: .95rem;
  letter-spacing: .12em
}

.g-testi-quote {
  color: var(--text2);
  line-height: 1.65;
  font-style: italic;
  margin: 0;
  font-size: .93rem
}

.g-testi-author {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid color-mix(in srgb, var(--bd) 50%, transparent)
}

.g-testi-author strong {
  display: block;
  color: var(--text);
  font-size: .92rem
}

.g-testi-author span {
  color: var(--muted);
  font-size: .8rem
}

@media (max-width:640px) {
  .g-hero-inner { grid-template-columns: 1fr }
  .g-grid-2, .g-grid-3 { grid-template-columns: 1fr }
  .testimonial-track { animation: none }
}

/* CTA */
.g-cta {
  text-align: center;
  border-radius: 24px;
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden
}

.g-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--acc) 18%, transparent), transparent 60%);
  pointer-events: none
}

.g-cta > * {
  position: relative;
  z-index: 1
}

.g-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
  color: var(--text)
}

.g-cta p {
  color: var(--text2);
  margin: 0 auto 2rem;
  max-width: 520px;
  font-size: 1.02rem
}

[dir="rtl"] .g-hero h1 { letter-spacing: 0 }
[dir="rtl"] .g-h2, [dir="rtl"] .g-cta h2 { letter-spacing: 0 }
[dir="rtl"] .g-btn span[aria-hidden] { display: inline-block; transform: scaleX(-1) }

/* ==== CUSTOM SCROLLBAR ==== */
::-webkit-scrollbar {
  width: 10px
}

::-webkit-scrollbar-track {
  background: var(--bg)
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--bd) 80%, transparent);
  border-radius: 10px;
  border: 2px solid var(--bg)
}

::-webkit-scrollbar-thumb:hover {
  background: var(--acc)
}

/* ==== SCROLL TO TOP BUTTON ==== */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--card) 80%, transparent) 0%,
    color-mix(in srgb, var(--card) 50%, transparent) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2)
}

#scrollTopBtn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1)
}

#scrollTopBtn:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: color-mix(in srgb, var(--acc) 50%, transparent);
  box-shadow: 0 15px 35px -10px color-mix(in srgb, var(--acc) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: var(--acc)
}

#scrollTopBtn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease
}

#scrollTopBtn:hover svg {
  transform: translateY(-2px)
}

/* ========== 404 PAGE STYLES ========== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
  z-index: 0
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: 5%;
  left: -8%;
  animation: orbFloat1 14s ease-in-out infinite
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  bottom: -5%;
  right: -8%;
  animation: orbFloat2 16s ease-in-out infinite
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat3 18s ease-in-out infinite;
  opacity: .25
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1) }
  50% { transform: translate(40px, -30px) scale(1.15) }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1) }
  50% { transform: translate(-40px, 30px) scale(1.1) }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1) }
  50% { transform: translate(-50%, -50%) scale(1.25) }
}

.badge-warn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: rgba(234, 179, 8, .1);
  color: var(--text2);
  font-size: .85rem;
  font-weight: 500
}

.badge-warn svg { color: #fbbf24 }

.glass-404 {
  position: relative;
  padding: 2rem;
  border-radius: 18px;
  border: 1px solid var(--bd);
  background: color-mix(in srgb, var(--card) 65%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
  z-index: 2
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, .2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, .3)
}

.quick-link {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: color-mix(in srgb, var(--bg2) 60%, transparent);
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease
}

.ql-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.ql-title {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: .95rem
}

.ql-desc {
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4
}

.glow-behind {
  position: absolute;
  inset: -40px;
  border-radius: 30px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  filter: blur(60px);
  opacity: .18;
  z-index: 1;
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite
}

@keyframes glowPulse {
  0%, 100% { opacity: .15; transform: scale(1) }
  50% { opacity: .25; transform: scale(1.05) }
}

@media (max-width:768px) {
  .orb { filter: blur(60px) }
  .glass-404 { padding: 1.5rem }
  .glow-behind { inset: -20px; filter: blur(40px) }
}

/* Loader */
body.loading {
  overflow: hidden
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center
}

.loader-name-svg {
  display: block;
  overflow: visible;
  will-change: transform, opacity
}

.loader-name-svg .fill-text {
  font-family: 'Inter', 'Vazirmatn', sans-serif;
  font-weight: 700;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(4px);
  animation: fillIn 0.7s cubic-bezier(.4, 0, .2, 1) forwards;
  animation-delay: 0.9s
}

@keyframes fillIn {
  0% { opacity: 0; filter: blur(6px); transform: translateY(4px) }
  60% { opacity: 1; filter: blur(1px); transform: translateY(1px) }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) }
}

.loader-name-svg .stroke-path {
  font-family: 'Inter', 'Vazirmatn', sans-serif;
  font-weight: 700;
  fill: none;
  stroke: url(#loaderGrad);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 2000px);
  stroke-dashoffset: var(--len, 2000px);
  animation: drawPath 0.9s cubic-bezier(.4, 0, .2, 1) forwards
}

@keyframes drawPath {
  to { stroke-dashoffset: 0 }
}

.loader-name-svg .rtl-text {
  font-family: 'Vazirmatn', 'Inter', sans-serif;
  font-weight: 700;
  fill: url(#loaderGrad);
  text-anchor: middle;
  direction: rtl;
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  animation: wipeRTL 0.9s cubic-bezier(.4, 0, .2, 1) .15s forwards
}

@keyframes wipeRTL {
  0% { clip-path: inset(0 100% 0 0); opacity: 0 }
  30% { opacity: 1 }
  100% { clip-path: inset(0 -20% 0 -20%); opacity: 1 }
}

#loader.hidden {
  pointer-events: none;
  animation: overlayOut 0.4s ease 0.25s forwards
}

@keyframes overlayOut {
  to { opacity: 0 }
}

.loader-zoom {
  position: relative;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  contain: layout style paint
}

#loader.hidden .loader-zoom {
  animation: zoomPast 0.55s cubic-bezier(.6, 0, .25, 1) forwards
}

@keyframes zoomPast {
  0% { transform: scale(1); opacity: 1 }
  50% { transform: scale(1.8); opacity: 1 }
  100% { transform: scale(4); opacity: 0 }
}

.loader-zoom .loader-float {
  position: relative
}

body.loading > *:not(#loader) {
  opacity: 0
}

body.ready > *:not(#loader) {
  opacity: 1;
  transition: opacity .45s ease .55s
}