/* ═══════════════════════════════════════════════
    LANGUAGE SWITCHER
═══════════════════════════════════════════════ */
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  display: flex; gap: 2px; padding: 3px;
  border: 1px solid var(--border-2); border-radius: 100px;
  background: var(--surface);
}
.lang-switch button {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-3); background: none; border: none;
  padding: 5px 10px; border-radius: 100px;
  transition: var(--transition);
}
.lang-switch button:hover { color: var(--text-1); }
.lang-switch button.active { background: var(--accent); color: #fff; }

/* ═══════════════════════════════════════════════
    PROJECT THUMBNAILS
═══════════════════════════════════════════════ */
.project-thumb {
  position: relative; z-index: 1;
  margin: -28px -28px 22px; height: 190px; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.project-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-card.featured .project-thumb { height: 250px; }

/* ═══════════════════════════════════════════════
    EDUCATION MINI LOGOS
═══════════════════════════════════════════════ */
.edu-school { gap: 10px; }
.edu-logo {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

/* ═══════════════════════════════════════════════
    ARABIC / RTL
═══════════════════════════════════════════════ */
[lang="ar"] {
  --font-sans:    'Cairo', 'Inter', system-ui, sans-serif;
  --font-display: 'Cairo', 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', 'Cairo', 'Courier New', monospace;
}
/* Arabic letters must stay connected — no tracking, no uppercase tricks */
[lang="ar"] *, [lang="ar"] *::before, [lang="ar"] *::after { letter-spacing: 0 !important; }
[lang="ar"] body { line-height: 1.8; }
[lang="ar"] .stat-lbl, [lang="ar"] .ach-lbl, [lang="ar"] .project-chip { text-transform: none; }
[lang="ar"] .hero-name { line-height: 1.2; }
[lang="ar"] .hero-subtitle, [lang="ar"] .about-text p, [lang="ar"] .project-desc,
[lang="ar"] .edu-desc, [lang="ar"] .work-desc, [lang="ar"] .contact-sub { line-height: 1.95; }

/* Mirrored layout details */
[dir="rtl"] .sec-line { background: linear-gradient(270deg, var(--border-2), transparent); }
[dir="rtl"] #scroll-progress { transform-origin: right; }
[dir="rtl"] .edu-year { text-align: left; padding-right: 0; padding-left: 20px; }
[dir="rtl"] .contact-link:hover { transform: translateX(-4px); }
[dir="rtl"] .terminal-name { margin-left: 0; margin-right: 8px; }

/* Code-like and Latin-only blocks stay left-to-right */
[dir="rtl"] .about-terminal { direction: ltr; text-align: left; }
[dir="rtl"] .nav-logo, [dir="rtl"] .hero-eyebrow,
[dir="rtl"] .footer-schools, [dir="rtl"] .footer-cursor { direction: ltr; }
[dir="rtl"] .stat-val { direction: ltr; text-align: right; }
[dir="rtl"] .ach-val { direction: ltr; }
[dir="rtl"] input[type="email"] { direction: ltr; text-align: right; }

/* ═══════════════════════════════════════════════
    RESPONSIVE ADDITIONS
═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .nav-badge { display: none; }
}
@media (max-width: 900px) {
  .nav-right { margin-inline-start: auto; margin-inline-end: 8px; }
  .project-card.featured .project-thumb { height: 200px; }
}
@media (max-width: 560px) {
  .project-thumb, .project-card.featured .project-thumb { height: 170px; }
  .lang-switch button { padding: 5px 8px; }
}

/* Mixed Latin/Arabic labels: let each pick its own direction so "C / C++" never flips */
[dir="rtl"] .skill-name, [dir="rtl"] .tag, [dir="rtl"] .edu-skill,
[dir="rtl"] .badge, [dir="rtl"] .project-chip, [dir="rtl"] .project-name,
[dir="rtl"] .edu-badge { unicode-bidi: plaintext; }

/* Wide featured card: keep the top of the illustration in frame */
.project-card.featured .project-thumb img { object-position: center 30%; }
