@import url('fonts.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: #fffdfa;
  color: #2b2b2b;
  overflow-x: hidden;
  direction: rtl;
}

/* ---------- Background scene ---------- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #fffdfa;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  will-change: transform;
}

.orb-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle at 30% 30%, #f0c78a, transparent 70%);
  animation: float-a 16s ease-in-out infinite;
}

.orb-2 {
  width: 460px;
  height: 460px;
  bottom: -140px;
  left: -120px;
  background: radial-gradient(circle at 60% 40%, #f3ddb8, transparent 70%);
  animation: float-b 20s ease-in-out infinite;
}

.orb-3 {
  width: 320px;
  height: 320px;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle at 50% 50%, #e9b978, transparent 70%);
  opacity: 0.3;
  animation: float-c 18s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -30px) scale(1.05); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -40px) scale(1.12); }
}

/* ---------- Tech icons background ---------- */
.tech-icon {
  position: absolute;
  fill: none;
  stroke: #a89a86;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.22;
  will-change: transform;
}

.ti-1 { width: 64px; top: 12%; right: 8%; animation: drift-a 22s ease-in-out infinite; }
.ti-2 { width: 40px; top: 65%; right: 16%; animation: drift-b 26s ease-in-out infinite; }
.ti-3 { width: 52px; top: 30%; right: 30%; animation: drift-c 19s ease-in-out infinite; }
.ti-4 { width: 46px; top: 78%; right: 40%; animation: drift-a 24s ease-in-out infinite; animation-delay: -6s; }
.ti-5 { width: 58px; top: 8%; left: 10%; animation: drift-b 21s ease-in-out infinite; }
.ti-6 { width: 44px; top: 50%; left: 6%; animation: drift-c 25s ease-in-out infinite; }
.ti-7 { width: 50px; top: 82%; left: 18%; animation: drift-a 20s ease-in-out infinite; animation-delay: -9s; }
.ti-8 { width: 36px; top: 22%; left: 32%; animation: drift-b 23s ease-in-out infinite; animation-delay: -4s; }

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-18px, 22px) rotate(6deg); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(20px, -16px) rotate(-5deg); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-14px, -20px) rotate(4deg); }
}

@media (max-width: 900px) {
  .tech-icon { display: none; }
}

/* ---------- Sidebar nav ---------- */
body {
  padding-right: 108px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 108px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #1c1b19;
}

.logo {
  width: 100%;
  height: 96px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141312;
  padding: 14px;
}

.logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.top-logo {
  position: fixed;
  top: 24px;
  left: 6vw;
  z-index: 25;
}

.top-logo img {
  height: 42px;
  width: auto;
  display: block;
}

@media (max-width: 720px) {
  .top-logo { top: 14px; left: 14px; }
  .top-logo img { height: 32px; }
}

.nav-links {
  list-style: none;
  width: 100%;
  padding: 10px 0;
  overflow-y: auto;
}

.nav-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 6px;
  color: #cfcac2;
  text-decoration: none;
  font-size: 0.72rem;
  text-align: center;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.nav-links a:hover {
  color: #c8933f;
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  padding: 10px 8px 18px;
}

.nav-cta a {
  padding: 14px 6px;
  border-radius: 10px;
  background: #c8933f;
  color: #1c1b19;
  font-weight: 700;
}

.nav-cta a svg {
  stroke: #1c1b19;
}

.nav-cta a:hover {
  background: #dba552;
  color: #1c1b19;
}

@media (max-width: 720px) {
  .nav-cta { margin-top: 0; padding: 0; }
  .nav-cta a { padding: 10px 4px; border-radius: 0; }
}

@media (max-width: 720px) {
  body { padding-right: 0; padding-bottom: 68px; }

  .site-header {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 68px;
    flex-direction: row;
  }

  .logo { display: none; }

  .nav-links {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  .nav-links a { padding: 10px 4px; font-size: 0.62rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 6vw 0;
  background: #f7ead9;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px) 1fr;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
}

.hero-name, .hero-role {
  opacity: 0;
  transform: translateY(22px);
  animation: reveal 0.9s ease forwards;
  animation-delay: 0.25s;
}

.hero-role { animation-delay: 0.15s; }

.hero-name h1, .hero-role h1 {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.3;
  color: #201f1c;
}

.hero-name { text-align: right; }
.hero-role { text-align: left; }

.hero h1 .grad {
  color: #c8933f;
}

.hero-photo {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(320px, 80%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #fffdfa;
  box-shadow: 0 20px 50px -20px rgba(200, 147, 63, 0.5), 0 0 0 10px #fffdfa, 0 0 0 12px rgba(200, 147, 63, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: reveal 1s ease forwards;
  animation-delay: 0.1s;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo .placeholder {
  font-size: 5rem;
  font-weight: 900;
  color: rgba(200, 147, 63, 0.35);
}

.hero-stats-row {
  position: relative;
  z-index: 3;
  will-change: transform;
  width: 100%;
  max-width: 900px;
  margin: 60px auto 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.stat-card {
  flex: 1 1 160px;
  max-width: 220px;
  width: 190px;
  background: #fff;
  border-radius: 14px;
  padding: 26px 18px;
  text-align: center;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #201f1c;
}

.stat-card.highlight .text {
  color: #fff;
}

.stat-card.highlight {
  background: #c8933f;
  color: #fff;
  z-index: 2;
  margin-bottom: 46px;
  box-shadow: 0 18px 40px -16px rgba(200, 147, 63, 0.55);
}

.stat-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.stat-card .num {
  font-size: 1.7rem;
  font-weight: 800;
  color: #c8933f;
}

.stat-card.highlight .num {
  color: #fff;
}

.stat-card .label {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #7a7a7a;
}

.stat-card.highlight .label {
  color: rgba(255, 255, 255, 0.9);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(200, 147, 63, 0.35);
  background: rgba(200, 147, 63, 0.08);
  font-size: 0.85rem;
  color: #8a662c;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.8s ease forwards;
  animation-delay: 0.1s;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fa370;
  box-shadow: 0 0 10px rgba(47, 163, 112, 0.6);
}

.hero p.subtitle {
  margin-top: 22px;
  max-width: 620px;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.9;
  color: #6b6b6b;
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.9s ease forwards;
  animation-delay: 0.4s;
}

.hero-actions {
  display: flex;
  gap: 18px;
  margin-top: 42px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.9s ease forwards;
  animation-delay: 0.55s;
}

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 15px 34px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: #c8933f;
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(200, 147, 63, 0.6);
}

.btn-primary:hover {
  background: #b8802e;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -8px rgba(200, 147, 63, 0.7);
}

.btn-ghost {
  background: #fff;
  color: #2b2b2b;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-ghost:hover {
  background: #f7f5f2;
  transform: translateY(-3px);
}

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

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-name, .hero-role { text-align: center; }
  .hero-photo { margin: 0 auto; max-width: 280px; }
}

@media (max-width: 720px) {
  .hero-stats-row { gap: 12px; }
  .stat-card { flex: 1 1 45%; }
  .stat-card.highlight { transform: translateY(0); }
  .stat-card.highlight.in-view { transform: translateY(0); }
}
