:root {
  --bg: #040911;
  --bg-alt: #0b1624;
  --text: #f5f7fb;
  --muted: #9aa3b5;
  --accent: #ff0a0a;
  --accent-alt: #ff2222;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --radius: 18px;
  --max-width: 1200px;
  font-family: 'Montserrat', 'Roboto Slab', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 45%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body[dir="rtl"] {
  direction: rtl;
  font-family: 'Cairo', 'Montserrat', 'Roboto Slab', sans-serif;
}

a {
  color: inherit;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(94%, var(--max-width));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(4, 9, 17, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

nav a.active,
nav a:focus-visible,
nav a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  background: #050708;
  text-decoration: none;
  font-size: 0.85rem;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.socials a:hover {
  background: #0f151b;
  border-color: rgba(255, 255, 255, 0.4);
}

.socials img,
.socials svg {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.socials img {
  filter: grayscale(1);
  opacity: 0.85;
}

.socials svg {
  opacity: 0.95;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero video,
.hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  background: linear-gradient(120deg, rgba(4, 9, 17, 0.9), rgba(4, 9, 17, 0.4));
  filter: grayscale(1);
}

.hero video {
  filter: grayscale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: 120px 0 80px;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 14px 0;
}

.ticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-alt));
}

.btn.secondary {
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}

.section {
  padding: 80px 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.pill-grid,
.expertise-grid,
.contact-grid {
  display: grid;
  gap: 20px;
}

.pill-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pill {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--card);
}

.about-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.about-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
}

.mission-quote {
  margin-top: 16px;
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.word-cloud-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.word-cloud-html {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px;
  min-height: 220px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  position: relative;
}

.word-cloud-html span {
  font-weight: 600;
  transition: text-shadow 1s ease, opacity 1s ease;
  cursor: pointer;
  line-height: 1.2;
}

.word-cloud-html span:hover,
.word-cloud-html span:focus-visible {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  opacity: 0.6;
}

@media (max-width: 640px) {
  .word-cloud-html {
    min-height: 220px;
  }
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.award-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px;
  display: flex;
  gap: 18px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.award-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.award-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 44px;
}

.award-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.award-badge {
  width: 72px;
  height: 72px;
  margin-top: auto;
  padding-top: 12px;
}

.award-wreath {
  width: 100%;
  height: 100%;
  color: #f6c243;
  filter: drop-shadow(0 8px 22px rgba(246, 194, 67, 0.25));
}

.award-wreath use {
  fill: none;
  stroke: currentColor;
}

.award-wreath text {
  font-family: 'Roboto Slab', 'Montserrat', sans-serif;
  letter-spacing: 0.05em;
}

.award-content h3 {
  margin: 0;
  font-size: 1.15rem;
}

.award-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.metrics {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 80%);
}

.metrics-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: rgba(4, 9, 17, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  min-height: 200px;
}

.metric-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--accent-alt);
  display: block;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.metric-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.portfolio-cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
  align-items: center;
}

.logos-grid img {
  width: 100%;
  filter: grayscale(1);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.logos-grid .logo-square {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.logos-grid .logo-square img {
  width: 80%;
  height: auto;
}

.logos-grid img:hover {
  opacity: 1;
  filter: grayscale(0.1);
}

.more-references {
  border: 1px dashed rgba(0, 0, 0, 0.3);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  justify-content: center;
  min-height: 140px;
}

.expertise-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.expertise-card {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.expertise-card h3 {
  margin-top: 0;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.contact-card,
.form-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 26px;
  background: var(--card);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--accent);
}

.form-card form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.status {
  min-height: 24px;
  color: var(--muted);
}

.human-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.human-check input {
  width: auto;
  accent-color: var(--accent);
}

.robot-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.map-wrapper iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(0.1) contrast(1.1);
}

.site-footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.site-footer .footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

.site-footer nav {
  justify-content: flex-end;
}

@media (max-width: 960px) {
  .site-header .container {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .site-header nav {
    display: none;
  }

  .site-header nav.open {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100vw;
    min-height: 100vh;
    background: rgba(4, 9, 17, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 60px 20px;
    z-index: 50;
    overflow-y: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .lang-toggle,
  .socials {
    display: flex;
    width: 100%;
    justify-content: center;
    order: 5;
  }
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .site-header .container {
    width: 100%;
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-toggle {
    margin-left: auto;
  }

  .hero-content {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .portfolio-cta,
  .site-footer nav {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 100px 0 60px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .ticker {
    width: fit-content;
    margin: 0 auto;
    font-size: 0.8rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .pill-grid,
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .logos-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .logos-grid .logo-square {
    padding: 16px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-wrapper iframe {
    height: 260px;
  }
}

@media (max-width: 480px) {
  body {
    line-height: 1.5;
  }

  .site-header .container {
    padding: 12px;
  }

  .logo img {
    height: 30px;
  }

  .hero-content {
    padding-top: 80px;
  }

  .pill-grid,
  .metrics-grid,
  .logos-grid {
    grid-template-columns: 1fr;
  }

  .logo-square {
    padding: 14px;
  }

  .more-references {
    min-height: 110px;
    font-size: 1.5rem;
  }

  .portfolio-cta .btn,
  .contact-grid button {
    flex: 1;
  }

  .contact-card,
  .form-card {
    padding: 20px;
  }

  .nav-toggle {
    padding: 6px 12px;
  }
}
