/* --- base.css --- */
/* ═══════════════════════════════════════
   BASE — Reset, Variables, Typography
   ═══════════════════════════════════════ */

/* ───── CSS Variables ───── */
:root {
  /* Brand */
  --primary: #003366;
  --primary-hover: #0284c7;
  --primary-color: #003366;
  --accent: #0284c7;
  --accent-glow: rgba(2, 132, 199, 0.12);

  /* Light theme (default) */
  --bg-primary: #eef1f5;
  --bg-secondary: #f5f7fa;
  --bg-body: var(--bg-primary);
  --bg-section: var(--bg-secondary);
  --bg-section-alt: #eaecf0;
  --card-bg: #ffffff;
  --bg-card: var(--card-bg);
  --bg-input: #f1f5f9;
  --bg-header: #e3e3e3;
  --bg-hero: #eef1f5;
  --bg-footer: linear-gradient(135deg, #0a1e3d, #0f2e52, #143a63, #003366, #1a4b7a);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-on-primary: #ffffff;

  --title-color: #0f172a;

  --border-color: #b0bac5;
  --border-header: #b3b3b3;
  --icon-color: #0284c7;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(0, 51, 102, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 4px 12px rgba(0, 51, 102, 0.07), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 6px 16px rgba(0, 51, 102, 0.08);

  --divider-gradient: linear-gradient(135deg, #003366, #0284c7);

  /* Skill accent colours — NO pink/purple */
  --s0: #02569B;
  --s1: #FF2D20;
  --s2: #10b981;
  --s3: #d97706;
  --s4: #4b5563;
  --s5: #ea580c;

  /* Typography */
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;

  /* Motion — 0.25s for everything */
  --transition-fast: 0.25s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.25s ease;
  --transition-spring: 0.25s ease;
}

/* ───── Dark Theme ───── */
[data-theme='dark'] {
  --primary: #38bdf8;
  --primary-hover: #60a5fa;
  --primary-color: #38bdf8;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);

  --bg-primary: #060e1a;
  --bg-secondary: #0a1726;
  --bg-body: var(--bg-primary);
  --bg-section: var(--bg-primary);
  --bg-section-alt: var(--bg-secondary);
  --card-bg: #0d1f33;
  --bg-card: var(--card-bg);
  --bg-input: #0f253d;
  --bg-header: rgba(6, 14, 26, 0.98);
  --bg-hero: #060e1a;
  --bg-footer: linear-gradient(135deg, #03070e, #060e1a, #091524, #0c1c2e);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-on-primary: #ffffff;

  --title-color: #f8fafc;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-header: rgba(255, 255, 255, 0.08);
  --icon-color: #38bdf8;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 20px rgba(0, 0, 0, 0.4);

  --divider-gradient: linear-gradient(135deg, #38bdf8, #0284c7);

  /* Skill accents (vibrant for dark) — NO pink/purple */
  --s0: #38bdf8;
  --s1: #FF2D20;
  --s2: #34d399;
  --s3: #fbbf24;
  --s4: #9ca3af;
  --s5: #fb923c;
}

/* ───── Smooth theme transition (applied only during toggle) ───── */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
  transition: background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease !important;
  animation-duration: 0s !important;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* ───── RTL Support ───── */
html[dir='rtl'] body {
  font-family: var(--font-ar);
}

/* ───── Links & Buttons Reset ───── */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ───── Focus Visible Accessibility ───── */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.project-link:focus-visible,
.scroll-indicator:focus-visible,
.theme-toggle-btn:focus-visible,
.lang-switch-btn:focus-visible,
.mobile-menu-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

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

ul,
ol {
  list-style: none;
}

/* ───── Shared Responsive Container System ───── */
.container,
.section-container,
.header-inner,
.hero-content,
.about-content,
.skills-grid,
.projects-container,
.education-container,
.footer-inner,
.footer-bottom {
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 768px) {

  .container,
  .section-container,
  .header-inner,
  .hero-content,
  .about-content,
  .skills-grid,
  .projects-container,
  .education-container,
  .footer-inner,
  .footer-bottom {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 380px) {

  .container,
  .section-container,
  .header-inner,
  .hero-content,
  .about-content,
  .skills-grid,
  .projects-container,
  .education-container,
  .footer-inner,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ───── Section Layout ───── */
section {
  padding: 72px 0;
  position: relative;
  contain: layout style;
}

@media (max-width: 768px) {
  section {
    padding: 52px 0;
  }
}

/* ───── Section Titles — CENTERED ───── */
.section-title-wrap {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 800;
  color: var(--title-color);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  display: block;
  text-align: center;
  position: relative;
}

.title-highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme='dark'] .title-highlight {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.title-underline {
  width: 54px;
  height: 4px;
  background: var(--divider-gradient);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ───── Section Divider ───── */
.section-divider {
  width: 54px;
  height: 4px;
  background: var(--divider-gradient);
  margin: 0 auto 40px;
  border-radius: 2px;
}

/* ───── Scroll Reveal System (Native, Reliable everywhere) ───── */
.reveal,
.reveal-stagger,
.reveal-scale {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
  transform: translateY(20px) scale(0.96);
}

.reveal.active,
.reveal-stagger.active,
.reveal-scale.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  .reveal,
  .reveal-stagger,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* --- components.css --- */
/* ═══════════════════════════════════════
   COMPONENTS — Shared reusable styles
   ═══════════════════════════════════════ */

/* ───── Back to Top Button — Circular with arrow only ───── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  inset-inline-end: 28px;
  z-index: 999;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #003366, #0284c7);
  color: #ffffff;
  font-size: 1.15rem;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.9);
  transition: opacity var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transform: translateY(-2px) scale(1.03);
  color: #ffffff;
}

[data-theme='dark'] .back-to-top {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
  color: #040912;
}

[data-theme='dark'] .back-to-top:hover {
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
  color: #040912;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    inset-inline-end: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}


/* --- header.css --- */
/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */

.main-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  height: 68px;
  background: var(--bg-header);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-header);
  transition: background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  contain: layout style;
}

.main-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .main-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Smart header hide state on scroll down */
.main-header.header-hidden {
  transform: translateY(-100%);
}

.header-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ───── Left: logo + hamburger ───── */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
  transform: none;
  /* Keep logo LTR even in RTL mode */
  direction: ltr;
  unicode-bidi: bidi-override;
}

.logo:hover {
  color: var(--primary-hover);
  transform: none;
}

.logo-accent {
  color: var(--primary-hover);
}

[data-theme='dark'] .logo {
  color: #ffffff;
}

[data-theme='dark'] .logo-accent {
  color: #38bdf8;
}

/* ───── Navigation ───── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  position: relative;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 16px;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color var(--transition-fast),
    background-color var(--transition-fast);
}

/* Light mode hover & active: vivid blue hover on light header */
.main-nav a:hover {
  color: #0056b3;
  background-color: rgba(0, 86, 179, 0.12);
  box-shadow: 0 2px 6px rgba(0, 86, 179, 0.08);
}

.main-nav a.active {
  color: #004494;
  background-color: rgba(0, 68, 148, 0.16);
  box-shadow: 0 2px 6px rgba(0, 68, 148, 0.10);
  font-weight: 700;
}

/* Dark mode hover & active: hover = primary color */
[data-theme='dark'] .main-nav a {
  color: var(--text-secondary);
}

[data-theme='dark'] .main-nav a:hover {
  color: var(--primary-color);
  background-color: rgba(56, 189, 248, 0.08);
}

[data-theme='dark'] .main-nav a.active {
  color: var(--primary-color);
  background-color: rgba(56, 189, 248, 0.12);
  font-weight: 600;
}

/* ───── Right: Actions (Language + Theme) ───── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language switch — Square compact modern button with globe and 2-letter code */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: 1.5px solid var(--border-color);
  letter-spacing: 0.5px;
  transition: color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
  cursor: pointer;
}

.lang-switch-btn:hover {
  color: #0284c7;
  border-color: #0284c7;
  background-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.08);
  transform: translateY(-1px);
}

.lang-switch-btn .lang-icon {
  font-size: 0.95rem;
  color: inherit;
}

.lang-switch-btn .lang-code {
  text-transform: uppercase;
  font-family: monospace, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

[data-theme='dark'] .lang-switch-btn {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme='dark'] .lang-switch-btn:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.08);
}

/* ───── Theme Toggle Button — Smooth Centered Icon Swap ───── */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--text-primary);
  background: transparent;
  border: 1.5px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: #0284c7;
  border-color: #0284c7;
  background-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.08);
  transform: translateY(-1px);
}

[data-theme='dark'] .theme-toggle-btn {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme='dark'] .theme-toggle-btn:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.08);
}

/* Icon states with smooth rotation */
.theme-toggle-btn .theme-icon-sun,
.theme-toggle-btn .theme-icon-moon {
  position: absolute;
  font-size: 1.05rem;
  transition: transform 0.25s ease,
    opacity 0.25s ease;
}

/* Light mode: Moon visible, Sun hidden */
.theme-toggle-btn .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #1e293b;
}

.theme-toggle-btn .theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.3);
  color: #fbbf24;
}

/* Dark mode: Sun visible, Moon hidden */
[data-theme='dark'] .theme-toggle-btn .theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.3);
}

[data-theme='dark'] .theme-toggle-btn .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #fbbf24;
}

/* ───── Mobile Hamburger Button ───── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.mobile-menu-btn:hover {
  background-color: rgba(0, 51, 102, 0.06);
  border-color: rgba(0, 51, 102, 0.2);
}

[data-theme='dark'] .mobile-menu-btn:hover {
  background-color: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}

.mobile-menu-btn .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base),
    opacity var(--transition-fast);
}

.mobile-menu-btn.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ───── Responsive Navigation ───── */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 58px;
  }

  .main-header {
    height: 54px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .header-left {
    gap: 12px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .header-actions {
    gap: 8px;
  }

  .mobile-menu-btn {
    display: flex;
    width: 34px;
    height: 34px;
    padding: 7px;
    gap: 4px;
  }

  .mobile-menu-btn .bar {
    height: 2px;
  }

  .mobile-menu-btn.open .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-menu-btn.open .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }

  .theme-toggle-btn .theme-icon-sun,
  .theme-toggle-btn .theme-icon-moon {
    font-size: 0.95rem;
  }

  .lang-switch-btn {
    height: 34px;
    padding: 0 8px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .lang-switch-btn .lang-icon {
    font-size: 0.82rem;
  }

  .lang-switch-btn .lang-code {
    font-size: 0.8rem;
  }

  .main-nav {
    position: fixed;
    top: 54px;
    inset-inline: 0;
    flex-direction: column;
    padding: 16px 20px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-header);
    gap: 4px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease,
      opacity 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .main-nav a:hover {
    color: #0056b3;
    background-color: rgba(0, 86, 179, 0.12);
  }

  [data-theme='dark'] .main-nav a:hover {
    color: var(--primary-color);
    background-color: rgba(56, 189, 248, 0.08);
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding: 0 12px;
  }

  .logo {
    font-size: 1.15rem;
  }

  .lang-switch-btn {
    padding: 0 6px;
  }
}


/* --- hero.css --- */
/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */

.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 100px 0 48px;
  background: var(--bg-hero);
  color: var(--text-primary);
  overflow: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

/* Canvas overlay for fluid background motion */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

[data-theme='dark'] .hero-canvas {
  opacity: 0.7;
}

/* ───── Content row ───── */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
  max-width: 1200px;
  flex: 1;
}

.hero-text {
  flex: 1.25;
}

.hero-text h1 {
  margin-bottom: 20px;
}

/* Typing name — responsive clamp */
.hero-name {
  display: inline-block;
  font-family: inherit;
  font-size: clamp(1.25rem, 4.5vw, 2.1rem);
  font-weight: 800;
  color: var(--text-primary);
  border-right: 3px solid var(--accent);
  padding-right: 10px;
  letter-spacing: -0.5px;
  animation: cursorBlink 0.9s infinite;
  min-height: 2.5rem;
  line-height: 1.3;
}

html[dir='rtl'] .hero-name {
  border-right: none;
  border-left: 3px solid var(--accent);
  padding-right: 0;
  padding-left: 10px;
}

@keyframes cursorBlink {

  0%,
  100% {
    border-color: var(--accent);
  }

  50% {
    border-color: transparent;
  }
}

/* Gradient Title — responsive clamp */
.hero-title {
  display: block;
  font-size: clamp(1.9rem, 6.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-top: 6px;
  background: linear-gradient(135deg, #003366, #0284c7 60%, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme='dark'] .hero-title {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Description — responsive clamp */
.hero-description {
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 32px;
}

/* ───── CTA Buttons ───── */
.hero-cta,
.hero-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all var(--transition-base);
  text-decoration: none;
}

.hero-btn-primary,
.btn-primary {
  background: linear-gradient(135deg, #003366, #0284c7);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
  border: none;
}

.hero-btn-primary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #002244, #0369a1);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.18);
  color: #ffffff !important;
}

[data-theme='dark'] .hero-btn-primary,
[data-theme='dark'] .btn-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
  color: #040912 !important;
}

[data-theme='dark'] .hero-btn-primary:hover,
[data-theme='dark'] .btn-primary:hover {
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
  color: #040912 !important;
}

.hero-btn-secondary,
.btn-outline,
.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border-color);
}

.hero-btn-secondary:hover,
.btn-outline:hover,
.btn-secondary:hover {
  background: rgba(2, 132, 199, 0.06);
  border-color: #0284c7;
  color: #0284c7 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.08);
}

[data-theme='dark'] .hero-btn-secondary,
[data-theme='dark'] .btn-outline,
[data-theme='dark'] .btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}

[data-theme='dark'] .hero-btn-secondary:hover,
[data-theme='dark'] .btn-outline:hover,
[data-theme='dark'] .btn-secondary:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: #38bdf8;
  color: #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(3px);
}

html[dir='rtl'] .btn:hover svg {
  transform: translateX(-3px);
}

/* ───── Social Links ───── */
.hero-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.15rem;
  transition: all var(--transition-fast);
}

.hero-social a:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.14);
}

[data-theme='dark'] .hero-social a {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

/* Specific brand hover colors */
.hero-social a[aria-label*="LinkedIn"]:hover,
.hero-social a[data-i18n-aria*="linkedin"]:hover {
  color: #0077b5;
  border-color: #0077b5;
  background: rgba(0, 119, 181, 0.08);
}

.hero-social a[aria-label*="Telegram"]:hover,
.hero-social a[data-i18n-aria*="telegram"]:hover {
  color: #229ed9;
  border-color: #229ed9;
  background: rgba(34, 158, 217, 0.08);
}

.hero-social a[aria-label*="GitHub"]:hover,
.hero-social a[data-i18n-aria*="github"]:hover {
  color: #24292e;
  border-color: #24292e;
  background: rgba(36, 41, 46, 0.08);
}

[data-theme='dark'] .hero-social a[aria-label*="GitHub"]:hover,
[data-theme='dark'] .hero-social a[data-i18n-aria*="github"]:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-social a[aria-label*="Email"]:hover,
.hero-social a[data-i18n-aria*="email"]:hover {
  color: #ea4335;
  border-color: #ea4335;
  background: rgba(234, 67, 53, 0.08);
}

/* ───── Hero Image / Phone Mockup ───── */
.hero-image {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 460px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  filter: drop-shadow(0 8px 20px rgba(0, 51, 102, 0.12));
  animation: heroFloat 5s ease-in-out infinite;
  transition: transform 0.25s ease;
}

[data-theme='dark'] .hero-image img {
  filter: drop-shadow(0 8px 24px rgba(56, 189, 248, 0.15));
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ───── Scroll Down Indicator — TRUE CIRCLE (width = height, border-radius: 50%) ───── */
.scroll-indicator {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 46px;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

.scroll-indicator:hover {
  border-color: var(--primary-color);
}

.scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  animation: scrollBounce 2s ease-in-out infinite;
}

[data-theme='dark'] .scroll-dot {
  background-color: var(--primary-color);
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateY(-4px);
    opacity: 0.35;
  }

  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

/* ───── Responsive Breakpoints ───── */
@media (max-width: 768px) {

  /* Hide hero image on mobile so content uses the freed space */
  .hero-image {
    display: none !important;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    max-width: 750px;
    margin: 0 auto;
    gap: 24px;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding-top: 84px;
    padding-bottom: 36px;
  }

  /* Stack hero buttons vertically with equal width on small mobile */
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}


/* --- about.css --- */
/* ═══════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════ */

.about-section {
  padding: 80px 0;
  background: var(--bg-section-alt);
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.about-description {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 44px;
  max-width: 800px;
  margin-inline: auto;
}

/* ───── Stats row ───── */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-spring),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-hover);
  background-color: var(--bg-card);
}

.stat-item .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-hover), var(--accent));
  color: #fff;
  font-size: 1.2rem;
}

.stat-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--title-color);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .about-section {
    padding: 64px 0;
  }

  .about-description {
    font-size: 0.98rem;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: start;
  }

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

@media (max-width: 480px) {
  .about-section {
    padding: 56px 0;
  }

  .about-description {
    font-size: 0.92rem;
  }

  .stat-item {
    padding: 20px;
  }

  .stat-item .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .stat-value {
    font-size: 0.9rem;
  }
}


/* --- skills.css --- */
/* ═══════════════════════════════════════
   SKILLS SECTION — Clean Card Design
   ═══════════════════════════════════════ */

.skills-section {
  background-color: var(--bg-section);
  position: relative;
  padding: 80px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───── Skill Card ───── */
.skill-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow: hidden;
}

/* Left Accent Line per Skill */
.skill-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--card-accent, var(--primary));
  transition: width var(--transition-fast);
}

[dir='rtl'] .skill-card::before {
  left: auto;
  right: 0;
}

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

.skill-card:hover::before {
  width: 6px;
}

/* Specific skill accents — mapped to theme variables so dark mode is crisp & readable */
.skill-card.s0,
.skill-card:nth-child(1) {
  --card-accent: var(--s0);
}

/* Flutter */
.skill-card.s1,
.skill-card:nth-child(2) {
  --card-accent: var(--s1);
}

/* Laravel */
.skill-card.s2,
.skill-card:nth-child(3) {
  --card-accent: var(--s2);
}

/* Database/Fullstack */
.skill-card.s3,
.skill-card:nth-child(4) {
  --card-accent: var(--s3);
}

/* Java */
.skill-card.s4,
.skill-card:nth-child(5) {
  --card-accent: var(--s4);
}

/* UI/UX */
.skill-card.s5,
.skill-card:nth-child(6) {
  --card-accent: var(--s5);
}

/* HTML/CSS */

/* ───── Card Icon ───── */
.skill-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(2, 132, 199, 0.08);
  color: var(--card-accent, var(--primary));
  flex-shrink: 0;
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

[data-theme='dark'] .skill-icon-wrap {
  background: rgba(56, 189, 248, 0.1);
}

.skill-card:hover .skill-icon-wrap {
  transform: scale(1.05);
  background: var(--card-accent, var(--primary));
  color: #fff;
}

.skill-info {
  flex: 1;
}

.skill-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 6px;
  line-height: 1.2;
}

.skill-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .skills-section {
    padding: 64px 0;
  }

  .skill-description {
    text-align: justify;
    text-justify: inter-word;
    text-align-last: start;
  }
}

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

  .skill-card {
    padding: 18px 16px;
  }
}


/* --- projects.css --- */
/* ═══════════════════════════════════════
   PROJECTS SECTION
   ═══════════════════════════════════════ */

.projects-section {
  padding: 80px 0;
  background: var(--bg-section-alt);
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.projects-wrapper {
  padding: 8px 40px 48px;
  overflow: hidden;
}

/* ───── Card ───── */
.project-card {
  list-style: none;
}

.project-link {
  display: block;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-spring),
    background-color var(--transition-base);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.project-link:hover {
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.project-link:active {
  cursor: grabbing;
}

/* Image */
.project-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.project-link:hover .project-img {
  transform: scale(1.02);
}

/* Badge */
.project-badge {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  color: var(--primary-hover);
  padding: 5px 14px;
  margin: 14px 0 10px;
  background: rgba(2, 132, 199, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(2, 132, 199, 0.12);
}

[data-theme='dark'] .project-badge {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.15);
  color: var(--accent);
}

/* Tech title */
.project-tech {
  font-size: 1rem;
  font-weight: 700;
  color: var(--title-color);
  padding: 0 4px;
}

/* Arrow button */
.project-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
  transform: rotate(-45deg);
  transition: all var(--transition-base);
}

[dir='rtl'] .project-arrow {
  transform: rotate(-135deg);
}

.project-link:hover .project-arrow {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
  transform: rotate(0deg);
}

[dir='rtl'] .project-link:hover .project-arrow {
  transform: rotate(-180deg);
}

/* ───── Swiper overrides ───── */
.projects-wrapper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  opacity: 0.3;
  transition: opacity var(--transition-base),
    background-color var(--transition-base),
    width var(--transition-base);
  border-radius: 8px;
}

.projects-wrapper .swiper-pagination-bullet-active {
  opacity: 1;
  width: 24px;
  background: var(--primary-hover);
}

.projects-wrapper .swiper-button-prev,
.projects-wrapper .swiper-button-next {
  transform: scale(0.65);
  color: var(--primary-hover);
  margin-top: -32px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.projects-wrapper .swiper-button-prev:hover,
.projects-wrapper .swiper-button-next:hover {
  transform: scale(0.75);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .projects-section {
    padding: 64px 0;
  }

  .projects-wrapper {
    padding: 8px 0 32px;
  }

  .project-link {
    padding: 10px;
    border-radius: 8px;
  }

  .project-img {
    border-radius: 8px;
  }

  .project-tech {
    font-size: 0.88rem;
  }

  .projects-wrapper .swiper-button-prev,
  .projects-wrapper .swiper-button-next {
    display: none;
  }
}

@media (max-width: 480px) {
  .projects-section {
    padding: 56px 0;
  }

  .project-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
  }

  .project-link {
    border-radius: 8px;
  }
}


/* --- education.css --- */
/* ═══════════════════════════════════════
   EDUCATION SECTION
   ═══════════════════════════════════════ */

.education-section {
  padding: 80px 0;
  background: var(--bg-section);
}

.education-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───── Card ───── */
.education-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-spring),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.education-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-hover);
}

/* ───── Icon ───── */
.education-icon {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 4px 12px rgba(0, 100, 200, 0.15);
  flex-shrink: 0;
}

/* ───── Content ───── */
.education-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edu-college {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--title-color);
  letter-spacing: -0.3px;
  line-height: 1.4;
}

.edu-degree {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.edu-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  padding: 5px 16px;
  border-radius: 8px;
  width: fit-content;
}

[data-theme='dark'] .edu-status {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #040912;
}

.edu-details {
  margin-top: 4px;
  line-height: 1.8;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.edu-details a {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-base);
}

.edu-details a:hover {
  color: var(--accent);
}

/* ───── Courses ───── */
.edu-courses-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--title-color);
  margin-top: 12px;
}

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

.edu-courses li {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.1);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition-base);
}

.edu-courses li:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.2);
  color: var(--primary-hover);
}

[data-theme='dark'] .edu-courses li {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.1);
}

[data-theme='dark'] .edu-courses li:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.2);
  color: var(--accent);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .education-card {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .education-section {
    padding: 64px 0;
  }

  .education-card {
    padding: 24px;
    border-radius: 8px;
  }

  .education-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
    border-radius: 8px;
  }

  .edu-college {
    font-size: 1.1rem;
  }

  .edu-degree {
    font-size: 0.85rem;
  }

  .edu-details {
    font-size: 0.85rem;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: start;
  }

  .edu-courses li {
    font-size: 0.78rem;
    padding: 5px 12px;
  }
}


/* --- contact.css --- */
/* ═══════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════ */

.contact-section {
  padding: 80px 0;
  background: var(--bg-section-alt);
}

.contact-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

/* ───── Inputs ───── */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: var(--primary-hover);
}

[data-theme='dark'] .contact-form input:hover,
[data-theme='dark'] .contact-form textarea:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22);
}

[data-theme='dark'] .contact-form input:focus,
[data-theme='dark'] .contact-form textarea:focus {
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

/* ───── RTL / LTR Phone Input ───── */
html[dir='rtl'] .contact-form input[type='tel'],
html[dir='rtl'] .contact-form input[type='tel']::placeholder {
  direction: rtl;
  text-align: right;
}

html[dir='ltr'] .contact-form input[type='tel'],
html[dir='ltr'] .contact-form input[type='tel']::placeholder {
  direction: ltr;
  text-align: left;
}

/* ───── Inline Validation States ───── */
.field-error {
  font-size: 0.82rem;
  color: #ef4444;
  margin-top: 5px;
  display: none;
  text-align: start;
  font-weight: 500;
}

.field-error.visible {
  display: block;
}

.contact-form input.is-invalid,
.contact-form textarea.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

.contact-form input.is-valid,
.contact-form textarea.is-valid {
  border-color: #10b981;
}

.contact-form input.is-valid:focus,
.contact-form textarea.is-valid:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.form-row input {
  flex: 1;
}

/* ───── Submit button ───── */
.send-btn {
  padding: 15px 40px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.08);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.send-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.12);
  transform: translateY(-2px);
}

.send-btn:active {
  transform: translateY(0) scale(0.98);
}

.send-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.send-btn .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: sendSpinner 0.8s linear infinite;
  margin-inline-end: 8px;
  vertical-align: -2px;
}

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

[data-theme='dark'] .send-btn {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #040912;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

[data-theme='dark'] .send-btn:hover {
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
  color: #040912;
}

[data-theme='dark'] .send-btn .spinner {
  border-color: rgba(4, 9, 18, 0.3);
  border-top-color: #040912;
}

/* ───── Form feedback ───── */
.form-message {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  display: none;
  text-align: center;
}

.form-message.success {
  display: block;
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.form-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

[data-theme='dark'] .form-message.success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme='dark'] .form-message.error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .contact-section {
    padding: 64px 0;
  }

  .form-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 56px 0;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px 16px;
    font-size: 0.92rem;
    border-radius: 8px;
  }

  .send-btn {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    border-radius: 8px;
  }
}


/* --- footer.css --- */
/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

.main-footer {
  background: var(--bg-footer);
  background-size: 400% 400%;
  animation: footerGradient 25s ease infinite;
  color: #fff;
  padding: 48px 0 24px;
}

@keyframes footerGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.footer-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

/* ───── Brand column ───── */
.footer-brand .footer-logo {
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: inline-block;
  /* Keep logo LTR even in RTL mode */
  direction: ltr;
  unicode-bidi: bidi-override;
}

.footer-brand .footer-logo-accent {
  color: var(--primary-hover);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 300px;
}

/* ───── Links column ───── */
.footer-links h4,
.footer-contact h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-base), transform var(--transition-base);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-hover);
  transform: translateX(3px);
}

[dir='rtl'] .footer-links a:hover {
  transform: translateX(-3px);
}

/* ───── Contact column ───── */
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item i {
  font-size: 0.95rem;
  color: var(--primary-hover);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-base);
}

.footer-contact-item a:hover {
  color: var(--primary-hover);
}

/* ───── Bottom bar — CENTERED ───── */
.footer-bottom {
  max-width: 1200px;
  width: 100%;
  margin: 32px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-copyright {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-copyright strong {
  color: var(--primary-hover);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .main-footer {
    padding: 40px 0 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
    padding: 0 20px;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-links ul {
    align-items: center;
  }

  .footer-contact-item {
    justify-content: center;
  }

  .footer-bottom {
    justify-content: center;
    padding: 20px 20px 0;
  }
}

@media (max-width: 480px) {
  .main-footer {
    padding: 32px 0 16px;
  }

  .footer-inner {
    padding: 0 16px;
  }

  .footer-brand .footer-logo {
    font-size: 1.2rem;
  }

  .footer-copyright {
    font-size: 0.75rem;
  }

  .footer-bottom {
    padding: 16px 16px 0;
  }
}


/* ═══════════════════════════════════════
   LANGUAGE DROPDOWN
   ═══════════════════════════════════════ */

.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-chevron {
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.lang-dropdown.active .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 2000;
}

[data-theme='dark'] .lang-menu {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[dir='rtl'] .lang-menu {
  right: auto;
  left: 0;
}

.lang-dropdown.active .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

[dir='rtl'] .lang-option {
  text-align: right;
}

.lang-option:hover {
  background-color: rgba(2, 132, 199, 0.06);
  color: #0284c7;
}

[data-theme='dark'] .lang-option:hover {
  background-color: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
}

.lang-flag {
  font-size: 1.1rem;
}