

/* ── Design tokens ── */
:root {
  --bg:      #0a0e17;
  --bg2:     #111827;
  --bg3:     #1a2235;
  --accent:  #00e5b4;
  --accent2: #3b82f6;
  --text:    #e8eaf2;
  --muted:   #7a8499;
  --border:  rgba(255, 255, 255, 0.07);

  --font-display: 'Fraunces', Georgia, serif;
  --font-mono:    'DM Mono', monospace;
  --font-arabic:  'Cairo', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background:   var(--bg);
  color:        var(--text);
  font-family:  var(--font-mono);
  font-size:    15px;
  line-height:  1.7;
  overflow-x:   hidden;
}

body.ar { font-family: var(--font-arabic); }

/* Grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,180,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,180,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
header {
  position:        fixed;
  top: 0; left: 0; right: 0;
  z-index:         100;
  background:      rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom:   1px solid var(--border);
}

nav { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.nav-container {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  height:          60px;
}

.logo {
  font-family:  var(--font-display);
  font-size:    1.1rem;
  font-weight:  300;
  color:        var(--text);
}

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

.nav-links {
  list-style: none;
  display:    flex;
  gap:        2rem;
}

.nav-links a {
  text-decoration: none;
  color:           var(--muted);
  font-size:       0.78rem;
  letter-spacing:  0.08em;
  text-transform:  uppercase;
  transition:      color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

body.ar .nav-links a { letter-spacing: 0; }

/* Language switcher */
.lang-switcher { display: flex; gap: 4px; align-items: center; margin-inline-start: 1.5rem; }

.lang-btn {
  background:     transparent;
  border:         1px solid var(--border);
  color:          var(--muted);
  font-family:    var(--font-mono);
  font-size:      0.7rem;
  letter-spacing: 0.06em;
  padding:        3px 8px;
  border-radius:  2px;
  cursor:         pointer;
  transition:     0.2s;
  text-transform: uppercase;
}

.lang-btn:hover         { border-color: var(--accent); color: var(--accent); }
.lang-btn.active        { background: var(--accent); color: #0a0e17; border-color: var(--accent); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;background:rgba(0,0,0); }
.hamburger span { display: block; width: 22px; height: 1.5px; background-color: white; transition: 0.3s; }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display:    flex;
  align-items: center;
  position:   relative;
  z-index:    1;
  padding:    100px 1.5rem 60px;
}

.hero-content {
  max-width:             1100px;
  margin:                0 auto;
  width:                 100%;
  display:               grid;
  grid-template-columns: 1fr 340px;
  gap:                   4rem;
  align-items:           center;
}

.hero-label {
  font-size:      0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  1.2rem;
  display:        flex;
  align-items:    center;
  gap:            10px;
}

.hero-label::before {
  content:    '';
  display:    inline-block;
  width:      28px;
  height:     1px;
  background: var(--accent);
  flex-shrink: 0;
}

body.ar .hero-label { letter-spacing: 0; }

.hero-text h1 {
  font-family:    var(--font-display);
  font-size:      clamp(2.8rem, 6vw, 5rem);
  font-weight:    300;
  line-height:    1.05;
  letter-spacing: -0.02em;
  color:          var(--text);
  margin-bottom:  1.5rem;
}

body.ar .hero-text h1 { font-family: var(--font-arabic); letter-spacing: 0; }

.hero-text h1 em { font-style: italic; color: var(--accent); }

.hero-desc {
  color:         var(--muted);
  font-size:     0.9rem;
  max-width:     480px;
  margin-bottom: 2.5rem;
  line-height:   1.8;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display:         inline-block;
  padding:         0.65rem 1.6rem;
  font-family:     var(--font-mono);
  font-size:       0.78rem;
  letter-spacing:  0.06em;
  text-decoration: none;
  border-radius:   2px;
  transition:      0.2s;
  cursor:          pointer;
  border:          none;
}

body.ar .btn { font-family: var(--font-arabic); letter-spacing: 0; }

.btn-primary          { background: var(--accent); color: #0a0e17; }
.btn-primary:hover    { background: #00c9a0; }
.btn-outline          { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover    { background: rgba(0,229,180,0.07); }

/* Profile image */
.hero-image { position: relative; }

.profile-wrap { position: relative; width: 280px; margin: 0 auto; }

.profile-wrap::before {
  content:      '';
  position:     absolute;
  inset:        -12px;
  border:       1px solid rgba(0,229,180,0.25);
  border-radius: 4px;
}

.profile-wrap::after {
  content:      '';
  position:     absolute;
  inset:        -24px;
  border:       1px solid rgba(0,229,180,0.08);
  border-radius: 4px;
}

.profile-pic {
  width:         100%;
  aspect-ratio:  3/4;
  object-fit:    cover;
  border-radius: 2px;
  display:       block;
  filter:        grayscale(20%);
}

/* Stats */
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; }

.stat-num {
  font-family:  var(--font-display);
  font-size:    2rem;
  font-weight:  600;
  color:        var(--accent);
  line-height:  1;
}

.stat-label {
  font-size:      0.72rem;
  color:          var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top:     4px;
}

body.ar .stat-label { letter-spacing: 0; }

/* ══════════════════════════════════════
   SHARED SECTION STYLES
══════════════════════════════════════ */
section { position: relative; z-index: 1; min-height: 100vh}

.container { max-width: 1100px; margin: 0 auto; padding: 100px 1.5rem; align-items:    center;}

.section-label {
  font-size:      0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  1rem;
  display:        flex;
  align-items:    center;
  gap:            10px;
}

.section-label::before {
  content:    '';
  display:    inline-block;
  width:      28px;
  height:     1px;
  background: var(--accent);
  flex-shrink: 0;
}

body.ar .section-label { letter-spacing: 0; }

.section-title {
  font-family:    var(--font-display);
  font-size:      clamp(2rem, 4vw, 3rem);
  font-weight:    300;
  letter-spacing: -0.02em;
  color:          var(--text);
  margin-bottom:  3rem;
}

body.ar .section-title { font-family: var(--font-arabic); letter-spacing: 0; }

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
#about { background: var(--bg2); }

.about-grid {
  display:               grid;
  grid-template-columns: 1fr 320px;
  gap:                   5rem;
  align-items:           start;
}

.about-body p {
  color:         var(--muted);
  margin-bottom: 1.2rem;
  font-size:     0.9rem;
  line-height:   1.9;
}

.about-body p strong { color: var(--text); font-weight: 500; }

.about-img img { width: 100%; border-radius: 2px; }

.highlight-bar {
  border-left:  3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding:      1.2rem 1.5rem;
  margin:       3rem 0;
  font-size:    0.88rem;
  color:        var(--text);
  font-style:   italic;
  background:   linear-gradient(90deg, rgba(0,229,180,0.08), transparent);
}

html[dir="rtl"] .highlight-bar {
  border-left:  none;
  border-right: 3px solid var(--accent);
  border-radius: 4px 0 0 4px;
  background:   linear-gradient(270deg, rgba(0,229,180,0.08), transparent);
}

/* ══════════════════════════════════════
   SKILLS
══════════════════════════════════════ */
.skills-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap:                   1px;
  background:            var(--border);
  border:                1px solid var(--border);
  border-radius:         4px;
  overflow:              hidden;
}

.skill-card { background: var(--bg); padding: 1.8rem 1.5rem; transition: background 0.2s; }
.skill-card:hover { background: var(--bg3); }

.skill-icon { font-size: 1.4rem; margin-bottom: 1rem; }

.skill-card h3 {
  font-size:      0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  0.6rem;
  font-weight:    400;
}

body.ar .skill-card h3 { letter-spacing: 0; }

.skill-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* ══════════════════════════════════════
   COMMUNITY
══════════════════════════════════════ */
#associative { background: var(--bg2); }

.assoc-list {
  display:        flex;
  flex-direction: column;
  gap:            1px;
  background:     var(--border);
  border:         1px solid var(--border);
  border-radius:  4px;
  overflow:       hidden;
}

.assoc-item {
  background:  var(--bg2);
  padding:     1.1rem 1.5rem;
  font-size:   0.85rem;
  color:       var(--muted);
  display:     flex;
  align-items: center;
  gap:         1rem;
  transition:  background 0.2s;
}

.assoc-item:hover { background: var(--bg3); color: var(--text); }

.assoc-item::before {
  content:    '//';
  color:      var(--accent);
  font-size:  0.72rem;
  flex-shrink: 0;
  opacity:    0.7;
}

/* ══════════════════════════════════════
   PROJECTS
══════════════════════════════════════ */
.projects-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:                   1px;
  background:            var(--border);
  border:                1px solid var(--border);
  border-radius:         4px;
  overflow:              hidden;
}

.project-card {
  background: var(--bg);
  padding:    2rem 1.8rem;
  transition: background 0.2s;
  cursor:     default;
  position:   relative;
  overflow:   hidden;
}

.project-card[data-href] { cursor: pointer; }
.project-card:hover      { background: var(--bg3); }

.project-card::before {
  content:          '';
  position:         absolute;
  top: 0; left: 0; right: 0;
  height:           2px;
  background:       var(--accent);
  transform:        scaleX(0);
  transform-origin: left;
  transition:       transform 0.3s;
}

html[dir="rtl"] .project-card::before { transform-origin: right; }
.project-card:hover::before           { transform: scaleX(1); }

.project-tag {
  display:        inline-block;
  font-size:      0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  1rem;
  opacity:        0.8;
}

.project-card h3 {
  font-family:   var(--font-display);
  font-size:     1.2rem;
  font-weight:   300;
  color:         var(--text);
  margin-bottom: 0.8rem;
  line-height:   1.3;
}

body.ar .project-card h3 { font-family: var(--font-arabic); }

.project-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

.project-arrow {
  display:    inline-block;
  margin-top: 1.2rem;
  font-size:  0.78rem;
  color:      var(--accent);
  opacity:    0;
  transition: opacity 0.2s;
}

.project-card[data-href]:hover .project-arrow { opacity: 1; }

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
#contact { background: var(--bg2); }

.contact-grid {
  display:               grid;
  grid-template-columns: 1fr 1.4fr;
  gap:                   5rem;
  align-items:           start;
}

.contact-info p {
  font-size:     0.88rem;
  color:         var(--muted);
  line-height:   1.8;
  margin-bottom: 2rem;
}

.contact-links { display: flex; flex-direction: column; gap: 0.8rem; }

.contact-link {
  display:         flex;
  align-items:     center;
  gap:             0.8rem;
  font-size:       0.82rem;
  color:           var(--muted);
  text-decoration: none;
  transition:      color 0.2s;
}

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

.contact-link-dot {
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    var(--accent);
  flex-shrink:   0;
}

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.contact-form input,
.contact-form textarea {
  background:    var(--bg3);
  border:        1px solid var(--border);
  border-radius: 2px;
  padding:       0.9rem 1.1rem;
  font-family:   var(--font-mono);
  font-size:     0.85rem;
  color:         var(--text);
  width:         100%;
  transition:    border-color 0.2s;
  outline:       none;
}

body.ar .contact-form input,
body.ar .contact-form textarea { font-family: var(--font-arabic); }

.contact-form input:focus,
.contact-form textarea:focus    { border-color: rgba(0,229,180,0.4); }

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

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

#response { font-size: 0.82rem; margin-top: 0.5rem; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  border-top:  1px solid var(--border);
  text-align:  center;
  padding:     2rem 1.5rem;
  font-size:   0.78rem;
  color:       var(--muted);
  position:    relative;
  z-index:     1;
}

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
.fade-up {
  opacity:    0;
  transform:  translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }

  .nav-links.open {
    display:        flex;
    flex-direction: column;
    position:       absolute;
    top:            60px;
    left: 0; right: 0;
    background:     rgba(10,14,23,0.97);
    padding:        1.5rem;
    gap:            1.2rem;
    border-bottom:  1px solid var(--border);
  }

  .hero-content          { grid-template-columns: 1fr; }
  .hero-image            { display: none; }
  .about-grid            { grid-template-columns: 1fr; }
  .about-img             { display: none; }
  .contact-grid          { grid-template-columns: 1fr; }
  .lang-switcher         { margin-inline-start: 0.5rem; }
}

/* ══════════════════════════════════════
   SEO / ACCESSIBILITY UTILITIES
══════════════════════════════════════ */

/* Screen-reader only text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content */
.skip-link {
  position:    absolute;
  top:         -100%;
  left:        1rem;
  background:  var(--accent);
  color:       #0a0e17;
  padding:     0.5rem 1rem;
  font-size:   0.8rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  z-index:     999;
  transition:  top 0.2s;
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════
   NAV — Hire Me CTA
══════════════════════════════════════ */
.nav-hire {
  color:         var(--accent) !important;
  border:        1px solid var(--accent);
  border-radius: 2px;
  padding:       4px 12px !important;
  transition:    background 0.2s, color 0.2s !important;
}
.nav-hire:hover {
  background: var(--accent) !important;
  color:      #0a0e17 !important;
}

/* ══════════════════════════════════════
   HIRE BADGE (hero)
══════════════════════════════════════ */
.hire-badge {
  display:       inline-flex;
  align-items:   center;
  gap:           8px;
  background:    rgba(0, 229, 180, 0.08);
  border:        1px solid rgba(0, 229, 180, 0.3);
  border-radius: 100px;
  padding:       5px 14px 5px 10px;
  font-size:     0.75rem;
  color:         var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hire-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    var(--accent);
  box-shadow:    0 0 0 0 rgba(0, 229, 180, 0.6);
  animation:     pulse-dot 1.8s ease-in-out infinite;
  flex-shrink:   0;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,180,0.5); }
  50%       { box-shadow: 0 0 0 7px rgba(0,229,180,0); }
}

/* ══════════════════════════════════════
   SERVICES LIST (hero)
══════════════════════════════════════ */
.services-list {
  list-style:    none;
  display:       flex;
  flex-wrap:     wrap;
  gap:           0.5rem 1.4rem;
  margin:        1.8rem 0;
  padding:       0;
}
.services-list li {
  font-size:  0.8rem;
  color:      var(--muted);
  transition: color 0.2s;
}
.services-list li:hover { color: var(--text); }

/* ══════════════════════════════════════
   HIRE ME BUTTON VARIANT
══════════════════════════════════════ */
.btn-hire {
  background:    var(--accent);
  color:         #0a0e17;
  font-weight:   500;
  position:      relative;
  overflow:      hidden;
}
.btn-hire::after {
  content:    '';
  position:   absolute;
  inset:      0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn-hire:hover::after { background: rgba(255,255,255,0.12); }

/* ══════════════════════════════════════
   ABOUT CTA
══════════════════════════════════════ */
.about-cta { margin-top: 2rem; }

/* ══════════════════════════════════════
   HIRE SECTION
══════════════════════════════════════ */
#hire { background: var(--bg); }

.hire-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:                   1px;
  background:            var(--border);
  border:                1px solid var(--border);
  border-radius:         4px;
  overflow:              hidden;
  margin-bottom:         3rem;
}

.hire-card {
  background:  var(--bg2);
  padding:     2rem 1.8rem;
  transition:  background 0.2s;
  position:    relative;
  overflow:    hidden;
}
.hire-card::before {
  content:          '';
  position:         absolute;
  top: 0; left: 0; right: 0;
  height:           2px;
  background:       var(--accent);
  transform:        scaleX(0);
  transform-origin: left;
  transition:       transform 0.3s;
}
html[dir="rtl"] .hire-card::before { transform-origin: right; }
.hire-card:hover { background: var(--bg3); }
.hire-card:hover::before { transform: scaleX(1); }

.hire-card-icon {
  font-size:     1.8rem;
  margin-bottom: 1rem;
}

.hire-card h3 {
  font-family:   var(--font-display);
  font-size:     1rem;
  font-weight:   300;
  color:         var(--text);
  margin-bottom: 0.6rem;
}
body.ar .hire-card h3 { font-family: var(--font-arabic); }

.hire-card p {
  font-size:  0.82rem;
  color:      var(--muted);
  line-height: 1.7;
}

/* Hire CTA strip */
.hire-cta {
  text-align:  center;
  padding:     3rem 1.5rem;
  border:      1px solid var(--border);
  border-radius: 4px;
  background:  var(--bg2);
}

.hire-cta p {
  color:         var(--muted);
  font-size:     0.88rem;
  margin-bottom: 1.8rem;
  line-height:   1.7;
}

.hire-cta-btns {
  display:   flex;
  gap:       1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-hire-lg {
  font-size: 0.9rem;
  padding:   0.8rem 2rem;
}

/* ══════════════════════════════════════
   FOOTER ENHANCED
══════════════════════════════════════ */
.footer-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  flex-wrap:       wrap;
  gap:             1rem;
  max-width:       1100px;
  margin:          0 auto;
  padding:         0 1.5rem;
}

.footer-links {
  display:     flex;
  gap:         1.5rem;
  flex-wrap:   wrap;
}

.footer-links a {
  font-size:       0.78rem;
  color:           var(--muted);
  text-decoration: none;
  transition:      color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ══════════════════════════════════════
   LOGO as <a> tag fix
══════════════════════════════════════ */
a.logo {
  text-decoration: none;
  font-family:     var(--font-display);
  font-size:       1.1rem;
  font-weight:     300;
  color:           var(--text);
}
a.logo span { color: var(--accent); }

/* ══════════════════════════════════════
   RESPONSIVE ADDITIONS
══════════════════════════════════════ */
@media (max-width: 768px) {
  .hire-cta-btns  { flex-direction: column; align-items: center; }
  .footer-inner   { flex-direction: column; text-align: center; }
  .services-list  { flex-direction: column; gap: 0.4rem; }
}
