/* ========================================
   IMPORTS
======================================== */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");

/* ========================================
   TOKENS / THEME
======================================== */
:root {
  color-scheme: dark;
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --surface: rgba(19, 19, 19, 0.78);
  --surface-strong: rgba(26, 26, 26, 0.9);
  --surface-solid: #111111;
  --card-hover: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --text-soft: #c9c9c9;
  --muted: #949494;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #ffffff;
  --accent-soft: #868686;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.35);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --container: min(1180px, calc(100% - 40px));
  --transition: 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-slow: 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Hero dynamic sizing */
  --header-offset: clamp(82px, 7vw, 98px);
  --hero-top-space: clamp(25px, 5vh, 72px);
  --hero-bottom-space: clamp(18px, 3vh, 30px);
  --hero-gap: clamp(14px, 2vh, 22px);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f0f0f0;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --card-hover: rgba(0, 0, 0, 0.05);
  --text: #111111;
  --text-soft: #313131;
  --muted: #555555;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.18);
  --accent: #111111;
  --accent-soft: #5a5a5a;
  --shadow: 0 24px 65px rgba(17, 17, 17, 0.12);
  --shadow-soft: 0 14px 30px rgba(17, 17, 17, 0.08);
}
html[data-theme="light"] .profile-shell {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .profile-shell::before {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.92),
    transparent 35%,
    transparent 65%,
    rgba(0, 0, 0, 0.06)
  );
  opacity: 1;
}

html[data-theme="light"] .profile-shell::after {
  border-color: rgba(0, 0, 0, 0.10);
}

html[data-theme="light"] .profile-frame {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent);
}

html[data-theme="light"] .orbit {
  border-color: rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .orbit::before {
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.10);
}

html[data-theme="light"] .glow-one {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), transparent 70%);
}

html[data-theme="light"] .glow-two {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.06), transparent 72%);
}

html[lang="ar"] {
  --font-main: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ========================================
   RESET / BASE
======================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.05), transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

/* ========================================
   GLOBAL LAYOUT / UTILITIES
======================================== */
.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 110px 0;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.8) 0 0.65px, transparent 0.75px),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.65) 0 0.6px, transparent 0.75px);
  background-size: 22px 22px, 18px 18px;
  mix-blend-mode: screen;
  z-index: 1;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.2)
  );
  z-index: 3000;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.center-text {
  margin-inline: auto;
}

.muted-text {
  margin-top: 14px;
  color: var(--muted);
}

/* ========================================
   GLOBAL SECTION HEADING COMPONENT
======================================== */
.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading.center-heading {
  margin-inline: auto;
  text-align: center;
}

.section-title {
  margin: 16px 0 14px;
  font-size: clamp(1rem, 2.3vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.section-text {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.85;
}

/* ========================================
   GLOBAL KICKERS
======================================== */
.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

html[lang="ar"] .hero-kicker,
html[lang="ar"] .section-kicker {
  letter-spacing: 0.04em;
}

/* ========================================
   GLOBAL BUTTON SYSTEM
======================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid var(--line);
  transition:
    transform var(--transition),
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -120% auto auto -35%;
  width: 70px;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(24deg);
  transition: transform 0.9s ease;
}

.btn:hover::before {
  transform: translateX(420px) rotate(24deg);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

html[data-theme="light"] .btn-primary {
  color: #ffffff;
  background: #111111;
}

.btn-block {
  width: 100%;
}

/* ========================================
   GLOBAL REVEAL / TILT
======================================== */
.reveal {
  --reveal-y: 28px;
  opacity: 0;
  transform: translate3d(0, var(--reveal-y), 0);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tilt-card.reveal {
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(0, var(--reveal-y), 0);
}

.reveal.is-visible {
  --reveal-y: 0px;
  opacity: 1;
}

.tilt-card {
  transition:
    transform 0.25s ease,
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  will-change: transform;
}

.tilt-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

/* ========================================
   HEADER
======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.site-header.is-scrolled::before {
  opacity: 1;
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "actions nav brand";
  align-items: center;
  column-gap: 18px;
  row-gap: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand {
  grid-area: brand;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 84px;
  padding: 14px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark img {
  width: 120%;
  height: 120%;
  object-fit: contain;
  filter: brightness(1.8) contrast(1.15);
}

html[data-theme="light"] .brand-mark img,
html[data-theme="light"] .wm-watermark {
  filter: invert(1) brightness(0.25);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.nav {
  grid-area: nav;
  justify-self: center;
  align-self: center;
  width: 100%;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 700;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.nav a::after {
  content: "";
  position: absolute;
  inset: auto 18px 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform var(--transition);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: var(--card-hover);
}

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

.header-actions {
  grid-area: actions;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  min-height: 84px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.lang-switch,
.theme-toggle {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.lang-switch:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: var(--line-strong);
}

.lang-switch {
  font-weight: 700;
  letter-spacing: 0.08em;
  min-width: 72px;
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  border: 2px solid currentColor;
}

.theme-toggle__icon::before,
.theme-toggle__icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

html[data-theme="dark"] .theme-toggle__icon {
  background: currentColor;
  box-shadow: -6px -4px 0 2px var(--surface-solid) inset;
}

html[data-theme="light"] .theme-toggle__icon {
  background: transparent;
}

html[data-theme="light"] .theme-toggle__icon::before {
  width: 3px;
  height: 26px;
  background: currentColor;
  box-shadow:
    0 -10px 0 0 currentColor,
    0 10px 0 0 currentColor,
    -10px 0 0 0 currentColor,
    10px 0 0 0 currentColor;
}

html[data-theme="light"] .theme-toggle__icon::after {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  background: transparent;
}

.nav-toggle {
  display: none;
  width: 50px;
  height: 50px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-footer,
.nav-mobile-lang {
  display: none;
}



@media (min-width: 768px) and (max-width: 1100px) {
  .header-inner {
    gap: 12px;
  }

  .brand {
    min-height: 74px;
    padding: 12px 14px;
  }

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

  .brand-copy small {
    display: none;
  }

  .nav {
    padding: 8px 10px;
    max-width: 100%;
  }

  .nav a {
    min-width: auto;
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .header-actions {
    min-height: 74px;
    padding: 6px;
    gap: 8px;
  }

  .lang-switch,
  .theme-toggle {
    min-height: 48px;
    padding: 0 14px;
  }

  .theme-toggle__text {
    display: none;
  }
}

@media (max-width: 767px) {
  .site-header {
    padding: 10px 0 0;
  }

  .header-inner {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    grid-template-areas: "toggle brand actions";
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 14px;
    border-radius: 26px;
    background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }

  .nav-toggle {
    grid-area: toggle;
    justify-self: start;
    display: inline-flex;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
  }

  .brand {
    grid-area: brand;
    grid-column: auto;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    min-height: unset;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 25px;
    flex-shrink: 0;
  }

  .brand-copy {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .header-actions {
    grid-area: actions;
    grid-column: auto;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: unset;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .desktop-lang {
    display: none;
  }

  .theme-toggle {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 18px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .theme-toggle__text {
    display: none;
  }

  .theme-toggle__icon {
    width: 18px;
    height: 18px;
  }

  html[dir="ltr"] .header-inner {
    grid-template-areas: "actions brand toggle";
  }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    transition:
      opacity var(--transition),
      visibility var(--transition),
      transform var(--transition);
    z-index: 1200;
  }

  .nav-toggle[aria-expanded="true"] ~ .nav,
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .nav a {
    width: 100%;
    min-width: unset;
    min-height: 54px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-weight: 700;
  }

  html[dir="rtl"] .nav a {
    justify-content: flex-end;
  }

  .nav a::after {
    display: none;
  }

  .nav a:hover,
  .nav a.is-active {
    background: var(--card-hover);
    border-color: var(--line-strong);
    transform: none;
  }

  .nav-mobile-footer {
    display: flex;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .nav-mobile-lang {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.04em;
  }
}
/* =========================
   English header fix only
   ========================= */

html[dir="ltr"] .brand-copy {
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 767px) {
  html[dir="ltr"] .header-inner {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    grid-template-areas: "toggle brand actions";
  }

  html[dir="ltr"] .brand {
    flex-direction: row;
  }

  html[dir="ltr"] .brand-copy {
    align-items: flex-start;
    text-align: left;
  }

  html[dir="ltr"] .nav a {
    justify-content: flex-start;
  }
}
/* ========================================
   HERO SECTION
======================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--header-offset));
  min-height: calc(100dvh - var(--header-offset));
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding-block: var(--hero-top-space) var(--hero-bottom-space);
}

.hero > .container {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
}

.hero-grid,
.hero-grid::before,
.hero-grid::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  opacity: 0.8;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 95%);
}

.hero-grid::before {
  content: "";
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 45%);
  filter: blur(20px);
}

.hero-grid::after {
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  width: min(420px, 40vw);
  transform: translateX(-120%);
  animation: scan 8s linear infinite;
}

/* WM BACKGROUND */
.wm-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.wm-lines {
  width: min(72vw, 840px);
  max-width: 100%;
  opacity: 0.22;
  filter: drop-shadow(0 0 35px rgba(255, 255, 255, 0.18));
  transform-origin: center;
  animation: float 9s ease-in-out infinite;
}

.wm-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wm-path--back {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 18;
}

.wm-path--front {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 10;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation:
    drawLine 3.8s cubic-bezier(0.4, 0, 0.2, 1) forwards,
    pulseLine 5.5s ease-in-out 3.8s infinite;
}

.wm-watermark {
  position: absolute;
  width: min(280px, 26vw);
  bottom: 8%;
  right: 8%;
  opacity: 0.1;
  filter: brightness(1.8) contrast(1.1);
  animation: drift 12s ease-in-out infinite;
}

html[dir="rtl"] .wm-watermark {
  left: 8%;
  right: auto;
}

/* HERO INNER */
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: calc(100svh - var(--header-offset) - var(--hero-top-space) - var(--hero-bottom-space));
  min-height: calc(100dvh - var(--header-offset) - var(--hero-top-space) - var(--hero-bottom-space));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--hero-gap);
}

.hero-photo-wrap {
  position: relative;
  width: clamp(250px, 24vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-top: 4px;
}

.profile-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.profile-shell::before,
.profile-shell::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
}

.profile-shell::before {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.26),
    transparent 35%,
    transparent 65%,
    rgba(255, 255, 255, 0.1)
  );
  opacity: 0.7;
}

.profile-shell::after {
  inset: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
}

.profile-frame {
  position: relative;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ORBITS / GLOWS */
.orbit,
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit {
  border: 1px solid rgba(255, 255, 255, 0.22);
  animation: spin 18s linear infinite;
}

.orbit::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.55);
}

.orbit-one {
  inset: -18px;
}

.orbit-two {
  inset: -34px;
  opacity: 0.5;
  animation-duration: 28s;
  animation-direction: reverse;
}

.orbit-three {
  inset: -52px;
  opacity: 0.25;
  animation-duration: 32s;
}

.glow-one {
  inset: auto auto 10% 8%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 70%);
  filter: blur(6px);
  animation: pulse 6s ease-in-out infinite;
}

.glow-two {
  inset: 12% 8% auto auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 72%);
  filter: blur(12px);
  animation: pulse 7.5s ease-in-out infinite reverse;
}

/* FLOATING CARDS */
.hero-floating-card {
  position: absolute;
  width: 185px;
  padding: 16px 18px;
  border-radius: 22px;
  text-align: start;
  z-index: 2;
  animation: floatAlt 7s ease-in-out infinite;
}

.hero-floating-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
}

.floating-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.floating-card-left {
  inset-inline-start: clamp(-150px, -10vw, -90px);
  top: 10%;
  transform: translateX(18px);
}

.floating-card-right {
  inset-inline-end: clamp(-150px, -10vw, -90px);
  bottom: 8%;
  transform: translateX(-18px);
  animation-delay: -2s;
}

/* HERO TEXT */
.hero-title {
  margin: 0;
  max-width: min(950px, 92vw);
  font-size: clamp(1.4rem, 3.6vw, 3.9rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero-role {
  margin: 0;
  min-height: 34px;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  font-weight: 600;
}

.typing {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.typing::after {
  content: "";
  width: 1px;
  height: 1.1em;
  background: currentColor;
  animation: blink 0.9s step-end infinite;
}

.hero-summary {
  margin: 0;
  max-width: min(780px, 88vw);
  color: var(--text-soft);
  font-size: clamp(0.98rem, 1.45vw, 1.12rem);
  line-height: 1.8;
}

/* HERO ACTIONS */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* HERO PILLS / SOCIAL */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.social-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.social-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.social-pill:focus-visible {
  outline: 2px solid var(--line-strong);
  outline-offset: 3px;
}

.social-pill span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background var(--transition),
    transform var(--transition);
}

.social-pill:hover span {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.12);
}

.social-pill svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.social-pill span svg {
  width: 27px;
  height: 27px;
  display: block;
  fill: currentColor;
}

html[data-theme="light"] .social-pill {
  background: rgba(0, 0, 0, 0.015);
}

html[data-theme="light"] .social-pill:hover {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .social-pill span {
  background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .social-pill:hover span {
  background: rgba(0, 0, 0, 0.1);
}

/* Tablet socials */
@media (max-width: 767px) {
  .social-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .social-pill {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .social-pill:hover {
    transform: translateY(-2px);
  }

  .social-pill span {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
  }

  .social-pill svg {
    width: 18px;
    height: 18px;
  }

  html[data-theme="light"] .social-pill {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.025), rgba(0, 0, 0, 0.012));
  }

  html[data-theme="light"] .social-pill span {
    background: rgba(0, 0, 0, 0.07);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .social-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 280px;
  }

  .social-pill {
    border-radius: 18px;
  }

  .social-pill span {
    width: 38px;
    height: 38px;
  }

  .social-pill svg {
    width: 16px;
    height: 16px;
  }
}

/* SCROLL CUE */
.scroll-cue {
  margin-top: auto;
  padding-top: clamp(10px, 2.5vh, 24px);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-weight: 700;
  flex-shrink: 0;
}

.scroll-cue span {
  width: 28px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  position: relative;
}

.scroll-cue span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}

/* HERO RESPONSIVE */
@media (max-width: 1024px) {
  .hero {
    padding-block: 118px 24px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 7vw, 4rem);
  }

  .hero-photo-wrap {
    width: min(320px, 62vw);
  }

  .hero-floating-card {
    width: 160px;
    padding: 14px 16px;
  }

  .floating-card-left {
    inset-inline-start: -40px;
  }

  .floating-card-right {
    inset-inline-end: -40px;
  }

  .wm-lines {
    width: min(90vw, 760px);
  }
}

@media (max-height: 740px) and (min-width: 768px) {
  .hero-photo-wrap {
    width: clamp(220px, 20vw, 290px);
  }

  .hero-title {
    font-size: clamp(2.2rem, 4vw, 4.4rem);
  }

  .hero-summary {
    max-width: 720px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 120px;
  }

  .hero-floating-card {
    width: 160px;
    padding: 14px;
  }

  .hero-summary {
    max-width: 680px;
  }
}

@media (max-width: 767px) {
  :root {
    --hero-top-space: calc(var(--header-offset) + 10px);
    --hero-bottom-space: 14px;
  }

  .hero {
    min-height: 92svh;
    min-height: 92dvh;
    padding-block: var(--hero-top-space) calc(var(--hero-bottom-space) + env(safe-area-inset-bottom));
  }

  .hero > .container {
    align-items: center;
  }

  .hero-inner {
    min-height: calc(92svh - var(--hero-top-space) - var(--hero-bottom-space));
    min-height: calc(92dvh - var(--hero-top-space) - var(--hero-bottom-space));
    gap: 12px;
  }

  .hero-kicker,
  .section-kicker {
    padding: 8px 14px;
    font-size: 0.72rem;
  }

  .hero-title {
    max-width: 100%;
    font-size: clamp(1.8rem, 9.6vw, 2.85rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
  }

  .hero-role {
    min-height: auto;
    font-size: clamp(0.98rem, 4.6vw, 1.12rem);
  }

  .hero-summary {
    max-width: 94%;
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .hero-photo-wrap {
    width: min(228px, 64vw);
    margin-top: 0;
  }

  .profile-shell {
    border-radius: 26px;
  }

  .profile-frame {
    width: calc(100% - 22px);
    height: calc(100% - 22px);
    border-radius: 20px;
  }

  .orbit-one {
    inset: -10px;
  }

  .orbit-two,
  .orbit-three,
  .hero-floating-card {
    display: none;
  }

  .glow-one {
    width: 80px;
    height: 80px;
    inset: auto auto 14% 50%;
    transform: translateX(-78px);
  }

  .glow-two {
    width: 92px;
    height: 92px;
    inset: 12% auto auto 50%;
    transform: translateX(24px);
  }

  .hero-actions,
  .hero-pills,
  .social-strip {
    width: 100%;
  }

  .hero-actions .btn,
  .hero-pills > *,
  .social-strip > * {
    width: 100%;
    justify-content: center;
  }

  .stat-pill,
  .social-pill {
    min-height: 52px;
    padding: 12px 16px;
  }

  /* أهم تعديل للموبايل: ضبط الخلفية في المنتصف */
  .wm-stage {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .wm-lines {
    width: min(92vw, 430px);
    opacity: 0.14;
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.12));
    animation: wmFloatMobile 8s ease-in-out infinite;
  }

  .wm-path--back {
    stroke-width: 12;
  }

  .wm-path--front {
    stroke-width: 7;
  }

  .wm-watermark {
    width: min(118px, 30vw);
    left: 50%;
    right: auto;
    bottom: 4%;
    transform: translateX(-50%);
    opacity: 0.05;
    filter: brightness(1.45) contrast(1.05);
  }

  html[dir="rtl"] .wm-watermark {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .scroll-cue {
    gap: 8px;
    font-size: 0.9rem;
    padding-top: 4px;
  }

  .scroll-cue span {
    width: 24px;
    height: 42px;
  }
}

@media (max-width: 720px) {
  .hero-photo-wrap {
    width: min(260px, 72vw);
    display: grid;
    gap: 12px;
    aspect-ratio: auto;
  }

  .hero-floating-card {
    position: static;
    width: 100%;
    text-align: center;
    animation: none;
  }

  .profile-shell {
    order: 2;
    width: 100%;
    aspect-ratio: 1;
  }

  .floating-card-left {
    order: 1;
  }

  .floating-card-right {
    order: 3;
  }

  .hero-pills,
  .social-strip,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-pill,
  .social-pill,
  .btn {
    width: 100%;
  }
}

@keyframes wmFloatMobile {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========================================
   ABOUT SECTION
======================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 32px;
  align-items: start;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.focus-card {
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 100%;
}

.focus-number {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.focus-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.focus-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.85;
}

@media (max-width: 1100px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .focus-card {
    padding: 20px;
  }
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact-panel {
  border-radius: var(--radius-md);
}

.contact-panel--neo {
  position: sticky;
  top: 110px;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  isolation: isolate;
}

.contact-panel--neo::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: panelRotate 8s linear infinite;
  pointer-events: none;
}

.contact-shell {
  position: relative;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #141414 0%, #0c0c0d 100%);
  z-index: 1;
}

.contact-noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, #000 55%, transparent 100%);
  pointer-events: none;
}

.contact-scan {
  position: absolute;
  inset-inline-start: -40%;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: skewX(-18deg);
  animation: scanMove 5.2s linear infinite;
  pointer-events: none;
}

.panel-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-title-wrap h3 {
  margin: 6px 0 0;
  font-size: 1.15rem;
  line-height: 1.25;
  color: #ffffff;
}

.panel-subtitle {
  position: relative;
  margin: 0 0 14px;
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 32ch;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: pulseDot 1.8s infinite;
}

.contact-list {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.contact-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 12px;
  padding: 13px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
  animation: rowIn 0.6s ease forwards;
}

.contact-row:nth-child(1) {
  animation-delay: 0.08s;
}

.contact-row:nth-child(2) {
  animation-delay: 0.16s;
}

.contact-row:nth-child(3) {
  animation-delay: 0.24s;
}

.contact-row:nth-child(4) {
  animation-delay: 0.32s;
}

.contact-row::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14%;
  width: 2px;
  height: 72%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-row:hover {
  transform: translateY(-4px) translateX(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.contact-row:hover::after {
  opacity: 1;
}

.contact-row__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f5f5f5 0%, #bdbdbd 100%);
  color: #101010;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 6px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.35s ease;
}

.contact-row:hover .contact-row__icon {
  transform: rotate(-8deg) scale(1.05);
}

.contact-row__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-row__content {
  min-width: 0;
}

.contact-label {
  display: block;
  margin-bottom: 4px;
  color: #8b8b92;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[lang="ar"] .contact-label {
  letter-spacing: 0.02em;
}

.contact-row a,
.contact-row p {
  margin: 0;
  color: #f3f4f6;
  line-height: 1.65;
  font-size: 0.93rem;
  word-break: break-word;
}

.contact-row a {
  text-decoration: none;
  transition: color 0.25s ease;
}

.contact-row a:hover {
  color: #ffffff;
}

/* legacy contact-card support if older markup still exists */
.contact-card p,
.contact-card a {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.85;
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contact-btn {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease;
}

.contact-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.7s ease;
}

.contact-btn:hover::after {
  left: 140%;
}

.contact-btn:hover {
  transform: translateY(-3px);
}

.contact-btn--primary {
  background: #ffffff;
  color: #111111;
  border: 1px solid #ffffff;
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.08);
}

.contact-btn--primary:hover {
  background: #e5e7eb;
  border-color: #e5e7eb;
}

.contact-btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .contact-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .contact-panel {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .contact-shell {
    padding: 16px;
  }

  .panel-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-panel--neo::before,
  .contact-scan,
  .status-dot,
  .contact-row {
    animation: none !important;
  }

  .contact-row,
  .contact-row__icon,
  .contact-btn,
  .contact-btn::after {
    transition: none !important;
  }
}

/* ========================================
   CLIENTS SECTION
======================================== */
.clients-section {
  padding-bottom: 100px;
}

.marquee-shell {
  position: relative;
  overflow: hidden;
  padding: 12px 0;
  direction: ltr;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  --marquee-from: 0%;
  --marquee-to: -50%;
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  will-change: transform;
  animation: marquee-inline 28s linear infinite;
  transform: translate3d(0, 0, 0);
}

.marquee-track[data-marquee-direction="rtl"] {
  --marquee-from: -50%;
  --marquee-to: 0%;
}

.logo-pill {
  flex: 0 0 auto;
  min-width: 200px;
  height: 96px;
  display: grid;
  place-items: center;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.logo-pill img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.3);
  opacity: 0.9;
  pointer-events: none;
  user-select: none;
}

html[data-theme="light"] .logo-pill img {
  filter: grayscale(1) brightness(0.45);
}

@keyframes marquee-inline {
  from {
    transform: translate3d(var(--marquee-from), 0, 0);
  }
  to {
    transform: translate3d(var(--marquee-to), 0, 0);
  }
}

@media (max-width: 767px) {
  .logo-pill {
    min-width: 170px;
    height: 84px;
    padding: 12px 16px;
  }

  .logo-pill img {
    height: 38px;
  }

  .marquee-track {
    gap: 14px;
    animation-duration: 24s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none !important;
    transform: none !important;
  }
}
/* ========================================
   PROJECTS SECTION
======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: var(--radius-md, 24px);
  overflow: hidden;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.015);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 35%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 65%,
    transparent 100%
  );
  transform: translateX(-130%);
  transition: transform 0.95s ease;
  pointer-events: none;
  z-index: 2;
}

html[data-theme="light"] .project-card::before {
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.28) 35%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.28) 65%,
    transparent 100%
  );
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--line-strong, rgba(255, 255, 255, 0.14));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.project-card:hover::before {
  transform: translateX(130%);
}

.project-media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%);
}

html[data-theme="light"] .project-media {
  background:
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.05), transparent 38%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.025), transparent 100%);
}

.project-media::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

html[data-theme="light"] .project-media::before {
  background: rgba(0, 0, 0, 0.02);
}

.project-media::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0.8;
}

html[data-theme="light"] .project-media::after {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.07), transparent 70%);
}

.project-card:hover .project-media::after {
  transform: scale(1.08);
  opacity: 1;
}

.project-image-link {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}

.project-image-link img,
.project-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.18));
}

html[data-theme="light"] .project-media img {
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.12));
}

.project-card:hover .project-media img {
  transform: scale(1.03) translateY(-2px);
}

.project-image-link:focus-visible {
  outline: 2px solid var(--line-strong, rgba(255, 255, 255, 0.14));
  outline-offset: -6px;
  border-radius: 18px;
}

.project-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.project-content h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  line-height: 1.45;
}

.project-content p {
  margin: 0;
  color: var(--text-soft, rgba(255, 255, 255, 0.72));
  line-height: 1.85;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft, rgba(255, 255, 255, 0.72));
  font-size: 0.88rem;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}

html[data-theme="light"] .project-tag {
  background: rgba(0, 0, 0, 0.02);
}

.project-tag:hover {
  transform: translateY(-2px);
  background: var(--card-hover, rgba(255, 255, 255, 0.06));
  border-color: var(--line-strong, rgba(255, 255, 255, 0.14));
}

.project-open {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  font-weight: 700;
  border: 0;
  background: transparent;
  color: var(--text, inherit);
  cursor: pointer;
  text-align: start;
}

.project-open::after {
  content: "↗";
  display: inline-block;
  transition: transform 0.3s ease;
}

.project-open:hover::after {
  transform: translate(4px, -4px);
}

/* Slider dots */
.projects-slider-dots {
  display: none;
}

/* Modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.project-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 15, 17, 0.94);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.project-modal__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.04);
}

.project-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.project-modal__media {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.project-modal__content {
  display: flex;
  flex-direction: column;
}

.project-modal__subtitle {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  line-height: 1.7;
}

.project-modal__content h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.5;
}

.project-modal__content > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.9;
  font-size: 0.97rem;
}

.project-modal__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-modal__tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
}

.project-modal__highlights {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.project-modal__highlights li {
  position: relative;
  padding-inline-start: 18px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
}

.project-modal__highlights li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.8em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-50%);
}

/* Light theme */
html[data-theme="light"] .project-card {
  background: rgba(0, 0, 0, 0.015);
}

html[data-theme="light"] .project-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .project-modal__backdrop {
  background: rgba(245, 245, 245, 0.35);
}

html[data-theme="light"] .project-modal__dialog {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .project-modal__close {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

html[data-theme="light"] .project-modal__media {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .project-modal__subtitle {
  color: rgba(17, 17, 17, 0.56);
}

html[data-theme="light"] .project-modal__content h3 {
  color: #111;
}

html[data-theme="light"] .project-modal__content > p,
html[data-theme="light"] .project-modal__highlights li {
  color: rgba(17, 17, 17, 0.72);
}

html[data-theme="light"] .project-modal__tag {
  color: #111;
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .project-modal__highlights li::before {
  background: rgba(17, 17, 17, 0.8);
}



/* Tablet */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-modal__body {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .projects-section .container {
    overflow: hidden;
  }

  .projects-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: clamp(260px, 86vw, 340px);
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-inline: 2px 14px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .projects-grid::-webkit-scrollbar {
    display: none;
  }

  .project-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100%;
    animation: projectCardIn 0.5s ease both;
  }

  .project-media {
    aspect-ratio: 16 / 11;
    padding: 14px;
  }

  .project-content {
    padding: 18px;
  }

  .project-content h3 {
    font-size: 1.08rem;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  .project-content p {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .project-meta {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .project-meta::-webkit-scrollbar {
    display: none;
  }

  .project-tag {
    white-space: nowrap;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .project-open {
    width: 100%;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
  }

  .projects-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
  }

  .projects-slider-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, width 0.25s ease;
  }

  .projects-slider-dots button.is-active {
    width: 24px;
    background: rgba(255, 255, 255, 0.88);
  }

  html[data-theme="light"] .projects-slider-dots button {
    background: rgba(17, 17, 17, 0.18);
  }

  html[data-theme="light"] .projects-slider-dots button.is-active {
    background: rgba(17, 17, 17, 0.88);
  }

  .project-modal {
    padding: 12px;
  }

  .project-modal__dialog {
    border-radius: 18px;
  }

  .project-modal__body {
    gap: 16px;
    padding: 14px;
  }

  .project-modal__image {
    max-height: 44vh;
  }

  .project-modal__content h3 {
    font-size: 1.06rem;
  }

  .project-modal__content > p,
  .project-modal__subtitle,
  .project-modal__highlights li {
    font-size: 0.9rem;
    line-height: 1.75;
  }

  .project-modal__close {
    top: 10px;
    inset-inline-end: 10px;
    width: 38px;
    height: 38px;
  }
}

/* Touch devices */
@media (hover: none) {
  .project-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--line, rgba(255, 255, 255, 0.08));
  }

  .project-card:hover::before {
    transform: translateX(-130%);
  }

  .project-card:hover .project-media img {
    transform: none;
  }

  .project-card:hover .project-media::after {
    transform: none;
    opacity: 0.8;
  }
}

@keyframes projectCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* =========================
   Desktop "Show More" for Projects
   ========================= */

.projects-more-wrap {
  display: none !important;
}

.projects-more-wrap.is-visible {
  margin-top: 18px;
  display: flex !important;
  justify-content: center;
}

.projects-more-btn {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.03);
  color: var(--text, #fff);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.projects-more-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong, rgba(255, 255, 255, 0.14));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.projects-more-btn:focus-visible {
  outline: 2px solid var(--line-strong, rgba(255, 255, 255, 0.2));
  outline-offset: 3px;
}

html[data-theme="light"] .projects-more-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #111;
}

html[data-theme="light"] .projects-more-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .projects-grid.projects-grid--collapsed .project-card--extra {
    display: none;
  }
}

@media (max-width: 767px) {
  .projects-more-wrap,
  .projects-more-wrap.is-visible {
    display: none !important;
  }
}

/* ========================================
   SIGNATURE SECTION
======================================== */
.signature-section {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 7vw, 86px);
}

.signature-section::before,
.signature-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(55px);
  opacity: 0.24;
}

.signature-section::before {
  width: 260px;
  height: 260px;
  top: -70px;
  inset-inline-start: -90px;
  background: rgba(255, 255, 255, 0.08);
}

.signature-section::after {
  width: 220px;
  height: 220px;
  bottom: -80px;
  inset-inline-end: -60px;
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .signature-section::before {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .signature-section::after {
  background: rgba(0, 0, 0, 0.035);
}

.signature-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.signature-intro {
  --pointer-x: 0;
  --pointer-y: 0;
  --eye-scale: 1;
  --smile-scale-x: 1;
  --smile-scale-y: 1;
  --smile-lift: 0px;

  position: relative;
  min-height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-md) + 4px);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: center;
}

.signature-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 35%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 36%);
}

html[data-theme="light"] .signature-intro::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 35%),
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.04), transparent 36%);
}

.signature-intro-copy,
.signature-visual {
  position: relative;
  z-index: 2;
}

.signature-intro .section-title {
  margin-bottom: 12px;
  max-width: 15ch;
}

.signature-lead {
  margin: 0;
  max-width: 54ch;
  color: var(--text-soft);
  line-height: 1.82;
  font-size: 0.98rem;
}

.signature-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.signature-badge,
.signature-step,
.signature-chip,
.signature-sticker {
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.signature-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.8rem;
}

html[data-theme="light"] .signature-badge {
  background: rgba(0, 0, 0, 0.03);
}

.signature-visual {
  position: relative;
  min-height: 180px;
  display: grid;
  place-items: center;
  perspective: 1000px;
  isolation: isolate;
}

.signature-sticker {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease-out, box-shadow 0.25s ease, opacity 0.25s ease;
  animation: stickerGlow 4.6s ease-in-out infinite;
}

html[data-theme="light"] .signature-sticker {
  background: rgba(255, 255, 255, 0.78);
}

.sticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.78;
}

.signature-sticker-one {
  top: 8%;
  inset-inline-start: 2%;
  --rotate: -9deg;
  transform: translate3d(calc(var(--pointer-x) * 8px), calc(var(--pointer-y) * -6px), 0) rotate(var(--rotate));
}

.signature-sticker-two {
  top: 18%;
  inset-inline-end: -2%;
  --rotate: 8deg;
  animation-delay: -1.4s;
  transform: translate3d(calc(var(--pointer-x) * 6px), calc(var(--pointer-y) * -5px), 0) rotate(var(--rotate));
}

.signature-sticker-three {
  bottom: 8%;
  inset-inline-start: 14%;
  --rotate: -6deg;
  animation-delay: -2.6s;
  transform: translate3d(calc(var(--pointer-x) * 10px), calc(var(--pointer-y) * -8px), 0) rotate(var(--rotate));
}

.signature-mascot {
  position: relative;
  z-index: 2;
  width: 128px;
  height: 132px;
  display: grid;
  place-items: center;
  transform:
    translate3d(calc(var(--pointer-x) * 10px), calc(var(--pointer-y) * -10px), 0)
    rotateX(calc(var(--pointer-y) * -8deg))
    rotateY(calc(var(--pointer-x) * 12deg));
  transform-style: preserve-3d;
  transition: transform 0.16s ease-out;
}

.signature-mascot,
.mascot-core,
.mascot-eye,
.mascot-mouth,
.signature-sticker {
  will-change: transform;
}

.mascot-core {
  position: relative;
  width: 98px;
  height: 98px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: mascotBob 4.8s ease-in-out infinite;
  transition: transform 0.16s ease-out;
}

html[data-theme="light"] .mascot-core {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    var(--surface);
}

.mascot-ring {
  position: absolute;
  inset: -10px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: mascotRing 12s linear infinite;
}

html[data-theme="light"] .mascot-ring {
  border-color: rgba(0, 0, 0, 0.08);
}

.mascot-screen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.mascot-eye {
  position: absolute;
  top: 38px;
  width: 16px;
  height: 10px;
  border-radius: 999px;
  background: var(--text);
  transform-origin: center;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.mascot-eye-left {
  inset-inline-start: 22px;
}

.mascot-eye-right {
  inset-inline-end: 22px;
}

.mascot-eye-left,
.mascot-eye-right {
  transform:
    translate(calc(var(--pointer-x) * 2px), calc(var(--pointer-y) * 2px))
    scaleY(var(--eye-scale));
}

.mascot-mouth {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 34px;
  height: 14px;
  border-bottom: 3px solid var(--text);
  border-radius: 0 0 999px 999px;
  transition: transform 0.22s ease;
  transform:
    translateX(-50%)
    translateY(var(--smile-lift))
    scaleX(var(--smile-scale-x))
    scaleY(var(--smile-scale-y));
}

.mascot-scan {
  position: absolute;
  inset-inline: 14px;
  top: -14px;
  height: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
  filter: blur(6px);
  animation: scanLine 2.8s ease-in-out infinite;
  opacity: 0.85;
}

html[data-theme="light"] .mascot-scan {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent);
}

.mascot-shadow {
  position: absolute;
  bottom: 6px;
  width: 84px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  filter: blur(10px);
  animation: shadowPulse 4.8s ease-in-out infinite;
}

.signature-mascot.is-blinking .mascot-eye {
  --eye-scale: 0.12;
}

.signature-mascot.is-smiling .mascot-mouth {
  --smile-scale-x: 1.18;
  --smile-scale-y: 1.12;
  --smile-lift: -2px;
}

.signature-mascot.is-curious .mascot-mouth {
  --smile-scale-x: 0.92;
  --smile-scale-y: 0.92;
  --smile-lift: 1px;
}

.signature-mascot.is-curious .mascot-ring {
  animation-duration: 7s;
}

.signature-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.signature-card {
  position: relative;
  height: 100%;
  padding: 20px;
  border-radius: calc(var(--radius-md) + 2px);
  border: 1px solid var(--line);
  overflow: hidden;
  transition:
    transform 0.32s ease,
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.signature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-120%);
  transition: transform 0.75s ease;
}

html[data-theme="light"] .signature-card::before {
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.42), transparent);
}

.signature-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.signature-card:hover::before {
  transform: translateX(120%);
}

.signature-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.signature-step,
.signature-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
}

.signature-step {
  justify-content: center;
  min-width: 48px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.signature-chip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.03em;
}

html[data-theme="light"] .signature-step {
  background: rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .signature-chip {
  background: rgba(255, 255, 255, 0.74);
}

.signature-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.signature-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.76;
  font-size: 0.94rem;
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes mascotRing {
  0% { transform: rotate(0deg) scale(1); opacity: 0.75; }
  50% { transform: rotate(180deg) scale(1.03); opacity: 0.45; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.75; }
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.2; }
  50% { transform: scaleX(0.82); opacity: 0.12; }
}

@keyframes scanLine {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 0.7; }
  50% { transform: translateY(74px); opacity: 0.95; }
  100% { transform: translateY(108px); opacity: 0; }
}

@keyframes stickerGlow {
  0%, 100% { box-shadow: var(--shadow-soft); opacity: 0.96; }
  50% { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1); opacity: 1; }
}

@media (max-width: 1100px) {
  .signature-shell {
    grid-template-columns: 1fr;
  }

  .signature-intro {
    grid-template-columns: minmax(0, 1fr) 170px;
  }
}

@media (max-width: 900px) {
  .signature-intro {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .signature-intro .section-title {
    max-width: 100%;
  }

  .signature-visual {
    min-height: 160px;
  }
}

@media (max-width: 767px) {
  .signature-section {
    padding-block: 48px 62px;
  }

  .signature-cards {
    grid-template-columns: 1fr;
  }

  .signature-card {
    padding: 18px;
  }

  .signature-lead {
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .signature-badge,
  .signature-chip,
  .signature-step {
    min-height: 32px;
    font-size: 0.75rem;
  }

  .signature-visual {
    width: 190px;
    max-width: 100%;
    min-height: 180px;
    margin-inline: auto;
  }

  .signature-mascot {
    width: 112px;
    height: 118px;
  }

  .mascot-core {
    width: 88px;
    height: 88px;
    border-radius: 24px;
  }

  .mascot-eye {
    top: 34px;
    width: 14px;
    height: 9px;
  }

  .mascot-eye-left {
    inset-inline-start: 18px;
  }

  .mascot-eye-right {
    inset-inline-end: 18px;
  }

  .mascot-mouth {
    bottom: 18px;
    width: 30px;
  }

  .signature-sticker {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .signature-sticker-one {
    top: 8%;
    inset-inline-start: 2%;
  }

  .signature-sticker-two {
    top: 18%;
    inset-inline-end: -2%;
  }

  .signature-sticker-three {
    bottom: 8%;
    inset-inline-start: 14%;
  }
}

@media (hover: none) {
  .signature-intro {
    --pointer-x: 0 !important;
    --pointer-y: 0 !important;
  }

  .signature-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--line);
  }

  .signature-card:hover::before {
    transform: translateX(-120%);
  }
}

/* ===============================
   Social Posts Centered Rail Slider
   3 Cards + Peek / Overlay Arrows
================================ */

.social-posts-section {
  --social-card-width: 300px;
  --social-embed-width: 260px;
  --social-embed-height: 350px;
  --social-gap: 16px;
  --social-viewport-width: 1038px;

  position: relative;
  overflow: hidden;
  padding-block: clamp(34px, 4vw, 54px);
}

.social-posts-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.social-posts-head__copy {
  max-width: 680px;
}

/* نخفي مكان الأسهم القديم في الهيدر، والـ JS هينقلها على السلايدر */
.social-posts-head > .social-posts-controls {
  display: none;
}

/* Wrapper بيتعمل تلقائيًا من JS حوالين السلايدر */
.social-posts-rail-wrap {
  position: relative;
  z-index: 2;
  width: min(100%, var(--social-viewport-width));
  margin-inline: auto;
}

/* Overlay Controls */
.social-posts-rail-wrap > .social-posts-controls {
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block !important;
}

/* Arrows */
.social-posts-arrow {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.78);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    opacity 0.22s ease;
}

.social-posts-arrow[data-social-prev] {
  left: 10px;
  transform: translateY(-50%);
}

.social-posts-arrow[data-social-next] {
  right: 10px;
  transform: translateY(-50%);
}

.social-posts-arrow:hover {
  background: rgba(30, 30, 30, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}

.social-posts-arrow[data-social-prev]:hover,
.social-posts-arrow[data-social-next]:hover {
  transform: translateY(-50%) scale(1.04);
}

.social-posts-arrow[hidden] {
  display: none !important;
}

/* Viewport */
.social-posts-viewport {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  direction: ltr;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
}

.social-posts-viewport::-webkit-scrollbar {
  height: 7px;
}

.social-posts-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.social-posts-viewport::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

/* Track */
.social-posts-track {
  display: flex;
  align-items: stretch;
  gap: var(--social-gap);
  width: max-content;
  min-width: 100%;
  padding: 0;
  transform: none !important;
  transition: none !important;
  will-change: auto;
}

.social-posts-track.is-centered {
  width: 100%;
  justify-content: center;
}

/* Card */
.social-post-card {
  position: relative;
  flex: 0 0 var(--social-card-width);
  width: var(--social-card-width);
  max-width: var(--social-card-width);
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.022)
    ),
    rgba(255, 255, 255, 0.026);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[lang^="ar"] .social-post-card {
  direction: rtl;
}

html:not([lang^="ar"]) .social-post-card {
  direction: ltr;
}

/* Card Top */
.social-post-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.085);
}

.social-post-platform {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.095);
}

.social-post-platform::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.social-post-featured {
  color: var(--text-soft);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Preview */
.social-post-preview {
  padding: 10px;
  background: rgba(255, 255, 255, 0.015);
}

/* Embed Frame */
.social-post-embed__frame {
  width: 100%;
  height: var(--social-embed-height);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.social-post-embed__frame iframe {
  width: var(--social-embed-width) !important;
  height: var(--social-embed-height) !important;
  max-width: 100% !important;
  border: 0 !important;
  display: block;
  overflow: hidden !important;
}

.social-post-embed__frame iframe[src*="facebook.com"],
.social-post-embed__frame iframe[src*="linkedin.com"] {
  width: var(--social-embed-width) !important;
  height: var(--social-embed-height) !important;
}

/* Image Fallback */
.social-post-preview__box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-post-preview__box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

/* Empty Fallback */
.social-post-preview__empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  line-height: 1.8;
}

/* Content */
.social-post-card__content {
  padding: 11px 12px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.085);
}

.social-post-card__content h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.social-post-card__content p {
  margin: 0 0 11px;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.social-post-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 33px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  font-size: 0.76rem;
  background: linear-gradient(135deg, #2f6df6, #6d8dff);
  box-shadow: 0 9px 20px rgba(47, 109, 246, 0.2);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.social-post-link:hover {
  transform: translateY(-2px);
  opacity: 0.96;
  box-shadow: 0 13px 26px rgba(47, 109, 246, 0.3);
}

/* Dots - Hidden */
.social-posts-dots {
  display: none;
}

/* Empty */
.social-posts-empty {
  flex: 0 0 var(--social-card-width);
  width: var(--social-card-width);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-soft);
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

/* Light Theme */
html[data-theme="light"] .social-post-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(17, 17, 17, 0.08);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .social-post-card__top,
html[data-theme="light"] .social-post-card__content {
  border-color: rgba(17, 17, 17, 0.08);
}

html[data-theme="light"] .social-post-platform {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .social-posts-arrow {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .social-posts-arrow:hover {
  background: #fff;
}

html[data-theme="light"] .social-posts-viewport {
  scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

html[data-theme="light"] .social-posts-viewport::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}

/* Tablet */
@media (max-width: 900px) {
  .social-posts-section {
    --social-card-width: 285px;
    --social-embed-width: 250px;
    --social-embed-height: 340px;
    --social-gap: 14px;
    --social-viewport-width: 668px;
  }

  .social-posts-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 16px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .social-posts-section {
    --social-card-width: 265px;
    --social-embed-width: 220px;
    --social-embed-height: 320px;
    --social-gap: 14px;
    --social-viewport-width: 324px;
    padding-block: 32px;
  }

  .social-post-featured {
    display: none;
  }

  .social-posts-arrow {
    width: 35px;
    height: 35px;
    font-size: 1.15rem;
  }

  .social-posts-arrow[data-social-prev] {
    left: 6px;
    transform: translateY(-50%);
  }

  .social-posts-arrow[data-social-next] {
    right: 6px;
    transform: translateY(-50%);
  }

  .social-posts-arrow[data-social-prev]:hover,
  .social-posts-arrow[data-social-next]:hover {
    transform: translateY(-50%) scale(1.04);
  }

  .social-posts-rail-wrap > .social-posts-controls {
    padding-inline: 4px;
  }
}
/* ========================================
   شهاداتd
======================================== */


.certificates-section {
  position: relative;
}

.certificates-section .container {
  position: relative;
  overflow: visible;
}

.certificates-header {
  max-width: 720px;
  margin-bottom: 22px;
}

.certificates-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.certificates-header h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  line-height: 1.3;
}

.certificates-intro {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.85;
}

/* ========================================
   CERTIFICATES SLIDER
   خطوة بخطوة - بدون حركة مستمرة
======================================== */

.certificates-list {
  display: flex;
  gap: 20px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.certificates-list::-webkit-scrollbar {
  display: none;
}

/* لو عدد الشهادات قليل، يفضل شكل Grid طبيعي */
.certificates-list.certificates-list--static {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  overflow: visible;
  scroll-snap-type: none;
}

.certificates-list.certificates-list--static .certificate-card {
  flex: initial;
  width: auto;
  scroll-snap-align: none;
}

.certificate-card {
  flex: 0 0 calc((100% - 40px) / 3);
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.certificate-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

/* ========================================
   CERTIFICATE CARD CONTENT
======================================== */

.certificate-media {
  position: relative;
}

.certificate-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  overflow: hidden;
}

.certificate-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.certificate-preview:hover .certificate-image {
  transform: scale(1.04);
}

.certificate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.56),
    rgba(0, 0, 0, 0.12) 45%,
    rgba(0, 0, 0, 0.02)
  );
  pointer-events: none;
}

.certificate-overlay__text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.certificate-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.certificate-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.45;
}

.certificate-description {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.8;
}


/* ========================================
   CERTIFICATES SLIDER CONTROLS
======================================== */

.certificates-slider-btn {
  position: absolute;
  top: 58%;
  z-index: 20;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.certificates-slider-btn:hover {
  transform: translateY(-50%) scale(1.05);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--surface-strong) 100%, transparent);
  box-shadow: var(--shadow);
}

.certificates-slider-btn:focus-visible {
  outline: 2px solid var(--line-strong);
  outline-offset: 3px;
}

.certificates-slider-btn--prev {
  inset-inline-start: -24px;
  transform: translateY(-50%);
}

.certificates-slider-btn--next {
  inset-inline-end: -24px;
  transform: translateY(-50%);
}

.certificates-slider-btn[hidden] {
  display: none;
}

.certificates-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.certificates-slider-dots[hidden] {
  display: none;
}

.certificates-slider-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.certificates-slider-dots button.is-active {
  width: 24px;
  background: rgba(255, 255, 255, 0.88);
}

/* ========================================
   CERTIFICATE MODAL
======================================== */

.certificate-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.certificate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.certificate-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 15, 17, 0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.certificate-modal__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.certificate-modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.04);
}

.certificate-modal__body {
  padding: 20px;
}

.certificate-modal__image-wrap {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.certificate-modal__image {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.certificate-modal__content {
  padding-top: 16px;
}

.certificate-modal__content h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.5;
}

.certificate-modal__content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.85;
  font-size: 0.95rem;
}

/* ========================================
   LIGHT THEME
======================================== */

html[data-theme="light"] .certificate-card {
  background: rgba(0, 0, 0, 0.015);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .certificate-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .certificates-slider-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .certificates-slider-dots button {
  background: rgba(17, 17, 17, 0.18);
}

html[data-theme="light"] .certificates-slider-dots button.is-active {
  background: rgba(17, 17, 17, 0.88);
}

html[data-theme="light"] .certificate-modal__backdrop {
  background: rgba(245, 245, 245, 0.35);
}

html[data-theme="light"] .certificate-modal__dialog {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .certificate-modal__close {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

html[data-theme="light"] .certificate-modal__content h3 {
  color: #111;
}

html[data-theme="light"] .certificate-modal__content p {
  color: rgba(17, 17, 17, 0.72);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1100px) {
  .certificates-list {
    gap: 18px;
  }

  .certificate-card {
    flex-basis: calc((100% - 18px) / 2);
  }

  .certificates-slider-btn--prev {
    inset-inline-start: -14px;
  }

  .certificates-slider-btn--next {
    inset-inline-end: -14px;
  }
}

@media (max-width: 720px) {
  .certificates-header {
    margin-bottom: 18px;
  }

  .certificates-list {
    gap: 12px;
    padding-bottom: 10px;
  }

  .certificate-card {
    flex: 0 0 clamp(260px, 84vw, 340px);
    border-radius: 16px;
  }

  .certificate-card:hover {
    transform: none;
  }

  .certificate-preview:active .certificate-image {
    transform: scale(1.02);
  }

  .certificate-content {
    padding: 14px;
  }

  .certificate-title {
    font-size: 0.98rem;
  }

  .certificate-description {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  .certificate-overlay {
    padding: 10px;
  }

  .certificate-overlay__text {
    font-size: 0.74rem;
    padding: 7px 10px;
  }

  .certificates-slider-btn {
    top: 60%;
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }

  .certificates-slider-btn--prev {
    inset-inline-start: 6px;
  }

  .certificates-slider-btn--next {
    inset-inline-end: 6px;
  }

  .certificate-modal {
    padding: 12px;
  }

  .certificate-modal__dialog {
    border-radius: 18px;
  }

  .certificate-modal__body {
    padding: 14px;
  }

  .certificate-modal__image {
    max-height: 52vh;
  }

  .certificate-modal__content {
    padding-top: 12px;
  }

  .certificate-modal__content h3 {
    font-size: 1rem;
  }

  .certificate-modal__content p {
    font-size: 0.9rem;
    line-height: 1.75;
  }

  .certificate-modal__close {
    top: 10px;
    inset-inline-end: 10px;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .certificate-card {
    flex-basis: 88%;
    border-radius: 15px;
  }

  .certificate-content {
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .certificates-list {
    scroll-behavior: auto;
  }

  .certificate-card,
  .certificate-image,
  .certificates-slider-btn,
  .certificates-slider-dots button {
    transition: none;
  }
}
/* ========================================
   SKILLS SECTION
======================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.skill-card {
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--line);
  min-height: 100%;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.skill-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  transform: translateY(-2px);
}

.skill-card h3 {
  margin: 0 0 8px;
  font-size: 1.14rem;
  line-height: 1.4;
  color: var(--text);
}

.skill-card__head {
  margin-bottom: 14px;
}

.skill-card__head p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 0.95rem;
}

.skill-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-row {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.skill-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.skill-label span {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 500;
}

.skill-label strong {
  color: var(--text);
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.skill-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .skill-track {
  background: rgba(0, 0, 0, 0.08);
}

.skill-track span {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.98));
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}

.skill-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0.34) 52%,
    transparent 64%
  );
  animation: skill-shine 2.8s linear infinite;
}

html[data-theme="light"] .skill-track span {
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.28), rgba(17, 17, 17, 1));
  box-shadow: 0 0 12px rgba(17, 17, 17, 0.12);
}

.skill-card.is-visible .skill-track span {
  width: var(--level);
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .skill-card {
  background: rgba(0, 0, 0, 0.015);
}

html[data-theme="light"] .skill-card:hover {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.025);
}

html[data-theme="light"] .skill-row {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .skill-label strong {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .chip {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .chip:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

@keyframes skill-shine {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@media (max-width: 1100px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .skills-grid {
    gap: 14px;
  }

  .skill-card {
    padding: 16px;
  }

  .skill-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .skill-card__head {
    margin-bottom: 12px;
  }

  .skill-card__head p {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .skill-rows {
    gap: 10px;
  }

  .skill-row {
    padding: 8px 10px;
    gap: 7px;
  }

  .skill-label {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .skill-label span {
    font-size: 0.9rem;
  }

  .skill-label strong {
    font-size: 0.76rem;
    padding: 3px 7px;
  }

  .skill-track {
    height: 7px;
  }

  .chip-cloud {
    gap: 6px;
  }

  .chip {
    font-size: 0.76rem;
    padding: 6px 9px;
  }
}

@media (max-width: 480px) {
  .skill-card {
    padding: 14px;
  }

  .skill-label {
    flex-direction: column;
    align-items: flex-start;
  }

  .chip {
    width: 100%;
    justify-content: center;
  }
}
.skill-card--tools {
  display: flex;
  flex-direction: column;
}

.skill-card--tools .chip-cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(58px, 1fr);
  gap: 12px;
  flex: 1;
  align-content: stretch;
}

.skill-card--tools .chip {
  width: 100%;
  height: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 16px;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
  font-size: 0.88rem;
}

/* لو عدد العناصر فردي، آخر عنصر ياخد العرض كامل */
.skill-card--tools .chip:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .skill-card--tools .chip-cloud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(52px, 1fr);
    gap: 10px;
  }

  .skill-card--tools .chip {
    min-height: 52px;
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .skill-card--tools .chip-cloud {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(48px, auto);
  }

  .skill-card--tools .chip:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  padding-top: 30px;
}

.footer-inner {
  border-radius: var(--radius-md);
  padding: 34px;
  overflow: hidden;
  position: relative;
}

.footer-inner::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.footer-copy h2 {
  margin: 14px 0 14px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.footer-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 2;
  height: auto;
}

/* Contact buttons */
.contact-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-actions .contact-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: brightness(1.8) contrast(1.1);
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .footer-inner {
    padding: 20px;
  }

  .footer-copy h2 {
    font-size: 2rem;
    line-height: 1.25;
  }

  .footer-copy p {
    line-height: 1.8;
    margin-bottom: 6px;
  }

  .contact-actions {
    margin-top: 22px;
    gap: 10px;
  }

  .contact-actions .contact-btn {
    width: 100%;
  }

  .footer-bottom {
    align-items: flex-start;
  }

  .footer-brand {
    align-items: flex-start;
  }
}


/* ========================================
   PROJECT MODAL
======================================== */
.project-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 2000;
}

.project-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.project-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.project-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 10px));
  max-height: min(88vh, 900px);
  overflow-y: auto;
  border-radius: 28px;
  border: 1px solid var(--line);
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-slow);
}

.project-modal.is-active .project-modal__dialog {
  transform: translateY(0) scale(1);
}

.project-modal__content {
  padding: 34px;
}

.project-modal__content h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.project-modal__close {
  position: absolute;
  inset-inline-end: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 1.4rem;
}

html[data-theme="light"] .project-modal__close {
  background: rgba(0, 0, 0, 0.05);
}

.project-modal__subtitle {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 1rem;
}

.project-modal__description {
  margin: 0 0 22px;
  color: var(--text-soft);
  line-height: 1.85;
}

.project-modal__block + .project-modal__block {
  margin-top: 24px;
}

.project-modal__block h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.88rem;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

html[data-theme="light"] .modal-tags span {
  background: rgba(0, 0, 0, 0.02);
}

.modal-tags span:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: var(--line-strong);
}

.modal-list {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--text-soft);
  line-height: 1.9;
  display: grid;
  gap: 10px;
}

html[dir="rtl"] .modal-list {
  padding-inline-start: 0;
  padding-inline-end: 20px;
}

@media (max-width: 720px) {
  .project-modal {
    padding: 12px;
  }

  .project-modal__content {
    padding: 20px;
  }

  .project-modal__close {
    top: 12px;
    inset-inline-end: 12px;
  }
}

/* ========================================
   BACK TO TOP
======================================== */
.back-top {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1200;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 520px) {
  .back-top {
    inset-inline-end: 12px;
    bottom: 12px;
  }
}

/* ========================================
   GLOBAL RESPONSIVE
======================================== */
@media (max-width: 1100px) {
  .floating-card-left {
    inset-inline-start: -52px;
  }

  .floating-card-right {
    inset-inline-end: -52px;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 90px 0;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 100%);
  }

  .hero-title {
    letter-spacing: -0.03em;
  }

  .section-title,
  .footer-copy h2 {
    letter-spacing: -0.02em;
  }
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes panelRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scanMove {
  0% {
    inset-inline-start: -45%;
  }
  100% {
    inset-inline-start: 125%;
  }
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transform: scale(1);
  }
}

@keyframes rowIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pulseLine {
  0%,
  100% {
    stroke-opacity: 0.82;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0.2));
  }
  50% {
    stroke-opacity: 1;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.4));
  }
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -16px, 0);
  }
}

@keyframes floatAlt {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(12px, -14px, 0) rotate(2deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes scrollDot {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 24px);
  }
}

@keyframes scan {
  0% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(240%);
  }
}

/* ========================================
   REDUCED MOTION
======================================== */
@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;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
/* ===============================
   Public Library Section - Clean Compact
================================ */

.library-section {
  position: relative;
  padding: 70px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 32%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.035), transparent 28%);
}

.library-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.library-section .section-head {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto 28px;
}

.library-section .section-head .eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #a7a7a7;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.library-section .section-head h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.25;
  font-weight: 900;
}

.library-section .section-head p {
  max-width: 760px;
  margin: 0;
  color: #c7c7c7;
  font-size: 0.98rem;
  line-height: 1.9;
  font-weight: 600;
}

/* Grid */
.library-grid {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 240px));
  justify-content: flex-end;
  align-items: stretch;
  gap: 18px;
}

html[lang="en"] .library-grid {
  justify-content: flex-start;
}

/* Empty / Loading */
.library-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border-radius: 22px;
  text-align: center;
  color: #bdbdbd;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

/* Book Card */
.library-card {
  position: relative;
  width: 100%;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 14px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.library-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.36);
}

.library-card.is-featured::after {
  content: "مميز";
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
  font-size: 0.68rem;
  font-weight: 900;
}

html[lang="en"] .library-card.is-featured::after {
  content: "Featured";
}

/* Cover */
.library-cover {
  width: 100%;
  height: 255px;
  margin-bottom: 14px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.library-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Content */
.library-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.library-content h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 900;
}

.library-content p {
  margin: 0 0 12px;
  color: #c6c6c6;
  line-height: 1.75;
  font-size: 0.86rem;
  font-weight: 600;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta: Author + Pages Only */
.library-meta {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 6px;
  margin: 0 0 12px;
}

.library-meta span {
  display: none;
}

/* اسم الكاتب */
.library-meta span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* عدد الصفحات */
.library-meta span:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Actions */
.library-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.library-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.82rem;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.library-actions a:hover {
  transform: translateY(-2px);
}

.library-read-btn {
  background: #ffffff;
  color: #050505;
}

.library-download-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.library-download-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 1050px) {
  .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 240px));
  }
}

@media (max-width: 680px) {
  .library-section {
    padding: 60px 16px;
  }

  .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    justify-content: center;
  }

  .library-card {
    max-width: 100%;
  }

  .library-cover {
    height: 260px;
  }

  .library-actions {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Public Library - Light Mode Fix
   ضع هذا الكود في آخر style.css
================================ */

html[data-theme="light"] .library-section {
  background:
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.045), transparent 32%),
    radial-gradient(circle at bottom left, rgba(0, 0, 0, 0.035), transparent 28%),
    #f4f4f4;
}

html[data-theme="light"] .library-section::before {
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
}

html[data-theme="light"] .library-section .section-head h2 {
  color: #111111;
}

html[data-theme="light"] .library-section .section-head p,
html[data-theme="light"] .library-section .section-head .eyebrow {
  color: #555555;
}

/* Card */
html[data-theme="light"] .library-card {
  background:
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.045), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 245, 0.92));
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .library-card:hover {
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.16);
}

/* Featured Badge */
html[data-theme="light"] .library-card.is-featured::after {
  background: #111111;
  color: #ffffff;
}

/* Cover */
html[data-theme="light"] .library-cover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Text */
html[data-theme="light"] .library-content h3 {
  color: #111111;
}

html[data-theme="light"] .library-content p {
  color: #4b4b4b;
}

/* Meta: Author + Pages */
html[data-theme="light"] .library-meta span:first-child,
html[data-theme="light"] .library-meta span:last-child {
  color: #222222;
  background: rgba(0, 0, 0, 0.045);
  border-color: rgba(0, 0, 0, 0.09);
}

/* Buttons */
html[data-theme="light"] .library-read-btn {
  background: #111111;
  color: #ffffff;
  border: 1px solid #111111;
}

html[data-theme="light"] .library-download-btn {
  background: rgba(0, 0, 0, 0.045);
  color: #111111;
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .library-download-btn:hover {
  background: rgba(0, 0, 0, 0.075);
}

/* Empty State */
html[data-theme="light"] .library-empty {
  color: #555555;
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.14);
}
/* ===============================
   Footer WhatsApp Button - Light Mode Fix
================================ */

html[data-theme="light"] .site-footer .contact-actions .contact-btn--ghost {
  background: #111111 !important;
  color: #ffffff !important;
  border: 1px solid #111111 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .site-footer .contact-actions .contact-btn--ghost svg {
  fill: currentColor !important;
  color: #ffffff !important;
}

html[data-theme="light"] .site-footer .contact-actions .contact-btn--ghost:hover {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}