:root {
  --bg: #f8fafc;
  --dark: #0f172a;
  --muted: #64748b;
  --text: #111827;
  --card: #ffffff;
  --accent: #14b8a6;
  --accent-dark: #0f766e;
  --line: #e2e8f0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.navbar {
  max-width: 1180px;
  margin: auto;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--dark); }
.nav-links { display: flex; gap: 22px; color: #334155; font-weight: 600; }
.nav-links a:hover { color: var(--accent-dark); }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.8rem; cursor: pointer; }

.section {
  max-width: 1180px;
  margin: auto;
  padding: 86px 22px;
}

.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  align-items: center;
  gap: 46px;
}
.eyebrow, .section-label {
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  font-size: .78rem;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  margin: 12px 0;
  color: var(--dark);
}
.hero h2, .section h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.18;
  margin: 10px 0 20px;
  color: var(--dark);
}
.hero-text { max-width: 650px; font-size: 1.15rem; color: #475569; }
.hero-actions, .contact-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn, .contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  border: 1px solid var(--line);
  transition: .2s ease;
}
.btn.primary { background: var(--accent); color: #042f2e; border-color: var(--accent); }
.btn.secondary, .contact-links a { background: #fff; color: var(--dark); }
.btn:hover, .contact-links a:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .12); }

.profile-card {
  background: linear-gradient(145deg, #0f172a, #134e4a);
  color: #fff;
  padding: 34px;
  border-radius: 32px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
}
.avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #ccfbf1;
  margin-bottom: 24px;
  border: 4px solid rgba(255,255,255,.35);
  box-shadow: 0 14px 35px rgba(0,0,0,.25);
}
.profile-card h3 { font-size: 1.8rem; margin: 0; }
.profile-card p { color: #d1fae5; }
.profile-card span { color: #99f6e4; font-weight: 700; }

.two-column { display: grid; grid-template-columns: .85fr 1.3fr; gap: 52px; }
.text-box, .timeline { font-size: 1.05rem; color: #475569; }

.dark-section {
  max-width: none;
  background: var(--dark);
  color: #e5e7eb;
  padding-left: max(22px, calc((100% - 1180px) / 2));
  padding-right: max(22px, calc((100% - 1180px) / 2));
}
.dark-section h2 { color: #fff; max-width: 920px; }
.grid-3, .project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 34px;
}
.card, .project-card, .timeline-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}
.dark-section .card { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.card h3, .project-card h3, .timeline-item h3 { margin-top: 0; color: inherit; }
.project-card span { color: var(--accent-dark); font-weight: 800; font-size: .9rem; }
.timeline { display: grid; gap: 18px; }
.skills-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.skills-list span {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 10px 15px;
  color: #f8fafc;
  font-weight: 700;
}
.contact-section { text-align: center; }
.contact-section p { color: var(--muted); }
.contact-links { justify-content: center; }
footer { text-align: center; padding: 30px; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    flex-direction: column;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
  }
  .nav-links.open { display: flex; }
  .hero, .two-column, .grid-3, .project-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 60px; }
}


.persian-name {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  direction: rtl;
}


.visitor-box {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
}
.visitor-box small {
  display: block;
  color: #ccfbf1;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .72rem;
  margin-bottom: 4px;
}
.visitor-box strong {
  font-size: 1.75rem;
  color: #ffffff;
}


.visitor-counter {
  padding: 30px 20px;
  display: flex;
  justify-content: center;
}

.counter-card {
  min-width: 220px;
  padding: 22px 28px;
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  text-align: center;
}

.counter-card span {
  display: block;
  font-size: .95rem;
  opacity: .8;
  margin-bottom: 8px;
}

.counter-card strong {
  display: block;
  font-size: 2rem;
}
