:root {
  --bg: #f3f5f9;
  --text: #0b1f43;
  --muted: #4e5f83;
  --primary: #0f3a94;
  --secondary: #1976d6;
  --card: #ffffff;
  --border: rgba(14, 79, 179, 0.12);
  --shadow: 0 20px 45px rgba(10, 34, 80, 0.12);
  --header-offset: 96px;
}

html[data-theme="dark"] {
  --bg: #070d1b;
  --text: #e8efff;
  --muted: #9eb2d8;
  --primary: #5f8fff;
  --secondary: #3ca7ff;
  --card: #0f1930;
  --border: rgba(124, 164, 255, 0.24);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

button {
  font-family: "Tajawal", "Inter", system-ui, sans-serif !important;
}

.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 4px;
  width: 0%;
  z-index: 80;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  box-shadow: 0 8px 18px rgba(25, 118, 214, 0.45);
}

html[lang="en"] body {
  font-family: "Inter", "Tajawal", system-ui, sans-serif;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

@media (max-width: 1440px) {
  .container {
    width: min(1160px, 93%);
  }

  .hero {
    gap: 1.8rem;
    padding-block: 4.4rem 2.8rem;
  }

  h1 {
    font-size: clamp(1.95rem, 3.8vw, 3.2rem);
  }
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(15, 58, 148, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 58, 148, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: -3;
}

.bg-orb {
  position: fixed;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(65px);
  z-index: -2;
  opacity: 0.42;
}

.orb-1 {
  background: #3fa0ff;
  top: -100px;
  left: -80px;
}

.orb-2 {
  background: #2f53c6;
  bottom: -140px;
  right: -90px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 245, 249, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.brand-text {
  display: grid;
  line-height: 1;
}

.brand-text .en {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: lowercase;
}

.brand-text .en span {
  color: var(--secondary);
}

.brand-text .ar {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  transition: transform 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn,
.lang-toggle,
.theme-toggle {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.67rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.lang-toggle {
  color: var(--primary);
  background: #fff;
  border-color: var(--border);
}

.theme-toggle {
  color: var(--primary);
  background: #fff;
  border-color: var(--border);
  min-width: 46px;
  padding-inline: 0.7rem;
}

.btn:hover,
.lang-toggle:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 8px 24px rgba(20, 86, 190, 0.35);
}

.btn-outline {
  color: var(--primary);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--card) 88%, white 12%);
}

.btn-ghost {
  color: var(--secondary);
  border-color: rgba(25, 118, 214, 0.25);
  background: rgba(255, 255, 255, 0.65);
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding-block: 5rem 3rem;
}

.hero-copy,
.hero-visual {
  opacity: 1;
}

.horizontal-text {
  overflow: hidden;
  padding-block: 1rem 0.8rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.h-track {
  display: inline-flex;
  gap: 1.1rem;
  white-space: nowrap;
  width: max-content;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 900;
  color: color-mix(in srgb, var(--secondary) 70%, var(--text) 30%);
  will-change: transform;
  padding-inline: 1rem;
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.2px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  margin-top: 0.6rem;
  font-size: clamp(2rem, 4.1vw, 3.6rem);
  font-weight: 900;
}

.hero-sub {
  margin-top: 1rem;
  max-width: 58ch;
  color: var(--muted);
}

.hero-rotating {
  margin: 0.65rem 0 0;
  color: var(--secondary);
  font-weight: 800;
  min-height: 1.6rem;
}

.hero-cta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-points {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.hero-points li {
  position: relative;
  padding-inline-start: 1.2rem;
  color: #16366e;
  font-weight: 600;
}

.hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  position: absolute;
  inset-inline-start: 0;
  top: 0.68em;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.cube-wrap {
  position: relative;
  width: min(430px, 90%);
  aspect-ratio: 1;
  border-radius: 26px;
  background: radial-gradient(circle at 20% 25%, rgba(25, 118, 214, 0.2), rgba(15, 58, 148, 0.02));
  border: 1px solid var(--border);
  transform-style: preserve-3d;
}

.orbit-svg {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
}

.orbit-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #8ac7ff, #1a7bdb);
  box-shadow: 0 0 0 8px rgba(43, 138, 242, 0.16);
  position: absolute;
  top: 0;
  left: 0;
}

.hero-mark {
  width: 70%;
  position: absolute;
  inset: 0;
  margin: auto;
  filter: drop-shadow(0 20px 30px rgba(11, 36, 87, 0.25));
}

.floating-card {
  position: absolute;
  background: color-mix(in srgb, var(--card) 88%, white 12%);
  color: var(--primary);
  font-weight: 800;
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(10, 34, 80, 0.16);
}

.card-a {
  top: 10%;
  right: 6%;
}

.card-b {
  bottom: 16%;
  left: -6%;
}

.card-c {
  top: 56%;
  right: -8%;
}

section {
  padding-block: 2.5rem;
}

section[id] {
  scroll-margin-top: calc(var(--header-offset) + 16px);
}

.scene:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 760px;
}

#portfolio.scene,
#testimonials.scene,
#contact.scene {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

#portfolio {
  position: relative;
  isolation: isolate;
}

#portfolio::before {
  content: "";
  position: absolute;
  inset: 1.2rem 0 auto;
  height: 420px;
  background:
    radial-gradient(circle at 18% 20%, rgba(72, 149, 255, 0.18), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(20, 86, 190, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

.section-head {
  max-width: 690px;
  margin-bottom: 1.1rem;
}

.section-head h2 {
  margin-top: 0.45rem;
  font-size: clamp(1.55rem, 3.2vw, 2.45rem);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
  perspective: 1200px;
}

.portfolio-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.admin-link {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 90%, white 10%);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.portfolio-manage,
.admin-link {
  white-space: nowrap;
}

.bento-card {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--card) 96%, #fff 4%),
    color-mix(in srgb, var(--card) 85%, #d9e9ff 15%)
  );
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.05rem;
  display: grid;
  align-content: space-between;
  min-height: 165px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(14px);
}

.bento-card-link {
  text-decoration: none;
  color: inherit;
}

.bento-card.is-lead {
  box-shadow: 0 28px 62px rgba(15, 58, 148, 0.14);
}

.bento-card.is-lead::before {
  width: 220px;
  height: 220px;
  opacity: 0.9;
}

.bento-card.is-lead-primary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(228, 241, 255, 0.96));
}

.bento-card.is-lead-secondary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(236, 245, 255, 0.92));
}

.bento-card.is-supporting {
  box-shadow: 0 18px 42px rgba(10, 34, 80, 0.1);
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -25%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 142, 255, 0.22), transparent 70%);
}

.bento-card::after {
  content: "";
  position: absolute;
  inset: -140% 45% auto -20%;
  height: 260%;
  background: linear-gradient(125deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(14deg);
  opacity: 0.35;
  pointer-events: none;
}

.bento-card:hover::after {
  opacity: 0.52;
}

.bento-card img {
  width: 100%;
  min-height: 120px;
  max-height: 170px;
  object-fit: cover;
  object-position: center;
  justify-self: stretch;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 86%, #d8e8ff 14%);
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 14px 24px rgba(10, 34, 80, 0.22));
  transform-origin: center center;
}

.card-xl img {
  min-height: 180px;
  max-height: 240px;
}

.bento-card span {
  position: relative;
  z-index: 1;
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.9rem;
}

.bento-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  text-wrap: balance;
}

.bento-card p {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 0;
  color: var(--muted);
  max-width: 26ch;
}

.bento-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 0.2rem;
}

.bento-card.is-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  place-items: center;
  text-align: center;
}

.card-xl {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 350px;
}

.card-md {
  grid-column: span 3;
  min-height: 170px;
}

.card-sm {
  grid-column: span 3;
  min-height: 170px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-item {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.stat-item h3 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--secondary);
}

.stat-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0.9rem;
}

.about-media {
  display: grid;
  place-items: center;
  min-height: 280px;
}

.about-media img {
  width: min(260px, 80%);
  filter: drop-shadow(0 20px 28px rgba(10, 34, 80, 0.2));
}

.showcase-card {
  cursor: grab;
  padding: 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 96%, #fff 4%), color-mix(in srgb, var(--card) 88%, #d8e9ff 12%));
  box-shadow: var(--shadow);
}

.showcase-card:active {
  cursor: grabbing;
}

.showcase-card span {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.9rem;
}

.showcase-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.service-card,
.step,
.cta-box {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem;
}

.service-card p {
  color: var(--muted);
  margin: 0.45rem 0 0;
}

.service-card .btn {
  margin-top: 1rem;
  align-self: flex-start;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.testimonials-wrap {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
}

.testimonials-track {
  position: relative;
}

.testimonial-card {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.25rem;
  display: none;
}

.testimonial-card.is-active {
  display: block;
}

.testimonial-card p {
  margin: 0;
  font-size: 1.06rem;
  color: var(--text);
  line-height: 1.9;
  text-wrap: balance;
}

.testimonial-card h4 {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 800;
}

.testimonial-quote::before {
  content: "“";
  color: color-mix(in srgb, var(--secondary) 65%, transparent);
  font-size: 2rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}

.slider-controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.testimonial-dots {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.testimonial-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 58, 148, 0.35);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.testimonial-dot.is-active {
  transform: scale(1.18);
  background: var(--secondary);
  border-color: var(--secondary);
}

html[data-theme="dark"] .testimonial-dot {
  background: rgba(17, 36, 72, 0.85);
  border-color: rgba(124, 164, 255, 0.5);
}

html[data-theme="dark"] .testimonial-dot.is-active {
  background: #63a5ff;
  border-color: #63a5ff;
}

.step {
  padding: 1rem;
}

.step span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(15, 58, 148, 0.12), rgba(25, 118, 214, 0.2));
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 0.7rem;
}

.step p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.faq-item p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.cta {
  padding-bottom: 4.2rem;
}

.cta-box {
  padding: 2rem;
  background: linear-gradient(145deg, #fdfefe 12%, #eef6ff 92%);
}

.cta-box p {
  margin: 0.65rem 0 1.2rem;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.contact-form {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
}

.contact-form label span {
  font-weight: 700;
  color: var(--text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 90%, white 10%);
  color: var(--text);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary) 20%, transparent);
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.form-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.project-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.project-modal[aria-hidden="true"] {
  display: none !important;
}

.project-modal[aria-hidden="false"] {
  display: grid !important;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 17, 38, 0.6);
  backdrop-filter: blur(3px);
}

.project-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 2rem));
  max-height: min(88vh, 880px);
  overflow: auto;
  background: linear-gradient(145deg, #fdfefe 12%, #eef6ff 92%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(4, 20, 52, 0.35);
  padding: 1.2rem;
}

.service-modal-panel {
  width: min(700px, calc(100% - 2rem));
}

.service-modal-list {
  margin: 0;
  padding: 0 1rem 0 0;
  display: grid;
  gap: .55rem;
  color: var(--muted);
}

html[dir="ltr"] .service-modal-list {
  padding: 0 0 0 1rem;
}

.service-modal-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.project-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.project-modal-sub {
  margin: .45rem 0 1rem;
  color: var(--muted);
}

.project-modal-close {
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

.toast-root {
  position: fixed;
  inset-inline-end: 1rem;
  top: 1rem;
  z-index: 140;
  display: grid;
  gap: .6rem;
  width: min(360px, calc(100% - 1.2rem));
}

.toast {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, white 8%);
  color: var(--text);
  border-radius: 14px;
  padding: .8rem .9rem;
  box-shadow: 0 18px 35px rgba(10, 34, 80, 0.18);
  font-weight: 700;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-success {
  border-color: rgba(13, 138, 76, 0.38);
}

.toast.is-error {
  border-color: rgba(201, 52, 52, 0.38);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  color: #3f5481;
  text-align: center;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-footer-link {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}

.brand-footer-link:hover,
.brand-footer-link:focus-visible {
  color: inherit;
  text-decoration: none;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 92%, white 8%);
}

.footer-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-social-link:hover {
  border-color: color-mix(in srgb, var(--secondary) 58%, var(--border) 42%);
}

.sticky-contact {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 1rem;
  z-index: 60;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(20, 86, 190, 0.45);
}

html[data-theme="dark"] .site-header {
  background: rgba(7, 13, 27, 0.72);
}

html[data-theme="dark"] .lang-toggle,
html[data-theme="dark"] .theme-toggle {
  background: #111e3a;
}

html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .hero-cta .btn-ghost {
  color: #d9e8ff;
  border-color: rgba(124, 164, 255, 0.44);
  background: rgba(34, 58, 108, 0.6);
}

html[data-theme="dark"] .nav-actions .btn-outline,
html[data-theme="dark"] .cta-actions .btn-outline {
  color: #d9e8ff;
  border-color: rgba(124, 164, 255, 0.46);
  background: rgba(30, 49, 93, 0.5);
}

html[data-theme="dark"] .cta-box {
  background: linear-gradient(145deg, #0f1c37 10%, #101f3f 65%, #12254b 100%);
  border-color: rgba(124, 164, 255, 0.24);
}

html[data-theme="dark"] .project-modal-panel {
  background: linear-gradient(145deg, #0f1c37 10%, #101f3f 65%, #12254b 100%);
  border-color: rgba(124, 164, 255, 0.24);
}

html[data-theme="dark"] .project-modal-close {
  background: rgba(18, 34, 68, 0.9);
  border-color: rgba(124, 164, 255, 0.24);
  color: #d9e8ff;
}

html[data-theme="dark"] .toast {
  background: rgba(16, 30, 60, 0.94);
  border-color: rgba(124, 164, 255, 0.26);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .cta-box p,
html[data-theme="dark"] .form-note {
  color: #b4c7ea;
}

html[data-theme="dark"] #portfolio::before {
  background:
    radial-gradient(circle at 18% 20%, rgba(72, 149, 255, 0.2), transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(60, 167, 255, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(18, 37, 75, 0.52), rgba(18, 37, 75, 0));
}

html[data-theme="dark"] .bento-card {
  background: linear-gradient(145deg, rgba(16, 28, 56, 0.96), rgba(17, 34, 68, 0.9));
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .bento-card.is-lead {
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .bento-card.is-lead-primary {
  background: linear-gradient(145deg, rgba(18, 34, 68, 0.98), rgba(22, 46, 90, 0.94));
}

html[data-theme="dark"] .bento-card.is-lead-secondary {
  background: linear-gradient(145deg, rgba(17, 31, 60, 0.96), rgba(21, 40, 80, 0.92));
}

html[data-theme="dark"] .bento-card::after {
  background: linear-gradient(125deg, transparent, rgba(147, 193, 255, 0.12), transparent);
}

html[data-theme="dark"] .brand-text .ar,
html[data-theme="dark"] .hero-points li,
html[data-theme="dark"] .site-footer {
  color: var(--text);
}

.reveal-up,
.reveal-left {
  opacity: 1;
}

section[id] {
  scroll-margin-top: calc(var(--header-offset) + 16px);
}

html[dir="ltr"] .hero-points li {
  padding-inline-start: 1.2rem;
}

@media (max-width: 1200px) {
  .container {
    width: min(1120px, 94%);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 3.4rem;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .nav-links {
    display: none;
  }

  .nav {
    min-height: 78px;
    gap: 0.7rem;
  }

  .btn,
  .lang-toggle,
  .theme-toggle {
    padding: 0.6rem 0.82rem;
    font-size: 0.9rem;
  }

  .testimonials-wrap {
    min-height: 0;
  }

  .testimonials-track {
    min-height: 0;
  }
}

@media (max-width: 992px) {
  .scene:not(.hero) {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }

  .hero {
    gap: 1.2rem;
    padding-block: 2.9rem 2.2rem;
  }

  .cards-grid,
  .stats,
  .showcase-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-toolbar {
    align-items: stretch;
    justify-content: flex-start;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-xl,
  .card-md,
  .card-sm {
    grid-column: auto;
    grid-row: auto;
    min-height: 170px;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .h-track {
    font-size: clamp(1rem, 2.8vw, 1.4rem);
  }

  .floating-card {
    font-size: 0.86rem;
  }
}

@media (max-width: 768px) {
  .nav {
    min-height: 74px;
  }

  .brand-text .en {
    font-size: 1.1rem;
  }

  .brand-text .ar {
    font-size: 0.88rem;
  }

  .nav-actions .btn-outline {
    display: none;
  }

  .theme-toggle {
    min-width: 40px;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(1.7rem, 7vw, 2.35rem);
  }

  .hero-sub {
    max-width: 100%;
    font-size: 0.98rem;
  }

  .hero-points {
    gap: 0.35rem;
  }

  .sticky-contact {
    inset-inline-end: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.9rem;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 1.25rem;
  }

  .form-actions .btn {
    width: 100%;
    text-align: center;
  }

  .project-modal-panel {
    width: calc(100% - 1rem);
    max-height: 80vh;
    border-radius: 16px;
    padding: .95rem;
  }

  .toast-root {
    inset-inline-end: .5rem;
    top: .5rem;
    width: calc(100% - 1rem);
  }

  .slider-controls .btn {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .container {
    width: 94%;
  }

  .nav {
    min-height: 70px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text .en {
    font-size: 1rem;
  }

  .brand-text .ar {
    font-size: 0.8rem;
  }

  .nav-actions {
    gap: 0.45rem;
  }

  .admin-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.84rem;
  }

  .lang-toggle,
  .theme-toggle,
  .btn {
    border-radius: 12px;
    padding: 0.52rem 0.72rem;
    font-size: 0.84rem;
  }

  .hero {
    padding-block: 2.2rem 1.8rem;
  }

  .cube-wrap {
    width: min(340px, 100%);
  }

  .floating-card {
    font-size: 0.8rem;
    padding: 0.35rem 0.55rem;
  }

  .card-b {
    left: -2%;
  }

  .card-c {
    right: -2%;
  }

  .bento-card,
  .service-card,
  .showcase-card,
  .testimonial-card {
    border-radius: 14px;
  }

  .testimonial-card {
    padding: 1rem;
  }

  .testimonials-wrap {
    min-height: 0;
  }

  .testimonials-track {
    min-height: 0;
  }

  .sticky-contact {
    font-size: 0.82rem;
    padding: 0.64rem 0.8rem;
  }
}

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