/* ─── VARIABLES ─── */
:root {
  --bg:             #f2ede8;
  --bg-alt:         #ede8e2;
  --bg-card:        #faf7f4;
  --bg-input:       #f5f1ec;
  --text-primary:   #1a1512;
  --text-secondary: #4a4540;
  --text-muted:     #8a847e;
  --accent:         #6e8fa8;
  --accent-dark:    #4a6d85;
  --accent-deeper:  #3d6080;
  --accent-light:   #8aacbf;
  --accent-pale:    #dce8f0;
  --accent-muted:   rgba(110,143,168,0.15);
  --circle-1:       rgba(110,143,168,0.55);
  --circle-2:       rgba(74,109,133,0.45);
  --circle-3:       rgba(138,172,191,0.35);
  --circle-4:       rgba(61,96,128,0.60);
  --border:         #ddd7cf;
  --border-strong:  #c8c0b5;
  --shadow-sm:      0 1px 3px rgba(26,21,18,0.06);
  --shadow-md:      0 4px 18px rgba(26,21,18,0.09);
  --shadow-lg:      0 10px 40px rgba(26,21,18,0.13);
  --shadow-xl:      0 20px 64px rgba(26,21,18,0.16);
  --grain-opacity:  0.04;
  --footer-bg:      #1a1512;
  --font-ar:        'Tajawal', sans-serif;
  --font-display:   'Amiri', serif;
  --font-en:        'DM Sans', sans-serif;
  --font-display-en:'Playfair Display', serif;
  --font-mono:      'JetBrains Mono', monospace;
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  26px;
  --container:  1240px;
  --section-py: 100px;
  --t:          0.22s ease;
  --t-slow:     0.4s ease;
  --navbar-bg:  rgba(242,237,232,0.92);
}

/* ─── DARK MODE ─── */
[data-theme="dark"] {
  --bg:             #111009;
  --bg-alt:         #161410;
  --bg-card:        #1e1b16;
  --bg-input:       #252018;
  --text-primary:   #f0ebe4;
  --text-secondary: #b0a89e;
  --text-muted:     #6a6460;
  --accent:         #8aacbf;
  --accent-dark:    #6e8fa8;
  --accent-pale:    #1a2830;
  --border:         #2a2620;
  --border-strong:  #383028;
  --navbar-bg:      rgba(17,16,9,0.92);
  --circle-1:       rgba(110,143,168,0.35);
  --circle-2:       rgba(74,109,133,0.30);
  --circle-3:       rgba(138,172,191,0.20);
  --circle-4:       rgba(61,96,128,0.40);
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.15);
  --shadow-md:      0 4px 18px rgba(0,0,0,0.25);
  --shadow-lg:      0 10px 40px rgba(0,0,0,0.3);
  --shadow-xl:      0 20px 64px rgba(0,0,0,0.35);
  --footer-bg:      #0b0a08;
  --bg-card:        #1e1b16;
}

/* ─── RESET ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body.lang-en {
  font-family: var(--font-en);
  direction: ltr;
  text-align: left;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--t);
}

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

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

ul, ol {
  list-style: none;
}

/* ─── GRAIN OVERLAY ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-repeat: repeat;
}

/* ─── CONTAINER ─── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── SECTION ─── */
.section {
  padding: var(--section-py) 0;
  background: var(--bg);
  transition: background 0.3s ease;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

body.lang-en .section-title {
  font-family: var(--font-display-en);
}

.section-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

body.lang-en .navbar-logo {
  font-family: var(--font-display-en);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--bg-alt);
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--t);
  min-height: 44px;
  min-width: 44px;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-toggle {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.theme-toggle {
  position: relative;
}

.theme-icon-light, .theme-icon-dark {
  font-size: 1.1rem;
  line-height: 1;
}

[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* ─── BURGER ─── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  transform-origin: center;
}

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

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

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

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}

.nav-overlay.show {
  display: block;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

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

.hero-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  animation: circleLife var(--duration) cubic-bezier(0.4,0,0.2,1) var(--delay) forwards;
}

@keyframes circleLife {
  0%   { transform: scale(0); opacity: 0; }
  20%  { transform: scale(1); opacity: var(--target-opacity, 0.4); }
  70%  { transform: scale(1); opacity: var(--target-opacity, 0.4); }
  100% { transform: scale(0); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(110,143,168,0.12);
  border: 1px solid rgba(110,143,168,0.3);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 50px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}

body.lang-en .hero-title {
  font-family: var(--font-display-en);
}

.hero-typewriter {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 2em;
}

.typewriter-text {
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-weight: 700;
}

.typewriter-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

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

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--t);
  min-height: 44px;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8rem;
  min-height: 36px;
}

.btn-full {
  width: 100%;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: 50px;
  padding: 4px 12px;
  transition: border-color var(--t);
}

.tag:hover {
  border-color: var(--accent);
}

/* ─── SCROLL ARROW ─── */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: bounce 1.8s infinite;
}

.scroll-arrow span {
  display: block;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.4; }
}

/* ─── HERO LOAD ANIMATIONS ─── */
.reveal-hero {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.6s cubic-bezier(0.4,0,0.2,1) forwards;
}

.reveal-hero[data-delay="0"] { animation-delay: 0ms; }
.reveal-hero[data-delay="1"] { animation-delay: 80ms; }
.reveal-hero[data-delay="2"] { animation-delay: 160ms; }
.reveal-hero[data-delay="3"] { animation-delay: 240ms; }
.reveal-hero[data-delay="4"] { animation-delay: 320ms; }
.reveal-hero[data-delay="5"] { animation-delay: 400ms; }

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

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── ABOUT ─── */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

body.lang-en .about-grid {
  grid-template-columns: 1fr 280px;
}

body.lang-en .about-card {
  order: 2;
}

body.lang-en .about-bio {
  order: 1;
}

.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.avatar-ring {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), var(--accent-light), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 3px;
}

.avatar-inner {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-inner svg {
  width: 100%;
  height: 100%;
}

.about-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.about-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.about-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--t);
}

.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.about-bio p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 20px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display-en);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-dark);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── SKILLS ─── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}

.pill {
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--t);
  min-height: 44px;
  cursor: pointer;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  transition: all var(--t);
}

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

.skill-card.hidden {
  opacity: 0.2;
  transform: scale(0.95);
  pointer-events: none;
}

.skill-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.skill-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 12px;
}

.progress-wrap {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 50px;
  display: inline-block;
}

.badge-expert {
  background: rgba(110,143,168,0.15);
  color: var(--accent-dark);
}

.badge-advanced {
  background: rgba(59,130,246,0.12);
  color: #3b82f6;
}

.badge-intermediate {
  background: rgba(245,158,11,0.12);
  color: #d97706;
}

/* ─── SERVICES ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: visible;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  padding: 24px 22px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  will-change: transform;
}

.service-card.visible {
  animation: serviceCardIn 0.6s ease forwards, serviceDance 3s ease-in-out infinite alternate;
}

.service-card.visible:nth-child(2) { animation-delay: 0.06s; }
.service-card.visible:nth-child(3) { animation-delay: 0.12s; }
.service-card.visible:nth-child(4) { animation-delay: 0.18s; }
.service-card.visible:nth-child(5) { animation-delay: 0.24s; }
.service-card.visible:nth-child(6) { animation-delay: 0.30s; }

.service-card:nth-child(odd) {
  border-radius: 63% 37% 39% 61% / 46% 56% 44% 54%;
  border-top: 1px solid rgba(0, 255, 204, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 255, 204, 0.05));
}

.service-card:nth-child(even) {
  border-radius: 36% 64% 60% 40% / 61% 39% 61% 39%;
  border-bottom: 1px solid rgba(255, 0, 255, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 0, 255, 0.05));
}

.service-card:nth-child(3n) {
  border-radius: 73% 27% 29% 71% / 59% 74% 26% 41%;
  border-left: 1px solid rgba(255, 255, 0, 0.3);
}

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

@keyframes serviceDance {
  0% { transform: translateY(0); }
  100% { transform: translateY(-15px); }
}

.service-card:hover {
  z-index: 20;
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(100, 200, 255, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .service-card {
  background: rgba(255, 255, 255, 0.03);
}

/* Improve readability on the light theme for service cards and tags */
[data-theme="light"] .service-card {
  border-color: rgba(26, 21, 18, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(215, 229, 240, 0.42));
  box-shadow:
    0 12px 26px rgba(26, 21, 18, 0.14),
    inset 0 0 12px rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .service-card:nth-child(odd) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(177, 242, 230, 0.4));
  border-top-color: rgba(24, 142, 122, 0.45);
}

[data-theme="light"] .service-card:nth-child(even) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(244, 202, 244, 0.4));
  border-bottom-color: rgba(147, 63, 147, 0.38);
}

[data-theme="light"] .service-card:nth-child(3n) {
  border-left-color: rgba(151, 122, 24, 0.4);
}

[data-theme="light"] .service-card:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 20px 40px rgba(26, 21, 18, 0.18),
    0 0 26px rgba(74, 109, 133, 0.18),
    inset 0 0 16px rgba(255, 255, 255, 0.5);
}

.service-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(100, 200, 255, 0.14);
  border: 1px solid rgba(100, 200, 255, 0.35);
  color: #9ddcff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

[data-theme="light"] .service-icon {
  background: rgba(110, 143, 168, 0.2);
  border-color: rgba(61, 96, 128, 0.4);
  color: #1f4c6e;
}

.service-title {
  font-size: 1.35rem;
  font-family: 'Poppins', var(--font-en);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.3px;
  color: #64c8ff;
}

[data-theme="light"] .service-title {
  color: #1f4c6e;
}

.service-card:hover .service-title {
  color: #fff;
  text-shadow: 0 0 10px #64c8ff;
}

[data-theme="light"] .service-card:hover .service-title {
  color: #122737;
  text-shadow: 0 0 8px rgba(100, 200, 255, 0.2);
}

.service-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d1d5db;
}

[data-theme="light"] .service-desc {
  color: #2f2a26;
}

.service-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: #e0e7ff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-en);
  transition: all var(--t);
}

[data-theme="light"] .service-tag {
  color: #1a1512;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(61, 96, 128, 0.3);
}

.service-tag:hover {
  background: rgba(100, 200, 255, 0.15);
  border-color: #64c8ff;
}

[data-theme="light"] .service-tag:hover {
  background: rgba(110, 143, 168, 0.2);
  border-color: #3d6080;
}

@media (max-width: 560px) {
  .service-card {
    padding: 1.25rem;
  }

  .service-title {
    font-size: 1.15rem;
  }
}

/* ─── PROJECTS ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--t);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.project-card.hidden {
  opacity: 0.15;
  transform: scale(0.95);
  pointer-events: none;
}

.project-image {
  aspect-ratio: 16/10;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  overflow: hidden;
}

.project-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.project-featured {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
}

body.lang-en .project-featured {
  right: auto;
  left: 14px;
}

.project-image-title {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.project-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── BLOG ─── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--t);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.blog-image {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}

.blog-category {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  z-index: 1;
}

[dir="rtl"] .blog-category {
  left: auto;
  right: 14px;
}

.blog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
}

.blog-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.blog-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-link {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.88rem;
  transition: color var(--t);
}

.blog-link:hover {
  color: var(--accent-deeper);
}

.blog-all {
  text-align: center;
  margin-top: 40px;
}

.blog-all-link {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--t);
}

.blog-all-link:hover {
  color: var(--accent-deeper);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* ─── CONTACT ─── */
.section-contact {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-icon-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-md);
  background: rgba(110,143,168,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-value {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-link {
  transition: color var(--t);
}

.contact-link:hover {
  color: var(--accent);
}

.btn-copy {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  margin-inline-start: auto;
}

.btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-availability {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(110,143,168,0.1);
  border: 1px solid rgba(110,143,168,0.25);
  color: var(--accent-dark);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--t), box-shadow var(--t);
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110,143,168,0.15);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e53e3e;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

.btn.loading span:first-child {
  display: none;
}

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

/* ─── FOOTER ─── */
.footer {
  background: var(--footer-bg);
  color: rgba(240,235,228,0.65);
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  display: inline-block;
  margin-bottom: 12px;
}

body.lang-en .footer-logo {
  font-family: var(--font-display-en);
}

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  color: rgba(240,235,228,0.65);
  transition: all var(--t);
}

.footer-social-btn:hover {
  background: var(--accent);
  color: #fff;
}

.footer-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(240,235,228,0.4);
  margin-bottom: 18px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--t);
}

.footer-link:hover {
  color: #fff;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tag {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(240,235,228,0.55);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 50px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

.footer-built {
  color: rgba(240,235,228,0.4);
}

.btn-top {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(240,235,228,0.6);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  transition: all var(--t);
  min-height: 44px;
}

.btn-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── BODY SCROLL LOCK ─── */
body.nav-open {
  overflow: hidden;
}

/* ─── LANG TRANSITION ─── */
body.lang-switching {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* ─── RESPONSIVE ─── */

/* 480px+ */
@media (min-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
}

/* 768px+ */
@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 992px+ */
@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .burger {
    display: none;
  }
  .navbar-nav {
    display: flex;
  }
}

/* 1200px+ */
@media (min-width: 1200px) {
  .container {
    max-width: var(--container);
  }
}

/* ─── MOBILE ≤ 992px ─── */
@media (max-width: 991px) {
  .navbar-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 80px 24px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
    box-shadow: var(--shadow-xl);
  }

  body.lang-en .navbar-nav {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
  }

  .navbar-nav.open {
    transform: translateX(0);
  }

  body.lang-en .navbar-nav.open {
    transform: translateX(0);
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .burger {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  body.lang-en .about-grid {
    grid-template-columns: 1fr;
  }

  body.lang-en .about-card {
    order: 0;
  }

  body.lang-en .about-bio {
    order: 0;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ─── MOBILE ≤ 768px ─── */
@media (max-width: 767px) {
  :root {
    --section-py: 64px;
  }

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

  .services-grid,
  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 24px 20px;
  }
}

/* ─── MOBILE ≤ 360px ─── */
@media (max-width: 360px) {
  .container {
    padding: 0 16px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }
}
