/* =========================================================
   Amin Hashempour — Portfolio
   Design tokens
========================================================= */
:root{
  --bg:            #0a0a0f;
  --bg-alt:        #0e0e16;
  --surface:       rgba(255,255,255,0.045);
  --surface-2:     rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text:          #f4f4f7;
  --text-dim:      #a7a7b8;
  --text-mute:     #6f6f82;
  --accent:        #7c5cff;
  --accent-2:      #22d3c9;
  --accent-grad:   linear-gradient(135deg,#7c5cff 0%,#22d3c9 100%);
  --danger:        #ff5c7a;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-glow: 0 0 60px -10px rgba(124,92,255,.35);
  --ease: cubic-bezier(.22,1,.36,1);
  --font-fa: 'Vazirmatn', sans-serif;
  --font-en: 'Outfit', sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-fa);
  line-height:1.7;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body[data-lang="en"]{ font-family:var(--font-en); }
body[data-lang="ku"]{ font-family:var(--font-fa); }

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; cursor:pointer; background:none; border:none; color:inherit; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3,p{ margin:0; }

.container{ max-width:1180px; margin:0 auto; padding:0 24px; }
.section{ position:relative; padding:120px 0; }
@media (max-width:768px){ .section{ padding:80px 0; } }

/* Skip link */
.skip-link{
  position:absolute; top:-60px; inset-inline-start:16px; z-index:2000;
  background:var(--accent); color:#fff; padding:10px 18px; border-radius:8px;
  transition:top .25s var(--ease);
}
.skip-link:focus{ top:16px; }

/* focus visibility */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible{
  outline:2px solid var(--accent-2);
  outline-offset:3px;
  border-radius:6px;
}

/* Background canvas + noise */
#bg-canvas{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  width:100%; height:100%;
}
.noise-overlay{
  position:fixed; inset:0; z-index:1; pointer-events:none; opacity:.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
header,main,footer,.mobile-menu,.mobile-menu-backdrop,.lightbox,.back-to-top{ position:relative; z-index:2; }

/* Section header */
.section-header{ text-align:center; max-width:640px; margin:0 auto 56px; }
.section-tag{
  display:inline-block; font-size:.8rem; letter-spacing:.08em; font-weight:600;
  color:var(--accent-2); background:var(--surface); border:1px solid var(--border);
  padding:6px 16px; border-radius:999px; margin-bottom:16px;
}
.section-title{ font-size:clamp(1.7rem,3.4vw,2.5rem); font-weight:800; }

/* =========================================================
   NAVBAR
========================================================= */
.navbar{
  position:fixed; top:0; inset-inline:0; z-index:1000;
  backdrop-filter:blur(16px) saturate(160%);
  background:rgba(10,10,15,.62);
  border-bottom:1px solid var(--border);
  transition:background .3s var(--ease);
}
.nav-accent-line{ height:2px; width:100%; background:var(--accent-grad); }
.nav-container{
  max-width:1280px; margin:0 auto; padding:14px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
}
.nav-logo{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
.logo-mark{ position:relative; width:42px; height:42px; display:grid; place-items:center; }
.logo-mark.small{ width:34px; height:34px; }
.logo-mark-inner{
  position:relative; z-index:2; font-family:var(--font-en); font-weight:800; font-size:.9rem;
  width:100%; height:100%; display:grid; place-items:center;
  background:var(--accent-grad); border-radius:12px; color:#0a0a0f;
}
.logo-mark-ring{
  position:absolute; inset:-4px; border-radius:16px; border:1px solid var(--border-strong);
  animation:spin 10s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.logo-text-wrap{ display:flex; flex-direction:column; line-height:1.25; }
.logo-name{ font-weight:700; font-size:.95rem; }
.logo-sub{ font-size:.7rem; color:var(--text-mute); }

.nav-links{ display:flex; align-items:center; gap:4px; position:relative; }
.nav-link{
  position:relative; display:flex; align-items:center; gap:6px;
  padding:9px 16px; border-radius:999px; font-size:.88rem; color:var(--text-dim);
  transition:color .25s var(--ease);
}
.nav-link-icon{ display:flex; opacity:.8; }
.nav-link-dot{
  position:absolute; bottom:2px; inset-inline-start:50%; transform:translateX(-50%) scale(0);
  width:4px; height:4px; border-radius:50%; background:var(--accent-2);
  transition:transform .25s var(--ease);
}
.nav-link:hover{ color:var(--text); }
.nav-link.active{ color:var(--text); }
.nav-link.active .nav-link-dot{ transform:translateX(-50%) scale(1); }
.nav-indicator{ display:none; } /* simplified: relying on per-link active state */

.nav-right{ display:flex; align-items:center; gap:14px; }
.lang-switcher{ display:flex; }
.lang-track{
  position:relative; display:flex; background:var(--surface); border:1px solid var(--border);
  border-radius:999px; padding:3px;
}
.lang-btn{
  position:relative; z-index:1; padding:6px 12px; font-size:.75rem; font-weight:700;
  color:var(--text-dim); border-radius:999px; transition:color .25s var(--ease);
  font-family:var(--font-en);
}
.lang-btn.active{ color:#0a0a0f; }
.lang-slider{
  position:absolute; top:3px; bottom:3px; inset-inline-start:3px; width:calc(33.333% - 2px);
  background:var(--accent-grad); border-radius:999px; transition:transform .3s var(--ease);
}
.lang-track[data-active="1"] .lang-slider{ transform:translateX(0); }

.nav-cta{
  display:flex; align-items:center; gap:6px; padding:9px 18px; border-radius:999px;
  background:var(--accent-grad); color:#0a0a0f; font-weight:700; font-size:.85rem;
  box-shadow:0 6px 20px -6px rgba(124,92,255,.55);
  transition:transform .25s var(--ease), box-shadow .25s var(--ease);
}
.nav-cta:hover{ transform:translateY(-2px); box-shadow:0 10px 26px -6px rgba(124,92,255,.7); }

.hamburger{ display:none; flex-direction:column; gap:5px; width:34px; height:34px; align-items:center; justify-content:center; }
.ham-line{ width:20px; height:2px; background:var(--text); border-radius:2px; transition:transform .3s var(--ease), opacity .3s var(--ease); }
.hamburger[aria-expanded="true"] .ham-top{ transform:translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .ham-mid{ opacity:0; }
.hamburger[aria-expanded="true"] .ham-bot{ transform:translateY(-7px) rotate(-45deg); }

@media (max-width:920px){
  .nav-links, .nav-cta{ display:none; }
  .hamburger{ display:flex; }
}

/* Mobile drawer */
.mobile-menu{
  position:fixed; top:0; inset-inline-end:0; height:100dvh; width:min(340px,86vw);
  background:var(--bg-alt); border-inline-start:1px solid var(--border);
  transform:translateX(105%); transition:transform .4s var(--ease);
  z-index:1100; display:flex; flex-direction:column; padding:24px 20px;
  overflow-y:auto;
}
html[dir="rtl"] .mobile-menu{ transform:translateX(-105%); }
.mobile-menu.open{ transform:translateX(0); }
.mobile-menu-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(2px);
  opacity:0; pointer-events:none; transition:opacity .3s var(--ease); z-index:1050;
}
.mobile-menu-backdrop.show{ opacity:1; pointer-events:auto; }
.mob-logo-row{ display:flex; align-items:center; gap:10px; }
.mob-name{ font-weight:700; }
.mob-divider{ height:1px; background:var(--border); margin:18px 0; }
.mob-nav{ display:flex; flex-direction:column; gap:4px; flex:1; }
.mob-link{
  display:flex; align-items:center; gap:12px; padding:13px 10px; border-radius:12px;
  color:var(--text-dim); font-size:.95rem; transition:background .2s var(--ease), color .2s var(--ease);
}
.mob-link:hover, .mob-link.active{ background:var(--surface); color:var(--text); }
.mob-icon{ display:flex; opacity:.85; }
.mob-arrow{ margin-inline-start:auto; opacity:.5; }
html[dir="rtl"] .mob-arrow{ transform:rotate(180deg); }
.mob-footer{ margin-top:auto; padding-top:20px; }
.mob-langs{ display:flex; gap:8px; margin-bottom:14px; }
.mob-langs .lang-btn{ background:var(--surface); border:1px solid var(--border); }
.mob-langs .lang-btn.active{ background:var(--accent-grad); color:#0a0a0f; border-color:transparent; }
.mob-tagline{ font-size:.78rem; color:var(--text-mute); }

/* =========================================================
   HERO
========================================================= */
.hero-section{
  min-height:100dvh; display:flex; flex-direction:column; justify-content:center;
  padding-top:120px;
}
.hero-layout{
  max-width:1180px; margin:0 auto; padding:0 24px;
  display:grid; grid-template-columns:1.15fr .85fr; gap:48px; align-items:center;
}
@media (max-width:960px){
  .hero-layout{ grid-template-columns:1fr; text-align:center; }
  .hero-visual{ order:-1; margin-bottom:20px; }
}
.hero-badge{
  display:inline-flex; align-items:center; gap:8px; padding:7px 16px;
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  font-size:.8rem; color:var(--text-dim); margin-bottom:22px;
}
.badge-dot{ width:7px; height:7px; border-radius:50%; background:#3ddc84; box-shadow:0 0 0 4px rgba(61,220,132,.18); animation:pulse 2s infinite; }
@keyframes pulse{ 50%{ opacity:.4; } }
.hero-title{ display:flex; flex-direction:column; gap:6px; margin-bottom:20px; }
.hero-greeting{ font-size:clamp(1.1rem,2vw,1.4rem); color:var(--text-dim); font-weight:500; }
.hero-name{
  font-size:clamp(2.4rem,6vw,4.4rem); font-weight:800; line-height:1.05;
  background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero-sub{ font-size:clamp(1.1rem,2vw,1.4rem); color:var(--text-dim); font-weight:500; }
.hero-desc{ max-width:520px; color:var(--text-dim); font-size:1.05rem; margin-bottom:32px; }
@media (max-width:960px){ .hero-desc{ margin-inline:auto; } }

.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:44px; }
@media (max-width:960px){ .hero-cta{ justify-content:center; } }
.btn{
  display:inline-flex; align-items:center; gap:8px; padding:14px 28px; border-radius:14px;
  font-weight:700; font-size:.95rem; transition:transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn-primary{ background:var(--accent-grad); color:#0a0a0f; box-shadow:0 10px 30px -8px rgba(124,92,255,.55); }
.btn-primary:hover{ transform:translateY(-3px); box-shadow:0 16px 34px -8px rgba(124,92,255,.7); }
.btn-outline{ border:1px solid var(--border-strong); color:var(--text); background:var(--surface); }
.btn-outline:hover{ background:var(--surface-2); transform:translateY(-3px); }

.hero-stats{ display:flex; gap:14px; flex-wrap:wrap; }
@media (max-width:960px){ .hero-stats{ justify-content:center; } }
.stat-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:16px 22px; min-width:120px; text-align:center;
}
.stat-num-wrap{ display:flex; justify-content:center; align-items:baseline; gap:2px; font-family:var(--font-en); }
.stat-num{ font-size:1.8rem; font-weight:800; color:var(--text); }
.stat-plus{ font-size:1.2rem; font-weight:800; color:var(--accent-2); }
.stat-label{ font-size:.78rem; color:var(--text-mute); }

/* Hero visual / 3D card */
.hero-visual{ position:relative; height:420px; display:grid; place-items:center; perspective:1000px; }
.orb{ position:absolute; border-radius:50%; filter:blur(50px); opacity:.55; }
.orb-1{ width:220px; height:220px; background:var(--accent); top:0; inset-inline-start:0; animation:float1 9s ease-in-out infinite; }
.orb-2{ width:180px; height:180px; background:var(--accent-2); bottom:10px; inset-inline-end:0; animation:float2 11s ease-in-out infinite; }
.orb-3{ width:130px; height:130px; background:#ff5c9c; top:40%; inset-inline-end:20%; opacity:.35; animation:float1 13s ease-in-out infinite reverse; }
@keyframes float1{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(20px,-24px); } }
@keyframes float2{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(-18px,20px); } }

.hero-card-3d{
  position:relative; width:280px; padding:2px; border-radius:var(--radius-lg);
  background:linear-gradient(160deg,rgba(255,255,255,.25),rgba(255,255,255,0) 40%);
  transform-style:preserve-3d; transition:transform .1s linear;
  box-shadow:var(--shadow-glow);
}
.card-inner{
  background:rgba(15,15,22,.85); backdrop-filter:blur(20px); border-radius:calc(var(--radius-lg) - 2px);
  padding:32px 24px; text-align:center; border:1px solid var(--border);
}
.card-avatar{
  width:96px; height:96px; margin:0 auto 16px; border-radius:50%; overflow:hidden;
  border:2px solid var(--border-strong); display:grid; place-items:center;
  background:var(--surface-2);
}
.card-avatar img{ width:100%; height:100%; object-fit:cover; }
.avatar-fallback{ display:none; width:100%; height:100%; align-items:center; justify-content:center; color:var(--text-mute); }
.card-name{ font-family:var(--font-en); font-weight:700; font-size:1.05rem; }
.card-role{ font-size:.8rem; color:var(--text-mute); margin-top:2px; }
.card-dots{ display:flex; justify-content:center; gap:6px; margin-top:18px; }
.card-dots span{ width:6px; height:6px; border-radius:50%; background:var(--border-strong); }
.card-dots span:first-child{ background:var(--accent-2); }

.scroll-down{ position:absolute; bottom:28px; inset-inline-start:50%; transform:translateX(-50%); }
.scroll-wheel{
  width:24px; height:38px; border:2px solid var(--border-strong); border-radius:14px; position:relative;
}
.scroll-wheel::before{
  content:''; position:absolute; top:6px; inset-inline-start:50%; width:3px; height:8px;
  background:var(--accent-2); border-radius:2px; transform:translateX(-50%);
  animation:scrolldown 1.6s infinite;
}
@keyframes scrolldown{ 0%{ opacity:1; top:6px; } 100%{ opacity:0; top:18px; } }

/* =========================================================
   ABOUT
========================================================= */
.about-grid{ display:grid; grid-template-columns:.8fr 1.2fr; gap:56px; align-items:center; }
@media (max-width:860px){ .about-grid{ grid-template-columns:1fr; } }
.about-visual{ position:relative; }
.about-img-wrap{
  position:relative; border-radius:var(--radius-lg); overflow:hidden; aspect-ratio:4/5;
  border:1px solid var(--border); background:var(--surface);
  display:grid; place-items:center;
}
.about-img-wrap img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.about-img-glow{ position:absolute; inset:-30%; background:var(--accent-grad); filter:blur(70px); opacity:.25; z-index:-1; }
.about-img-fallback{ color:var(--text-mute); }
.about-badges{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.about-badge{
  display:flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px;
  background:var(--surface); border:1px solid var(--border); font-size:.8rem; color:var(--accent-2);
}
.about-text{ color:var(--text-dim); font-size:1.02rem; margin-bottom:22px; }
.cert-strip{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:30px; }
.cert-chip{
  font-size:.78rem; padding:7px 14px; border-radius:999px; background:var(--surface);
  border:1px solid var(--border); color:var(--text-dim); font-family:var(--font-en);
}
.skills-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width:520px){ .skills-grid{ grid-template-columns:1fr; } }
.skill-header{ display:flex; justify-content:space-between; margin-bottom:8px; font-size:.88rem; }
.skill-pct{ color:var(--accent-2); font-family:var(--font-en); font-weight:700; }
.skill-bar{ height:8px; border-radius:999px; background:var(--surface); overflow:hidden; border:1px solid var(--border); }
.skill-fill{
  height:100%; width:0; border-radius:999px; background:var(--accent-grad);
  transition:width 1.4s var(--ease);
}
.skill-fill.animate{ width:var(--pct); }

/* =========================================================
   EXPERIENCE / TIMELINE
========================================================= */
.timeline{ position:relative; max-width:820px; margin:0 auto; padding-inline-start:32px; border-inline-start:2px solid var(--border); }
.timeline-item{ position:relative; padding-bottom:48px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-dot{
  position:absolute; inset-inline-start:-41px; top:4px; width:18px; height:18px; border-radius:50%;
  background:var(--bg); border:3px solid var(--accent); box-shadow:0 0 0 4px rgba(124,92,255,.15);
}
.timeline-content{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:26px 28px; transition:transform .3s var(--ease), border-color .3s var(--ease);
}
.timeline-content:hover{ transform:translateY(-3px); border-color:var(--border-strong); }
.tl-header{ display:flex; justify-content:space-between; gap:16px; margin-bottom:12px; flex-wrap:wrap; }
.tl-role{ font-size:1.1rem; font-weight:700; margin-bottom:4px; }
.tl-company{ font-size:.85rem; color:var(--accent-2); }
.tl-date{
  font-family:var(--font-en); font-size:.78rem; font-weight:700; color:var(--text-mute);
  background:var(--surface-2); border-radius:999px; padding:4px 12px; white-space:nowrap; height:fit-content;
}
.tl-desc{ color:var(--text-dim); font-size:.94rem; margin-bottom:14px; }
.tl-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.tl-tag{
  font-size:.74rem; padding:5px 12px; border-radius:999px; background:var(--surface-2);
  color:var(--text-dim); font-family:var(--font-en);
}

/* =========================================================
   CERTIFICATES
========================================================= */
.certs-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:24px; }
.cert-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  overflow:hidden; cursor:pointer; transition:transform .3s var(--ease), border-color .3s var(--ease);
}
.cert-card:hover{ transform:translateY(-6px); border-color:var(--border-strong); }
.cert-img-wrap{ position:relative; aspect-ratio:10/7; background:var(--surface-2); display:grid; place-items:center; }
.cert-img-wrap img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.cert-placeholder{ display:none; flex-direction:column; align-items:center; gap:8px; color:var(--text-mute); font-size:.8rem; z-index:1; }
.cert-overlay{
  position:absolute; inset:0; background:rgba(10,10,15,.72); opacity:0; display:flex; align-items:center;
  justify-content:center; gap:8px; color:#fff; font-weight:700; font-size:.9rem; transition:opacity .25s var(--ease);
}
.cert-card:hover .cert-overlay{ opacity:1; }
.cert-info{ padding:18px 20px; }
.cert-title{ font-size:.98rem; font-weight:700; margin-bottom:6px; line-height:1.4; }
.cert-org{ font-size:.82rem; color:var(--text-dim); margin-bottom:10px; }
.cert-year{
  font-family:var(--font-en); font-size:.74rem; font-weight:700; color:var(--accent-2);
  background:var(--surface-2); padding:3px 10px; border-radius:999px;
}

/* =========================================================
   CONTACT
========================================================= */
.contact-cards-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:18px; margin-bottom:36px; }
.contact-card{
  display:flex; align-items:center; gap:14px; padding:20px; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius-md); transition:border-color .3s var(--ease), transform .3s var(--ease);
}
.contact-card:hover{ border-color:var(--border-strong); transform:translateY(-3px); }
.cc-icon{
  width:44px; height:44px; border-radius:12px; display:grid; place-items:center; flex-shrink:0;
  background:var(--accent-grad); color:#0a0a0f;
}
.cc-label{ font-size:.76rem; color:var(--text-mute); margin-bottom:2px; }
.cc-value{ font-size:.92rem; font-weight:600; word-break:break-word; }
.social-links{ display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }
.social-btn{
  width:46px; height:46px; border-radius:14px; display:grid; place-items:center;
  background:var(--surface); border:1px solid var(--border); color:var(--text-dim);
  transition:transform .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.social-btn:hover{ transform:translateY(-4px); color:var(--accent-2); border-color:var(--accent-2); }

/* =========================================================
   FOOTER
========================================================= */
.footer{ border-top:1px solid var(--border); padding:48px 0 28px; }
.footer-inner{ max-width:1180px; margin:0 auto; padding:0 24px; }
.footer-top{ display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; }
.footer-brand{ display:flex; align-items:center; gap:12px; }
.logo-3d.small{
  width:34px; height:34px; border-radius:10px; display:grid; place-items:center;
  background:var(--accent-grad); color:#0a0a0f; font-family:var(--font-en); font-weight:800; font-size:.85rem;
}
.footer-name{ font-weight:700; }
.footer-tagline{ font-size:.78rem; color:var(--text-mute); }
.footer-nav{ display:flex; gap:20px; flex-wrap:wrap; }
.footer-nav a{ font-size:.85rem; color:var(--text-dim); transition:color .2s var(--ease); }
.footer-nav a:hover{ color:var(--accent-2); }
.footer-divider{ height:1px; background:var(--border); margin:28px 0 20px; }
.footer-bottom{ display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:.8rem; color:var(--text-mute); }

/* =========================================================
   LIGHTBOX
========================================================= */
.lightbox{ position:fixed; inset:0; z-index:1500; display:grid; place-items:center; opacity:0; pointer-events:none; transition:opacity .3s var(--ease); }
.lightbox.open{ opacity:1; pointer-events:auto; }
.lightbox-overlay{ position:absolute; inset:0; background:rgba(5,5,8,.88); backdrop-filter:blur(6px); }
.lightbox-box{
  position:relative; width:min(640px,92vw); background:var(--bg-alt); border:1px solid var(--border);
  border-radius:var(--radius-lg); overflow:hidden; transform:scale(.94); transition:transform .3s var(--ease);
}
.lightbox.open .lightbox-box{ transform:scale(1); }
.lb-img-wrap{ position:relative; aspect-ratio:10/7; background:var(--surface); display:grid; place-items:center; }
.lb-img-wrap img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#000; }
.lb-img-fallback{ display:none; color:var(--text-mute); z-index:1; }
.lb-info{ padding:20px 24px; display:flex; justify-content:space-between; gap:14px; align-items:center; }
.lb-info h3{ font-size:1rem; margin-bottom:4px; }
.lb-info p{ font-size:.82rem; color:var(--text-dim); }
.lb-right{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.lb-counter{ font-family:var(--font-en); font-size:.75rem; color:var(--text-mute); }
.lb-close{
  position:absolute; top:14px; inset-inline-end:14px; z-index:2; width:36px; height:36px;
  border-radius:50%; background:rgba(0,0,0,.5); color:#fff; display:grid; place-items:center;
}
.lb-nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2; width:40px; height:40px;
  border-radius:50%; background:rgba(0,0,0,.5); color:#fff; display:grid; place-items:center;
}
.lb-prev{ inset-inline-start:12px; }
.lb-next{ inset-inline-end:12px; }
html[dir="rtl"] .lb-prev svg, html[dir="rtl"] .lb-next svg{ transform:scaleX(-1); }

/* =========================================================
   BACK TO TOP
========================================================= */
.back-to-top{
  position:fixed; bottom:26px; inset-inline-end:26px; z-index:900; width:46px; height:46px;
  border-radius:50%; background:var(--accent-grad); color:#0a0a0f; display:grid; place-items:center;
  box-shadow:0 8px 24px -6px rgba(124,92,255,.6);
  opacity:0; pointer-events:none; transform:translateY(10px);
  transition:opacity .3s var(--ease), transform .3s var(--ease);
}
.back-to-top.show{ opacity:1; pointer-events:auto; transform:translateY(0); }

/* =========================================================
   SCROLL REVEAL
========================================================= */
[data-reveal]{ opacity:0; transform:translateY(24px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in-view{ opacity:1; transform:translateY(0); }

/* =========================================================
   RTL / LTR language handling
   Text content itself is swapped by JS (see js/main.js -> applyTranslations),
   reading from data-fa / data-en / data-ku on each element. No CSS hiding
   is used here so this works regardless of which attributes an element carries.
========================================================= */
html[dir="ltr"] body{ direction:ltr; }

/* =========================================================
   RESPONSIVE FINE-TUNING
========================================================= */
@media (max-width:480px){
  .container{ padding:0 18px; }
  .hero-stats{ gap:10px; }
  .stat-card{ min-width:100px; padding:12px 14px; }
  .timeline{ padding-inline-start:24px; }
  .timeline-dot{ inset-inline-start:-33px; width:14px; height:14px; }
  .certs-grid{ grid-template-columns:1fr; }
  .btn{ width:100%; justify-content:center; }
  .hero-cta{ width:100%; }
}

/* Glitch hover accent on hero name (subtle, respects reduced motion) */
.glitch-text{ position:relative; display:inline-block; }


.logo-mark-inner{
  display:grid;
  place-items:center;
}
.logo-mark-inner img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:12px;
}
.logo-fallback-text{
  display:none; /* فقط وقتی img لود نشد نمایش داده می‌شه */
}