/* ─── Fonts (self-hosted) ────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/firacode-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/firacode-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/vazirmatn-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vazirmatn-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/vazirmatn-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/vazirmatn-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/vazirmatn-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/estedad-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/estedad-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/estedad-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/estedad-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/estedad-700.woff2') format('woff2');
}

/* ─── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f14;
  --bg2:       #13161e;
  --bg3:       #1a1e2a;
  --border:    rgba(255,255,255,.07);
  --accent:    #6c63ff;
  --accent2:   #00d4aa;
  --text:      #e2e4ec;
  --muted:     #7a7f94;
  --heading:   #ffffff;
  --card-bg:   rgba(255,255,255,.04);
  --card-blur: blur(12px);
  --radius:    14px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
  --font-body: 'Inter', sans-serif;
}

/* ─── Light theme ───────────────────────────────────── */
[data-theme="light"] {
  --bg:        #f4f6fb;
  --bg2:       #eaecf5;
  --bg3:       #dde0ef;
  --border:    rgba(0,0,0,.09);
  --text:      #2d3048;
  --muted:     #6b7080;
  --heading:   #0e1020;
  --card-bg:   rgba(255,255,255,.72);
}

[data-theme="light"] body::before { opacity: .15; }
[data-theme="light"] .blob-1 { background: rgba(108,99,255,.08); }
[data-theme="light"] .blob-2 { background: rgba(0,212,170,.07); }
[data-theme="light"] .blob-3 { background: rgba(108,99,255,.05); }
[data-theme="light"] nav.scrolled { background: rgba(244,246,251,.88); }
[data-theme="light"] .skill-tag { background: rgba(0,0,0,.04); }
[data-theme="light"] .field input,
[data-theme="light"] .field textarea { background: rgba(255,255,255,.8); color: var(--text); }
[data-theme="light"] .field input::placeholder,
[data-theme="light"] .field textarea::placeholder { color: var(--muted); }
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg2); }

/* ─── Farsi font override ───────────────────────────── */
[lang="fa"] {
  --font-body: 'Estedad', 'Vazirmatn', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

::selection { background: var(--accent); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ─── Noise texture overlay ─────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4;
}

/* ─── Ambient blobs ─────────────────────────────────── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-1 { width: 520px; height: 520px; background: rgba(108,99,255,.12); top: -120px; left: -100px; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: rgba(0,212,170,.09); bottom: -80px; right: -60px; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: rgba(108,99,255,.07); top: 40%; left: 50%; animation-delay: -12s; }

@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.06); }
}

/* ─── Layout ────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

section { padding: 100px 0; scroll-margin-top: 80px; }
section + section { padding-top: 0; }

/* ─── Nav ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background var(--transition), backdrop-filter var(--transition);
}
nav.scrolled {
  background: rgba(13,15,20,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: .02em;
  direction: ltr;
}
.nav-logo span { color: var(--accent2); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--heading); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: #5a52e0 !important; transform: translateY(-1px); }

/* ─── Nav controls (theme + lang) ──────────────────── */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .78rem;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
  flex-shrink: 0;
}
.ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,99,255,.08);
}
.ctrl-btn svg { pointer-events: none; }

/* lang button wider for text label */
#lang-btn { width: auto; padding: 0 10px; gap: 4px; text-decoration: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ──────────────────────────────────────────── */
.hero {
  padding-top: 140px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(108,99,255,.12);
  border: 1px solid rgba(108,99,255,.3);
  color: var(--accent);
  font-family: 'Fira Code', monospace;
  font-size: .8rem;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
}
[lang="fa"] .hero-badge { font-family: var(--font-body); }
.hero-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent2);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.7); }
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
[lang="fa"] .hero h1 { letter-spacing: 0; line-height: 1.3; }
.hero h1 .accent { color: var(--accent); }
.hero-subtitle {
  font-family: 'Fira Code', monospace;
  font-size: 1.1rem;
  color: var(--accent2);
  margin-bottom: 20px;
}
[lang="fa"] .hero-subtitle { font-family: var(--font-body); }
.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5a52e0; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,.35); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* hero avatar card */
.hero-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,.08), transparent 60%);
  pointer-events: none;
}
.avatar-ring {
  width: 130px; height: 130px;
  margin: 0 auto 20px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  position: relative;
}
.avatar-ring img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  background: var(--bg3);
  filter: grayscale(1);
}
.avatar-initials {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.02em;
}
.status-dot {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 18px; height: 18px;
  background: var(--accent2);
  border-radius: 50%;
  border: 3px solid var(--bg);
  animation: pulse 2.5s ease infinite;
}
.hero-card h3 { font-size: 1.1rem; color: var(--heading); margin-bottom: 4px; }
.hero-card p  { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat-box {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
}
[data-theme="light"] .stat-box { background: rgba(0,0,0,.03); }
.stat-box .num { font-size: 1.4rem; font-weight: 700; color: var(--heading); display: block; }
.stat-box .lbl { font-size: .72rem; color: var(--muted); }

/* ─── Section Header ────────────────────────────────── */
.section-header { margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: .78rem;
  color: var(--accent2);
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.2);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
}
[lang="fa"] .section-tag { font-family: var(--font-body); }
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.25;
  letter-spacing: -.02em;
}
[lang="fa"] .section-title { letter-spacing: 0; }
.section-title span { color: var(--accent); }
.section-line {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin-top: 14px;
}

/* ─── Skills ─────────────────────────────────────────── */
#skills { background: linear-gradient(180deg, transparent, var(--bg2) 20%, var(--bg2) 80%, transparent); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.skill-category {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.skill-category:hover { border-color: rgba(108,99,255,.4); transform: translateY(-4px); }

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.skill-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.skill-cat-header h3 { font-size: 1rem; font-weight: 600; color: var(--heading); }

.skill-icon--purple { background: rgba(108,99,255,.12); border: 1px solid rgba(108,99,255,.25); }
.skill-icon--green  { background: rgba(0,212,170,.10);  border: 1px solid rgba(0,212,170,.25); }
.skill-icon--yellow { background: rgba(255,184,0,.10);  border: 1px solid rgba(255,184,0,.25); }
.skill-icon--red    { background: rgba(255,100,100,.10); border: 1px solid rgba(255,100,100,.25); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  font-family: 'Fira Code', monospace;
  font-size: .78rem;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all var(--transition);
}
[lang="fa"] .skill-tag { font-family: 'Fira Code', monospace; }
.skill-tag:hover { background: rgba(108,99,255,.15); border-color: var(--accent); color: var(--accent); }

/* ─── Experience ─────────────────────────────────────── */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 18px; top: 8px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    var(--accent) 0%, var(--accent) 95%,
    transparent 100%);
  border-radius: 2px;
}
[dir="rtl"] .timeline::before { left: auto; right: 18px; }

.timeline-dot--gold  { background: #d4a017; box-shadow: 0 0 0 3px rgba(212,160,23,.3); }
.timeline-dot--red   { background: #8b1a1a; box-shadow: 0 0 0 3px rgba(139,26,26,.3); }
.timeline-dot--blue  { background: #0f54b3; box-shadow: 0 0 0 3px rgba(15,84,179,.3); }
.timeline-dot--navy  { background: rgb(25,56,101); box-shadow: 0 0 0 3px rgba(25,56,101,.35); }

.timeline-item {
  position: relative;
  padding-left: 58px;
  padding-bottom: 48px;
}
[dir="rtl"] .timeline-item { padding-left: 0; padding-right: 58px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 8px; top: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(108,99,255,.3);
  transition: box-shadow var(--transition);
}
[dir="rtl"] .timeline-dot { left: auto; right: 8px; }
.timeline-item:hover .timeline-dot { box-shadow: 0 0 0 6px rgba(108,99,255,.2); }

.timeline-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
}
.timeline-item:hover .timeline-card { border-color: rgba(108,99,255,.35); transform: translateX(4px); }
[dir="rtl"] .timeline-item:hover .timeline-card { transform: translateX(-4px); }

.timeline-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.timeline-role { font-size: 1.05rem; font-weight: 700; color: var(--heading); }
.timeline-period {
  font-family: var(--font-body);
  font-size: .78rem;
  color: var(--accent2);
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.2);
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.card-logo {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 140px;
  height: 140px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right bottom;
  filter: grayscale(1) opacity(.13);
  pointer-events: none;
  transition: filter var(--transition);
}
.timeline-item:hover .card-logo { filter: grayscale(1) opacity(.22); }
[dir="rtl"] .card-logo { right: auto; left: 24px; }

.timeline-company {
  font-size: .9rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}
.timeline-company a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity var(--transition), gap var(--transition);
}
.timeline-company a::after {
  content: '↗';
  font-size: .75rem;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--transition), transform var(--transition);
}
.timeline-company a:hover { opacity: .75; gap: 7px; }
.timeline-company a:hover::after { opacity: 1; transform: translateY(0); }
.timeline-desc { font-size: .9rem; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.timeline-techs { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pill {
  font-family: 'Fira Code', monospace;
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 5px;
  background: rgba(108,99,255,.1);
  border: 1px solid rgba(108,99,255,.2);
  color: var(--accent);
}

/* ─── Certificates ───────────────────────────────────── */
#certificates { background: linear-gradient(180deg, transparent, var(--bg2) 20%, var(--bg2) 80%, transparent); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.cert-card {
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.cert-card:hover { border-color: rgba(0,212,170,.4); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.3); }
[data-theme="light"] .cert-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.cert-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(0,212,170,.1);
  border: 1px solid rgba(0,212,170,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.cert-card h4 { font-size: .95rem; font-weight: 600; color: var(--heading); }
.cert-card p  { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ─── Contact ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.contact-intro { font-size: 1.05rem; color: var(--muted); line-height: 1.75; max-width: 520px; margin: 0; }

.contact-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition);
}
.contact-item:hover {
  border-color: var(--accent);
  background: rgba(108,99,255,.07);
  transform: translateY(-3px);
}
.contact-item svg { pointer-events: none; }
.contact-item-text { display: none; }
.contact-item-icon { display: flex; align-items: center; justify-content: center; }

/* contact form */
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input,
.field textarea {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}
.field input:focus,
.field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 120px; }
.form-note { font-size: .8rem; color: var(--muted); margin-top: -4px; }

/* ─── Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy { font-size: .85rem; color: var(--muted); }
.footer-copy a { color: var(--accent); text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 20px; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

/* ─── Scroll reveal ──────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Back to top ───────────────────────────────────── */
#back-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--transition);
  z-index: 90;
}
[dir="rtl"] #back-top { right: auto; left: 28px; }
#back-top.show { opacity: 1; transform: translateY(0); }
#back-top:hover { background: #5a52e0; transform: translateY(-2px); }
#back-top svg { fill: #fff; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { padding-top: 110px; }
}
/* Tablet: keep hero text + card side by side, just narrower */
@media (max-width: 900px) and (min-width: 681px) {
  .hero-grid { grid-template-columns: 1fr 270px; gap: 28px; align-items: center; }
  .hero-card { padding: 24px 16px; }
  .hero-card h3 { font-size: 1rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-box { padding: 10px 6px; }
  .stat-box .num { font-size: 1.15rem; }
  .stat-box .lbl { font-size: .64rem; }
}
/* Mobile: hide the avatar card, stack & center the intro text */
@media (max-width: 680px) {
  section { padding: 70px 0; }
  .hero { padding-top: 96px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero h1 { margin-bottom: 10px; }
  .hero-desc { margin-bottom: 28px; }
  .hero-actions { justify-content: center; gap: 10px; }
  .hero-actions .btn { flex: 1; justify-content: center; padding: 12px 14px; font-size: .88rem; white-space: nowrap; }
  .hero-card { display: none; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    margin-top: 10px;
    background: rgba(13,15,20,.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0,0,0,.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events: none;
  }
  [data-theme="light"] .nav-links { background: rgba(244,246,251,.97); box-shadow: 0 20px 45px rgba(0,0,0,.12); }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 16px; border-radius: 10px; text-align: center; font-size: 1rem; transition: background var(--transition), color var(--transition); }
  .nav-links a::after { display: none; }
  .nav-links a:hover, .nav-links a:focus-visible { background: rgba(108,99,255,.1); color: var(--heading); }
  .nav-links .nav-cta { margin-top: 4px; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .cert-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-items { grid-template-columns: none; display: flex; flex-wrap: nowrap; gap: 8px; }
  .contact-item { flex: 1; min-width: 0; width: auto; height: auto; aspect-ratio: 1; }
}
@media (max-width: 380px) {
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 11px 8px; font-size: .78rem; gap: 5px; }
  .hero-stats { gap: 6px; }
  .stat-box { padding: 8px 2px; }
  .stat-box .num { font-size: .95rem; }
  .stat-box .lbl { font-size: .56rem; }
}
