:root,
[data-theme="light"] {
  --primary: #0b5ed7;
  --primary-dark: #0847a6;
  --accent: #14b8a6;
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --text: #182235;
  --muted: #64748b;
  --heading: #0f172a;
  --bg: #eef5ff;
  --card: #ffffff;
  --border: #d7e3f3;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-muted: rgba(248, 251, 255, 0.9);
  --surface-subtle: rgba(255, 255, 255, 0.76);
  --surface-border: rgba(215, 227, 243, 0.95);
  --primary-tint-08: rgba(11, 94, 215, 0.08);
  --primary-tint-10: rgba(11, 94, 215, 0.10);
  --primary-tint-12: rgba(11, 94, 215, 0.12);
  --primary-tint-18: rgba(11, 94, 215, 0.18);
  --primary-tint-24: rgba(11, 94, 215, 0.24);
  --accent-tint-06: rgba(20, 184, 166, 0.06);
  --accent-tint-08: rgba(20, 184, 166, 0.08);
  --accent-tint-12: rgba(20, 184, 166, 0.12);
  --accent-tint-14: rgba(20, 184, 166, 0.14);
  --accent-tint-16: rgba(20, 184, 166, 0.16);
  --grid-line: rgba(11, 94, 215, 0.06);
  --glow-teal: rgba(20, 184, 166, 0.20);
  --glow-blue: rgba(11, 94, 215, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "IRANSansWebFaNum", Tahoma, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.20), transparent 34rem),
    radial-gradient(circle at 90% 6%, rgba(11, 94, 215, 0.22), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 48%, #f8fafc 100%);
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  background-image:
    linear-gradient(rgba(11, 94, 215, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 94, 215, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 74%);
}
body::after {
  background:
    radial-gradient(circle at 18% 72%, rgba(20,184,166,.16), transparent 18rem),
    radial-gradient(circle at 78% 60%, rgba(11,94,215,.12), transparent 22rem);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.76); opacity: .7; }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px clamp(16px, 4vw, 32px);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(238, 245, 255, 0.88));
  border-bottom: 1px solid rgba(215, 227, 243, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, 100%);
  margin: 0 auto;
}
.site-header__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  min-width: 0;
}
.site-header__brand-en {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header__brand-fa {
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.site-header__nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.site-header__nav a:hover,
.site-header__nav a:focus-visible {
  border-color: rgba(11, 94, 215, 0.24);
  background: linear-gradient(90deg, rgba(11, 94, 215, 0.08), rgba(20, 184, 166, 0.1));
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.site-header__nav a.site-header__cta {
  border-color: rgba(11, 94, 215, 0.28);
  background: linear-gradient(90deg, rgba(11, 94, 215, 0.14), rgba(20, 184, 166, 0.16));
  color: var(--primary-dark);
}
.site-header__nav a.site-header__cta:hover,
.site-header__nav a.site-header__cta:focus-visible {
  border-color: rgba(11, 94, 215, 0.42);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .site-header__brand {
    align-items: center;
    text-align: center;
  }
  .site-header__nav {
    justify-content: center;
  }
  .site-header__nav a {
    flex: 1 1 auto;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.8rem;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(11, 94, 215, 0.24);
  background: linear-gradient(90deg, rgba(11, 94, 215, 0.10), rgba(20, 184, 166, 0.12));
  color: var(--primary-dark);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(11, 94, 215, 0.42);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
  outline: none;
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

.theme-toggle__icon--moon {
  display: none;
}

.theme-toggle--dark .theme-toggle__icon--sun {
  display: none;
}

.theme-toggle--dark .theme-toggle__icon--moon {
  display: inline-flex;
}

@media print {
  .site-header,
  .theme-toggle {
    display: none;
  }
}
