/* ============================================================
   Portfolio — Final Edition (with i18n support)
   ============================================================ */
:root {
  color-scheme: light;
  --cream: #faf7f2;
  --sand: #f0ebe3;
  --sand-deep: #e8e0d4;
  --ink: #1f2937;
  --ink-fixed: #1f2937;
  --ink-soft: #374151;
  --slate: #566070;
  --slate-light: #6b7280;
  --border: #e5ddd1;
  --border-soft: #efe8de;

  --terracotta: #c2582c;
  --terracotta-d: #a8451e;
  --terracotta-l: #f4e6de;
  --accent: #a8451e;
  --accent-hover: #a8451e;
  --sage: #7c8c6e;
  --sage-d: #566548;
  --sage-l: #e8ede3;
  --gold: #b8894a;
  --gold-l: #f5ecdc;
  --success: #3f6e4d;
  --danger: #b0453a;

  --surface-elevated: #fff;
  --overlay-bg: rgba(250, 247, 242, .78);
  --overlay-bg-solid: rgba(250, 247, 242, .94);
  --shadow-xs: 0 1px 2px rgba(31, 41, 55, .04);
  --shadow-sm: 0 2px 8px rgba(31, 41, 55, .06);
  --shadow-md: 0 6px 20px rgba(31, 41, 55, .08);
  --shadow-lg: 0 16px 40px rgba(31, 41, 55, .10);

  --font-body: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-head: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, Tahoma, sans-serif;
  --container: 1200px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --footer-text: rgba(255, 255, 255, .75);
  --on-dark: #e8895a;
  --t: .25s cubic-bezier(.4, 0, .2, 1);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --section-pad: clamp(48px, 8vw, 110px);
  --container-pad: clamp(16px, 4vw, 28px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --cream: #1a1714;
  --sand: #221e1a;
  --sand-deep: #2a2520;
  --ink: #f5f0e8;
  --ink-soft: #e5ddd1;
  --slate: #b0a89c;
  --slate-light: #9a9286;
  --border: #35302a;
  --border-soft: #2a2520;
  --terracotta: #e07a4a;
  --terracotta-d: #c66038;
  --terracotta-l: #3a2519;
  --accent: #e8895a;
  --accent-hover: #e07a4a;
  --sage: #94a883;
  --sage-d: #94a883;
  --sage-l: #2a3226;
  --gold: #d4a05e;
  --gold-l: #3a2f1c;
  --success: #6fa87e;
  --danger: #e0837a;
  --surface-elevated: #221e1a;
  --overlay-bg: rgba(26, 23, 20, .8);
  --overlay-bg-solid: rgba(26, 23, 20, .95);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .65);
}

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto
}

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

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

input,
textarea {
  font: inherit
}

ul,
ol {
  list-style: none
}

::selection {
  background: var(--terracotta-l);
  color: var(--accent)
}

main:focus {
  outline: none
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px
}

.skip-link {
  position: fixed;
  top: -100px;
  right: 16px;
  z-index: 2000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  transition: top .2s
}

.skip-link:focus {
  top: 0
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  white-space: nowrap
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  text-align: left
}

/* ---------- 3. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(var(--container-pad), env(safe-area-inset-left));
  padding-right: max(var(--container-pad), env(safe-area-inset-right))
}

.section {
  padding-block: var(--section-pad);
  position: relative
}

.section--sand {
  background: var(--sand)
}

em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 700
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-head);
  transition: var(--t);
  white-space: nowrap;
  border: 1.5px solid transparent;
  max-width: 100%
}

.btn--sm {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px
}

.btn--full {
  width: 100%
}

.btn--primary {
  background: var(--ink);
  color: var(--cream)
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(194, 88, 44, .25)
}

[data-theme="dark"] .btn--primary:hover {
  color: #1a1714
}

.btn--outline {
  color: var(--ink);
  border-color: var(--border)
}

.btn--outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream)
}

.btn:disabled {
  opacity: .65;
  cursor: progress;
  transform: none
}

/* ---------- 5. Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 24px;
  max-width: 100%;
  flex-wrap: wrap
}

.eyebrow--plain {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, .18);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .6
  }
}

/* ---------- 6. Topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  padding-top: max(14px, env(safe-area-inset-top));
  transition: var(--t);
  background: var(--overlay-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent
}

.topbar.scrolled {
  padding-block: 10px;
  background: var(--overlay-bg-solid);
  border-bottom-color: var(--border)
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0
}

.brand__text {
  min-width: 0
}

.brand__text strong {
  display: block;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap
}

.brand__text small {
  display: block;
  font-size: 14px;
  color: var(--slate);
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%
}

@media (max-width: 640px) {
  .brand__text strong {
    font-size: 13px
  }

  .brand__text small {
    font-size: 11px;
    line-height: 1.2
  }
}

@media (max-width: 400px) {
  .brand__text strong {
    font-size: 12px
  }

  .brand__text small {
    font-size: 10px
  }
}

.nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-xs);
  white-space: nowrap
}

.nav__link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  transition: var(--t);
  font-family: var(--font-head)
}

.nav__link:hover {
  color: var(--ink)
}

.nav__link.active {
  background: var(--ink);
  color: var(--cream)
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  transition: var(--t);
  position: relative;
  overflow: hidden;
  flex-shrink: 0
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm)
}

.theme-toggle__icon {
  position: absolute;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1), opacity .3s ease
}

.theme-toggle__icon--sun {
  opacity: 1
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(90deg) scale(.5)
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(.5)
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: none
}

.lang-toggle {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  transition: var(--t);
  flex-shrink: 0
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm)
}

.lang-toggle__label {
  line-height: 1
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  flex-shrink: 0
}

.burger span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--t)
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg)
}

.burger.open span:nth-child(2) {
  opacity: 0
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg)
}

/* ---------- 7. Hero ---------- */
.hero {
  padding-top: clamp(100px, 14vw, 160px);
  position: relative;
  overflow: hidden
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .35
}

.hero__glow--1 {
  width: 500px;
  height: 500px;
  background: var(--terracotta-l);
  top: -180px;
  right: -140px
}

.hero__glow--2 {
  width: 420px;
  height: 420px;
  background: var(--gold-l);
  top: 40%;
  left: -120px;
  opacity: .6
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px), linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: .6
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-bottom: clamp(60px, 8vw, 100px);
  position: relative;
  z-index: 1
}

.hero__content {
  min-width: 0
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(30px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 28px
}

.hero__title em {
  display: inline-block;
  position: relative;
  z-index: 0
}

.hero__title em::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--terracotta-l);
  z-index: -1;
  border-radius: 4px
}

.hero__lead {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.9;
  color: var(--slate);
  max-width: 520px;
  margin-bottom: 28px
}

.hero__promises {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px
}

.hero__promises li {
  font-size: clamp(14px, 1.2vw, 15px);
  color: var(--ink-soft);
  line-height: 1.6;
  position: relative;
  padding-right: 30px
}

.hero__promises li::before {
  content: '✓';
  position: absolute;
  right: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sage-l);
  color: var(--sage-d);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap
}

.meta-item {
  min-width: 0
}

.meta-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3
}

.meta-item span {
  font-size: 14px;
  color: var(--slate)
}

.hero__meta .divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0
}

.hero__visual {
  position: relative;
  min-height: clamp(320px, 40vw, 480px);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center
}

.portrait-card {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 360px;
  width: 100%;
  margin: 0 auto
}

.portrait-card__avatar {
  width: clamp(96px, 12vw, 120px);
  height: clamp(96px, 12vw, 120px);
  border-radius: 50%;
  margin: 0 auto 20px;
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-md);
  overflow: hidden;
  background: var(--sand)
}

.portrait-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease
}

.portrait-card:hover .portrait-card__avatar img {
  transform: scale(1.05)
}

.portrait-card__name {
  font-family: var(--font-head);
  font-size: clamp(18px, 1.6vw, 20px);
  font-weight: 700;
  margin-bottom: 4px
}

.portrait-card__role {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 18px
}

/* ---------- Portrait card: education ---------- */
.portrait-card__education {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.portrait-card__edu-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

html[dir="rtl"] .portrait-card__edu-label {
  letter-spacing: 0
}

.portrait-card__edu-school {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
}

.portrait-card__edu-major {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 12px;
}

.portrait-card__edu-gpa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--terracotta-l);
  border: 1px solid rgba(194, 88, 44, .2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-head);
}

.portrait-card__edu-gpa strong {
  font-size: 14px;
  font-weight: 700;
}

.portrait-card__badge {
  position: absolute;
  top: -14px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--sage-d);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-head);
  box-shadow: var(--shadow-sm)
}

[data-theme="dark"] .portrait-card__badge {
  color: #1a1714
}

.portrait-card__badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding: 20px 0;
  background: var(--cream);
  position: relative;
  z-index: 1
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite
}

.marquee:hover .marquee__track {
  animation-play-state: paused
}

.marquee__group {
  display: flex;
  gap: 40px;
  padding-right: 40px;
  flex-shrink: 0
}

.marquee__group span {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  white-space: nowrap
}

.marquee__group span:nth-child(even) {
  color: var(--accent)
}

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

/* ---------- 8. Section heads ---------- */
.section__head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 64px)
}

.section__head--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  max-width: 100%;
  flex-wrap: wrap
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(25px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px
}

.section__sub {
  font-size: clamp(15px, 1.3vw, 16px);
  color: var(--slate);
  max-width: 560px
}

/* ---------- 9. About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start
}

.about__text {
  min-width: 0
}

.about__text .lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 24px
}

.about__text .lead strong {
  color: var(--ink);
  background: var(--gold-l);
  padding: 0 4px
}

.about__text>p:not(.lead) {
  color: var(--slate);
  line-height: 1.85;
  margin-bottom: 20px
}

.about__highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 14px;
  margin-top: 34px
}

.highlight {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(16px, 2.5vw, 22px) clamp(14px, 2vw, 18px);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--t)
}

.highlight:hover {
  border-color: var(--terracotta);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md)
}

.highlight__num {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px
}

.highlight__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--sand);
  color: var(--accent);
  margin-bottom: 15px
}

.highlight h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 8px
}

.highlight p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.8
}

.about__side {
  min-width: 0
}

.skill-block {
  padding: clamp(20px, 3vw, 30px) clamp(18px, 2.5vw, 26px);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm)
}

.skill-block__title {
  font-family: var(--font-head);
  font-size: clamp(16px, 1.4vw, 17px);
  font-weight: 700;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border)
}

.tech-group {
  padding: 19px 0;
  border-bottom: 1px solid var(--border)
}

.tech-group:last-child {
  padding-bottom: 0;
  border-bottom: none
}

.tech-group__label {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--sand);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  transition: var(--t)
}

.tech-tag:hover {
  background: var(--gold-l);
  border-color: var(--terracotta);
  color: var(--ink)
}

/* ---------- 10. Filters ---------- */
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 100%
}

.filter {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  transition: var(--t);
  font-family: var(--font-head);
  white-space: nowrap
}

.filter:hover {
  color: var(--ink)
}

.filter.active {
  background: var(--ink);
  color: var(--cream)
}

/* ---------- 11. Projects ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(16px, 2.2vw, 24px)
}

.project {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.project:hover {
  transform: translateY(-6px);
  border-color: var(--sand-deep);
  box-shadow: var(--shadow-lg)
}

.project.hidden {
  display: none
}

.project__thumb {
  height: clamp(160px, 22vw, 200px);
  padding: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.project__thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 24px 24px
}

.project__num {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .85);
  z-index: 1
}

.project__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, .95);
  color: #a8451e;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  white-space: nowrap
}

.project__glyph {
  position: relative;
  z-index: 1;
  transition: var(--t)
}

.project:hover .project__glyph {
  transform: scale(1.08) rotate(-3deg)
}

.project__thumb--terracotta {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .15), transparent 60%), #b24f25
}

.project__thumb--sage {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .15), transparent 60%), #6b7b5d
}

.project__thumb--gold {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .15), transparent 60%), #a47a3c
}

.project__thumb--ink {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .08), transparent 60%), var(--ink-fixed)
}

[data-theme="dark"] .project__thumb--ink {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .08), transparent 60%), #2c3646
}

.project__body {
  padding: clamp(18px, 2.5vw, 26px) clamp(16px, 2.2vw, 24px);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.project__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  flex-wrap: wrap
}

.project__cat {
  color: var(--accent)
}

.project__year {
  color: var(--slate-light);
  font-weight: 500
}

.project__title {
  font-family: var(--font-head);
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4
}

.project__desc {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.8;
  flex: 1
}

.project__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px
}

.project__tech li {
  padding: 4px 10px;
  background: var(--sand);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  font-family: var(--font-head)
}

.design-cta {
  margin-top: 48px;
  padding: clamp(20px, 3vw, 32px) clamp(18px, 3vw, 36px);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap
}

.design-cta p {
  font-family: var(--font-head);
  font-size: clamp(16px, 1.4vw, 17px);
  font-weight: 600
}

/* ---------- 12. Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--border)
}

.service {
  padding: clamp(24px, 4vw, 44px) clamp(18px, 3.5vw, 40px);
  border-bottom: 1px solid var(--border);
  transition: var(--t);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  min-width: 0
}

.service:nth-child(odd) {
  border-left: 1px solid var(--border)
}

.service:nth-child(n+3) {
  border-bottom: none
}

.service:hover {
  background: var(--sand)
}

.service:hover .service__icon {
  background: var(--terracotta);
  color: #fff;
  transform: translateY(-4px) rotate(-3deg);
  box-shadow: 0 8px 20px rgba(194, 88, 44, .3)
}

.service__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px
}

.service__num {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 6px
}

.service__icon {
  display: grid;
  place-items: center;
  width: clamp(48px, 5vw, 56px);
  height: clamp(48px, 5vw, 56px);
  border-radius: 14px;
  background: var(--sand);
  color: var(--accent);
  transition: var(--t);
  flex-shrink: 0
}

.service h3 {
  font-family: var(--font-head);
  font-size: clamp(19px, 1.8vw, 22px);
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.4
}

.service__pain {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.7;
  padding: 12px 16px;
  background: var(--terracotta-l);
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--terracotta);
  margin-bottom: 16px
}

.service__desc {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.85;
  margin-bottom: 18px;
  flex: 1
}

.service__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  margin-bottom: 20px;
  border-top: 1px dashed var(--border)
}

.service__list li {
  font-size: 14px;
  padding: 5px 12px;
  background: var(--sand-deep);
  color: var(--ink-soft);
  border-radius: 999px;
  font-weight: 500;
  font-family: var(--font-head)
}

.service:hover .service__list li {
  background: var(--cream)
}

.service__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-head);
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  transition: var(--t);
  width: 100%
}

.service__cta:hover {
  color: var(--accent)
}

.service__cta svg {
  transition: var(--t);
  flex-shrink: 0
}

.service__cta:hover svg {
  transform: translateX(-4px)
}

/* ---------- 13. Process ---------- */
.process {
  padding: clamp(24px, 4vw, 56px) clamp(18px, 3.5vw, 44px);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden
}

.process::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--terracotta-l), transparent 70%);
  opacity: .5;
  pointer-events: none
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
  position: relative;
  z-index: 1
}

.process__step {
  position: relative;
  padding-top: 28px;
  min-width: 0
}

.process__step::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to left, var(--terracotta), var(--gold))
}

.process__step-num {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 4px 10px;
  background: var(--terracotta-l);
  border-radius: 999px
}

.process__step-body h3 {
  font-family: var(--font-head);
  font-size: clamp(16px, 1.4vw, 17px);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.5
}

.process__step-body p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.8
}

/* ---------- 14. Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(14px, 2.2vw, 24px)
}

.why-card {
  padding: clamp(20px, 3vw, 32px) clamp(16px, 2.5vw, 28px);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--t);
  display: flex;
  flex-direction: column;
  min-width: 0
}

.why-card:hover {
  border-color: var(--terracotta);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md)
}

.why-card__num {
  align-self: flex-start;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 10px;
  background: var(--terracotta-l);
  border-radius: 999px;
  margin-bottom: 18px
}

.why-card h3 {
  font-family: var(--font-head);
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5
}

.why-card p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.85
}

/* ---------- 15. FAQ ---------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px
}

.faq-item {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--t);
  overflow: hidden
}

.faq-item[open] {
  border-color: var(--terracotta);
  box-shadow: var(--shadow-sm)
}

.faq-item summary {
  min-height: 56px;
  padding: clamp(14px, 2.5vw, 20px) clamp(16px, 2.8vw, 26px);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: clamp(15px, 1.3vw, 16px);
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  line-height: 1.6
}

.faq-item summary::-webkit-details-marker {
  display: none
}

.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1
}

.faq-item[open] summary::after {
  content: '−'
}

.faq-item summary:hover {
  background: var(--sand)
}

.faq-item p {
  padding: 0 clamp(16px, 2.8vw, 26px) clamp(16px, 2.5vw, 22px);
  font-size: 15px;
  color: var(--slate);
  line-height: 1.9
}

/* ---------- 16. Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: start
}

.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(124, 140, 110, .12);
  border: 1px solid rgba(124, 140, 110, .3);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: var(--sage-d);
  max-width: 100%
}

.contact-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage-d);
  box-shadow: 0 0 0 3px rgba(124, 140, 110, .2);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0
}

.info-card {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 16px);
  padding: clamp(14px, 2vw, 20px) clamp(14px, 2.2vw, 22px);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--t);
  min-width: 0
}

a.info-card:hover {
  border-color: var(--terracotta);
  transform: translateX(-4px);
  box-shadow: var(--shadow-md)
}

.info-card__num {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 26px
}

.info-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--sand);
  color: var(--accent);
  flex-shrink: 0
}

.info-card__body {
  min-width: 0;
  flex: 1
}

.info-card__body strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 3px
}

.info-card__value {
  display: block;
  font-size: clamp(14px, 1.2vw, 15px);
  font-weight: 500;
  overflow-wrap: anywhere
}

.contact__social {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap
}

.contact__social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  transition: var(--t);
  font-family: var(--font-head)
}

.contact__social a:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  transform: translateY(-2px)
}

.contact__promise {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-top: 12px;
  background: var(--terracotta-l);
  border: 1px solid rgba(194, 88, 44, .25);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 500;
  max-width: 100%
}

.contact__promise-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0
}

.form {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 40px);
  box-shadow: var(--shadow-sm);
  min-width: 0
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px)
}

.form__group {
  margin-bottom: 22px;
  min-width: 0
}

.form__group label {
  display: block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px
}

.form__group input,
.form__group textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--ink);
  transition: var(--t);
  resize: vertical
}

.form__group input::placeholder,
.form__group textarea::placeholder {
  color: var(--slate-light)
}

.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: var(--surface-elevated);
  box-shadow: 0 0 0 4px var(--terracotta-l)
}

.form__group .error {
  border-color: var(--danger)
}

.form__error {
  display: block;
  color: var(--danger);
  font-size: 14px;
  margin-top: 6px;
  min-height: 20px;
  font-weight: 500
}

.form__status {
  margin-top: 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  min-height: 24px
}

.form__status.success {
  color: var(--success)
}

.form__status.error {
  color: var(--danger)
}

.form__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none
}

/* ---------- 17. Footer ---------- */
.footer {
  position: relative;
  background: var(--ink-fixed);
  color: #e8e0d4;
  padding: 0 0 32px;
  overflow: hidden;
  isolation: isolate
}

[data-theme="dark"] .footer {
  background: #12100e
}

.footer__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden
}

.footer__decor span {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .18
}

.footer__decor span:nth-child(1) {
  width: 420px;
  height: 420px;
  background: #c2582c;
  top: -180px;
  right: -100px
}

.footer__decor span:nth-child(2) {
  width: 360px;
  height: 360px;
  background: #b8894a;
  bottom: -160px;
  left: -80px;
  opacity: .12
}

.footer__decor span:nth-child(3) {
  width: 280px;
  height: 280px;
  background: #7c8c6e;
  top: 40%;
  left: 45%;
  opacity: .1
}

.footer .container {
  position: relative;
  z-index: 1
}

.footer__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3.5vw, 44px) clamp(18px, 3.5vw, 40px);
  margin-bottom: clamp(32px, 5vw, 60px);
  background: linear-gradient(135deg, rgba(194, 88, 44, .14), rgba(184, 137, 74, .08));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  transform: translateY(-1px)
}

.footer__cta-text {
  min-width: 0;
  flex: 1 1 260px
}

.footer__cta-text h2 {
  font-family: var(--font-head);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 8px
}

.footer__cta-text h2 em {
  color: var(--on-dark)
}

.footer__cta-text p {
  font-size: 15px;
  color: rgba(255, 255, 255, .85);
  max-width: 480px
}

.footer__cta .btn--primary {
  background: #a8451e;
  color: #fff;
  flex-shrink: 0
}

.footer__cta .btn--primary:hover {
  background: #c2582c;
  color: #fff;
  box-shadow: 0 10px 30px rgba(194, 88, 44, .45)
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.footer__col {
  min-width: 0
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px
}

.footer__brand .brand__mark {
  background: #a8451e;
  color: #fff;
  width: 44px;
  height: 44px;
  box-shadow: 0 6px 20px rgba(194, 88, 44, .35)
}

.footer__brand strong {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3
}

.footer__brand small {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, .7)
}

.footer__about {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .8);
  margin-bottom: 22px;
  max-width: 340px
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(124, 140, 110, .15);
  border: 1px solid rgba(124, 140, 110, .35);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #c5d6b6;
  font-family: var(--font-head);
  max-width: 100%
}

.footer__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fbc6d;
  box-shadow: 0 0 0 3px rgba(143, 188, 109, .2);
  flex-shrink: 0
}

.footer__title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 12px
}

.footer__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 2px;
  background: #c2582c;
  border-radius: 2px
}

.footer__links,
.footer__services,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.footer__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--footer-text);
  transition: color .2s ease
}

.footer__links a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #c2582c;
  text-underline-offset: 4px
}

.footer__services a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  color: var(--footer-text);
  transition: color .2s ease
}

.footer__service-icon,
.footer__contact-icon {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--on-dark);
  flex-shrink: 0;
  transition: var(--t)
}

.footer__service-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px
}

.footer__contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px
}

.footer__services a:hover {
  color: #fff
}

.footer__services a:hover .footer__service-icon {
  background: #a8451e;
  border-color: #a8451e;
  color: #fff
}

.footer__contact li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 15px;
  color: var(--footer-text);
  min-width: 0
}

.footer__contact a {
  color: var(--footer-text);
  transition: color .2s ease;
  overflow-wrap: anywhere
}

.footer__contact a:hover {
  color: #fff
}

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

.footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--footer-text);
  transition: var(--t)
}

.footer__social a:hover {
  background: #a8451e;
  border-color: #a8451e;
  color: #fff;
  transform: translateY(-3px)
}

.footer__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08)
}

.footer__trust span {
  font-size: 14px;
  color: rgba(255, 255, 255, .75);
  font-family: var(--font-head);
  padding: 4px 10px;
  background: rgba(255, 255, 255, .05);
  border-radius: 999px
}

.footer__bottom {
  display: flex;
  justify-content: center;
  padding-top: 28px;
  text-align: center
}

.footer__copy {
  font-size: 14px;
  color: rgba(255, 255, 255, .7)
}

.footer :focus-visible {
  outline-color: #fff
}

/* ---------- 18. Floating buttons ---------- */
.to-top {
  position: fixed;
  bottom: max(clamp(16px, 3vw, 28px), env(safe-area-inset-bottom));
  left: clamp(16px, 3vw, 28px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .3s, visibility .3s, transform .3s, background-color .25s;
  z-index: 90
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none
}

.to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px)
}

[data-theme="dark"] .to-top:hover {
  color: #1a1714
}

.whatsapp-float {
  position: fixed;
  bottom: max(clamp(16px, 3vw, 28px), env(safe-area-inset-bottom));
  right: clamp(16px, 3vw, 28px);
  z-index: 89;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #128c4a;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(18, 140, 74, .4);
  transition: var(--t)
}

.whatsapp-float:hover {
  background: #0e7a3f;
  transform: translateY(-4px) scale(1.05)
}

/* ---------- 19. Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.hero__content .eyebrow {
  animation: fadeUp .7s .1s both var(--t)
}

.hero__title {
  animation: fadeUp .7s .25s both var(--t)
}

.hero__lead {
  animation: fadeUp .7s .4s both var(--t)
}

.hero__cta {
  animation: fadeUp .7s .55s both var(--t)
}

.hero__meta {
  animation: fadeUp .7s .7s both var(--t)
}

.hero__visual {
  animation: fadeUp .9s .35s both var(--t)
}

@media (min-width:901px) {
  html.js-ready .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .7s var(--ease), transform .7s var(--ease)
  }

  html.js-ready .reveal--left {
    transform: translateX(-50px)
  }

  html.js-ready .reveal--right {
    transform: translateX(50px)
  }

  html.js-ready .reveal.is-visible {
    opacity: 1;
    transform: none
  }

  html.js-ready .stagger:not(.is-visible)>* {
    opacity: 0
  }

  html.js-ready .stagger.is-visible>* {
    animation: fadeUp .6s var(--ease) backwards
  }

  html.js-ready .stagger.is-visible>*:nth-child(2) {
    animation-delay: .07s
  }

  html.js-ready .stagger.is-visible>*:nth-child(3) {
    animation-delay: .14s
  }

  html.js-ready .stagger.is-visible>*:nth-child(4) {
    animation-delay: .21s
  }

  html.js-ready .stagger.is-visible>*:nth-child(5) {
    animation-delay: .28s
  }

  html.js-ready .stagger.is-visible>*:nth-child(6) {
    animation-delay: .35s
  }
}

html.no-anim .reveal,
html.no-anim .stagger>* {
  opacity: 1 !important;
  transform: none !important
}

/* ============================================================
   Project Preview — معاينة احترافية بصورة
   ============================================================ */

.project__thumb--preview {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #1a1d16;
  border-radius: inherit;
  height: clamp(160px, 22vw, 200px);
}

.project__preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.project:hover .project__preview-img {
  transform: scale(1.06);
}

.project__preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(26, 29, 22, 0.4) 0%,
      transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.project__thumb--preview .project__num {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 2;
}

.project__thumb--preview .project__badge {
  position: absolute;
  top: 16px;
  right: auto;
  left: auto;
  inset-inline-start: 16px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #a8451e;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  white-space: nowrap;
  width: auto;
  display: inline-block;
}

.project__thumb--preview .project__glyph {
  display: none;
}

/* ============================================================
   Project Overlay Link — يجعل البطاقة كاملة قابلة للنقر
   ============================================================ */

.project__overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: inherit;
  cursor: pointer;
}

.project__overlay:focus-visible {
  outline: 2px solid var(--accent, #c2582c);
  outline-offset: 4px;
}

.project__body,
.project__thumb {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.project__body a,
.project__body button,
.project__thumb a,
.project__thumb button {
  pointer-events: auto;
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important
  }

  .marquee__track {
    animation: none
  }

  .reveal,
  .stagger>* {
    opacity: 1 !important;
    transform: none !important
  }
}

/* ---------- 20. Responsive ---------- */
@media (min-width:1400px) {
  :root {
    --container: 1280px
  }
}

@media (min-width:1800px) {
  :root {
    --container: 1400px
  }
}

@media (max-width:1100px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg)
  }

  .nav.open {
    display: block
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    background: none;
    border: none;
    padding: 0;
    gap: 4px;
    box-shadow: none;
    white-space: normal
  }

  .nav__link {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 16px;
    border-radius: var(--radius-sm)
  }

  .nav__link:hover {
    background: var(--sand);
    color: var(--ink)
  }

  .nav__link.active {
    background: var(--ink);
    color: var(--cream)
  }

  .burger {
    display: flex
  }

  /* ✅ إظهار "مطوّرة ومصمّمة مواقع" بحجم أصغر بدل إخفائها */
  .brand__text small {
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%
  }

  .brand__text strong {
    font-size: 14px
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px
  }

  .process__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .footer__col--brand {
    grid-column: 1/-1
  }
}

@media (max-width:1024px) {

  .hero__inner,
  .contact {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 5vw, 56px)
  }

  .hero__visual {
    min-height: clamp(300px, 40vw, 400px)
  }

  .section__head--row {
    flex-direction: column;
    align-items: flex-start
  }
}

@media (max-width:900px) {

  .hero__glow,
  .footer__decor span {
    filter: blur(60px)
  }

  .about__highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .services {
    grid-template-columns: minmax(0, 1fr)
  }

  .service,
  .service:nth-child(odd) {
    border-left: none;
    border-bottom: 1px solid var(--border)
  }

  .service:last-child {
    border-bottom: none
  }

  .form__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0
  }

  .process__steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px
  }

  .process__step::before {
    top: 6px;
    right: 12px;
    left: auto;
    width: 2px;
    height: 100%
  }

  .process__step {
    padding-top: 0;
    padding-right: 32px
  }

  .footer__cta {
    flex-direction: column;
    align-items: stretch
  }

  .footer__cta .btn {
    width: 100%
  }

  .footer {
    padding-bottom: 100px
  }
}

@media (max-width:640px) {
  :root {
    --container-pad: 18px;
    --section-pad: 56px
  }

  .topbar__actions .btn {
    display: none
  }

  .hero {
    padding-top: 96px
  }

  .hero__title {
    font-size: clamp(28px, 8vw, 34px)
  }

  .hero__cta {
    flex-direction: column
  }

  .hero__cta .btn {
    width: 100%
  }

  .hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    text-align: center;
    padding-top: 24px
  }

  .hero__meta .divider {
    display: none
  }

  .meta-item strong {
    font-size: 17px
  }

  .meta-item span {
    display: block;
    line-height: 1.5
  }

  .about__highlights {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 24px
  }

  .grid {
    grid-template-columns: minmax(0, 1fr)
  }

  .filters {
    border-radius: var(--radius)
  }

  .filter {
    padding: 8px 14px
  }

  .info-card {
    padding: 14px 16px;
    gap: 12px
  }

  a.info-card:hover {
    transform: none
  }

  .form {
    padding: 20px 16px
  }

  .design-cta {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px
  }

  .design-cta .btn {
    width: 100%
  }

  .footer {
    padding-bottom: 96px
  }

  .footer__cta {
    padding: 22px 18px;
    margin-bottom: 32px
  }

  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
  }

  .footer__col--brand {
    grid-column: 1 / -1;
    margin-bottom: 12px;
  }

  .footer__title {
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .footer__links a,
  .footer__services a,
  .footer__contact li {
    min-height: 34px;
    font-size: 11px;
    line-height: 1.3;
  }

  .footer__service-icon,
  .footer__contact-icon {
    width: 22px;
    height: 22px;
  }

  .footer__social {
    margin-top: 10px;
    gap: 6px;
  }

  .footer__social a {
    width: 34px;
    height: 34px;
  }

  .footer__trust {
    margin-top: 12px;
    padding-top: 12px;
    gap: 6px;
  }

  .footer__trust span {
    font-size: 11px;
    padding: 2px 6px;
  }

  .footer__about {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
  }

  .footer__brand strong {
    font-size: 14px;
  }

  .footer__brand small {
    font-size: 12px;
  }
}

@media (max-width:480px) {
  :root {
    --container-pad: 16px;
    --section-pad: 48px
  }

  .hero {
    padding-top: 88px
  }

  .portrait-card {
    padding: 26px 16px 18px
  }

  .portrait-card__badge {
    right: 10px
  }

  .btn {
    padding: 12px 20px
  }

  .whatsapp-float {
    width: 52px;
    height: 52px
  }

  .to-top {
    width: 48px;
    height: 48px
  }
}

@media (max-width:375px) {
  :root {
    --container-pad: 14px;
    --section-pad: 44px
  }

  .hero__title {
    font-size: 26px
  }

  .brand__text strong {
    font-size: 14px
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    font-size: 16px
  }

  .topbar__inner {
    gap: 8px
  }

  .topbar__actions {
    gap: 8px
  }

  .hero__meta {
    gap: 6px
  }
}

/* ---------- 21. Project actions (Demo + GitHub) ---------- */
.project__actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.project__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  transition: var(--t);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.project__action svg {
  flex-shrink: 0;
  transition: transform .25s var(--ease);
}

.project__action--demo {
  background: transparent;
  border-color: var(--border);
  color: var(--ink-soft);
}

.project__action--demo:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--terracotta-l);
}

.project__action--demo:hover svg {
  transform: scale(1.15);
}

.project__action--github {
  background: var(--ink);
  color: var(--cream);
}

.project__action--github:hover {
  background: var(--accent-hover);
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(194, 88, 44, .25);
}

.project__action--github:hover svg {
  transform: rotate(15deg) scale(1.1);
}

[data-theme="dark"] .project__action--github:hover {
  color: #1a1714;
}

@media (max-width: 380px) {
  .project__actions {
    flex-direction: column;
  }
}

/* ---------- 22. Code menu (للـ Full Stack) ---------- */
.project__code-menu {
  position: relative;
  flex: 1;
  display: flex;
}

.project__action--has-menu {
  width: 100%;
  gap: 6px;
}

.project__action-chevron {
  margin-inline-start: auto;
  transition: transform .25s var(--ease);
}

.project__action--has-menu[aria-expanded="true"] .project__action-chevron {
  transform: rotate(180deg);
}

.project__code-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: auto;
  min-width: 0;
  max-width: none;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 100;
  animation: codeMenuIn .2s cubic-bezier(.16, 1, .3, 1);
  transform-origin: top center;
}

.project__code-list[hidden] {
  display: none;
}

@keyframes codeMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.project__code-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: var(--t);
  color: var(--ink);
  min-height: 44px;
  overflow: hidden;
}

.project__code-item:hover,
.project__code-item:focus-visible {
  background: var(--sand);
  color: var(--accent);
}

.project__code-item svg {
  flex-shrink: 0;
  color: var(--accent);
  width: 14px;
  height: 14px;
}

.project__code-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.project__code-item-text strong {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project__code-item-text small {
  font-size: 10px;
  color: var(--slate);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ✅ البطاقة التي فيها قائمة الكود: لا تقطع القائمة */
.project:has(.project__code-menu) {
  overflow: visible;
}

.project:has(.project__code-menu):hover,
.project:has(.project__code-menu):focus-within {
  z-index: 10;
}

[data-theme="dark"] .project__code-list {
  background: var(--sand);
}

[data-theme="dark"] .project__code-item:hover {
  background: var(--sand-deep);
}

/* ============================================================
   22b. Code Menu — Mobile Optimized
   ============================================================ */

@media (max-width: 640px) {
  .project__code-list {
    left: -8px;
    right: -8px;
    min-width: 200px;
    padding: 8px;
    border-radius: 14px;
    box-shadow:
      0 4px 6px rgba(0, 0, 0, 0.04),
      0 12px 28px rgba(31, 41, 55, 0.16),
      0 24px 48px rgba(31, 41, 55, 0.10);
    background: var(--cream);
    top: calc(100% + 6px);
    border-width: 1.5px;
    animation: codeMenuInMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .project__code-item {
    min-height: 48px;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .project__code-item svg {
    width: 18px;
    height: 18px;
  }

  .project__code-item-text {
    gap: 3px;
  }

  .project__code-item-text strong {
    font-size: 14px;
    font-weight: 700;
    white-space: normal;
    line-height: 1.4;
    overflow: visible;
    text-overflow: clip;
  }

  .project__code-item-text small {
    font-size: 11.5px;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    color: var(--slate-light);
  }

  .project__action {
    min-height: 46px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .project__action svg {
    width: 16px;
    height: 16px;
  }

  .project__action-chevron {
    width: 14px;
    height: 14px;
  }

  [data-theme="dark"] .project__code-list {
    background: var(--sand-deep);
    border-color: var(--border);
    box-shadow:
      0 4px 6px rgba(0, 0, 0, 0.3),
      0 12px 28px rgba(0, 0, 0, 0.5),
      0 24px 48px rgba(0, 0, 0, 0.3);
  }

  [data-theme="dark"] .project__code-item:hover,
  [data-theme="dark"] .project__code-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
  }
}

@media (max-width: 380px) {
  .project__code-list {
    left: -12px;
    right: -12px;
    min-width: 180px;
    padding: 6px;
  }

  .project__code-item {
    min-height: 46px;
    padding: 9px 10px;
    gap: 8px;
  }

  .project__code-item svg {
    width: 16px;
    height: 16px;
  }

  .project__code-item-text strong {
    font-size: 13px;
  }

  .project__code-item-text small {
    font-size: 10.5px;
  }
}

@keyframes codeMenuInMobile {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   23. Motion Layer
   ============================================================ */
.project,
.why-card,
.service {
  position: relative
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  z-index: 1100;
  background: linear-gradient(to left, var(--terracotta), var(--gold));
  transform-origin: right;
  transform: scaleX(var(--p, 0));
  pointer-events: none
}

.hero__title.is-split {
  animation: none
}

.hero__title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-block: .14em;
  margin-block: -.14em
}

.hero__title .w>span {
  display: inline-block;
  transform: translateY(115%);
  animation: rise .85s var(--ease) forwards;
  animation-delay: calc(var(--i)*80ms + 150ms)
}

.hero__title.is-split em::after {
  transform-origin: right;
  transform: scaleX(0);
  animation: draw .9s 1.05s var(--ease) forwards
}

@keyframes rise {
  to {
    transform: none
  }
}

@keyframes draw {
  to {
    transform: scaleX(1)
  }
}

.project::after,
.why-card::after,
.service::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(194, 88, 44, .10), transparent 65%)
}

.project:hover::after,
.why-card:hover::after,
.service:hover::after {
  opacity: 1
}

.hero__visual {
  perspective: 900px
}

.portrait-card {
  transition: transform .5s var(--ease), box-shadow .3s;
  will-change: transform
}

.portrait-card.is-tilting {
  transition: transform .08s linear
}

.btn {
  transition: var(--t), translate .35s var(--ease)
}

@media (min-width:901px) {
  html.js-ready .process__steps:not(.is-visible) .process__step::before {
    transform: scaleX(0)
  }

  html.js-ready .process__step::before {
    transform-origin: right;
    transition: transform 1s var(--ease)
  }

  html.js-ready .process__steps.is-visible .process__step:nth-child(2)::before {
    transition-delay: .15s
  }

  html.js-ready .process__steps.is-visible .process__step:nth-child(3)::before {
    transition-delay: .3s
  }

  html.js-ready .process__steps.is-visible .process__step:nth-child(4)::before {
    transition-delay: .45s
  }
}

.eyebrow--plain {
  display: inline-block;
  transition: letter-spacing 0s, transform .4s var(--ease)
}

.section__head.is-visible .eyebrow--plain {
  animation: nudge .8s var(--ease) both
}

@keyframes nudge {
  from {
    opacity: 0;
    transform: translateX(24px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

html[dir="ltr"] body {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

html[dir="ltr"] .hero__lead,
html[dir="ltr"] .section__sub,
html[dir="ltr"] .about__text>p,
html[dir="ltr"] .service__desc,
html[dir="ltr"] .project__desc {
  text-align: left;
}

html[dir="ltr"] .hero__title {
  letter-spacing: -.01em
}

html[dir="ltr"] .service__cta svg {
  transform: rotate(180deg)
}

html[dir="ltr"] .service__cta:hover svg {
  transform: rotate(180deg) translateX(-4px)
}

html[dir="ltr"] .hero__promises li {
  padding-right: 0;
  padding-left: 30px
}

html[dir="ltr"] .hero__promises li::before {
  right: auto;
  left: 0
}

html[dir="ltr"] .footer__title::after {
  right: auto;
  left: 0
}

html[dir="ltr"] .skip-link {
  right: auto;
  left: 16px
}

html[dir="ltr"] a.info-card:hover {
  transform: translateX(4px)
}

html[dir="ltr"] .to-top {
  left: auto;
  right: clamp(16px, 3vw, 28px)
}

html[dir="ltr"] .whatsapp-float {
  right: auto;
  left: clamp(16px, 3vw, 28px)
}

html[dir="ltr"] .scroll-progress {
  transform-origin: left
}

@media (prefers-reduced-motion:reduce) {
  .scroll-progress {
    display: none
  }

  .hero__title .w>span {
    transform: none;
    animation: none
  }

  .hero__title.is-split em::after {
    transform: none;
    animation: none
  }

  .project::after,
  .why-card::after,
  .service::after {
    display: none
  }
}