/* ============================================
   Portfolio | HTML + CSS only
   غيّر الألوان الأساسية من المتغيرات التالية.
   ============================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --ink: #111827;
  --muted: #64748b;
  --paper: #ffffff;
  --background: #f8fafc;
  --border: #e7eaf0;
  --radius: 18px;
  --shadow: 0 16px 44px rgba(15, 23, 42, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid #818cf8; outline-offset: 4px; border-radius: 6px; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: 840px; }
.section { padding-block: 92px; }
.section-muted { background: var(--background); }
.accent { color: var(--primary); }

.skip-link { position: absolute; top: -80px; right: 12px; padding: 8px 15px; background: white; z-index: 20; }
.skip-link:focus { top: 8px; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); }
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 9px; align-items: center; font-size: 1.3rem; font-weight: 800; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; color: white; background: var(--primary); width: 37px; height: 37px; border-radius: 10px; font: 800 .92rem/1 monospace; direction: ltr; }
.brand-dot { color: var(--primary); }
.nav-links { display: flex; gap: clamp(14px, 2.7vw, 32px); flex-wrap: wrap; }
.nav-links a { font-size: .88rem; font-weight: 700; color: #475569; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }

.hero { padding-block: 100px 108px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 70px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--primary-dark); background: #eef2ff; padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.4rem, 5.3vw, 4.1rem); line-height: 1.43; letter-spacing: -.05em; margin: 22px 0 16px; }
.hero-description { font-size: 1.09rem; color: var(--muted); max-width: 560px; line-height: 2; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.btn { min-height: 48px; padding: 10px 23px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 11px; font-weight: 800; font-size: .92rem; transition: transform .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 1px solid #cbd5e1; background: #fff; }
.btn-outline:hover { border-color: var(--primary); }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 29px; color: #64748b; font-size: .85rem; }
.meta-icon { color: var(--primary); font-weight: 800; margin-left: 4px; }

.hero-visual { min-width: 0; position: relative; padding: 25px 6px; }
.visual-glow { position: absolute; inset: 14% 0; background: radial-gradient(ellipse, #c7d2fe 0%, #e0e7ff 42%, transparent 75%); filter: blur(31px); opacity: .8; }
.profile-card { position: relative; max-width: 440px; margin-inline: auto; background: white; border: 1px solid #dce3ef; border-radius: 20px; box-shadow: 0 30px 80px rgba(79,70,229,.12); overflow: hidden; transform: rotate(-2deg); }
.card-top { height: 49px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.window-dots { display: flex; gap: 6px; }
.window-dots i { display: block; height: 9px; width: 9px; border-radius: 100%; background: #cbd5e1; }
.window-dots i:first-child { background: #a5b4fc; }
.file-name { direction: ltr; font: 12px/1 monospace; color: #94a3b8; }
.card-inner { padding: 28px 30px 32px; }
.avatar { display: grid; place-items: center; width: 69px; height: 69px; border-radius: 18px; background: #eef2ff; color: var(--primary); font: 800 1.4rem/1 monospace; direction: ltr; margin-bottom: 24px; }
.code-caption { color: #94a3b8; font-size: .82rem; margin-bottom: 14px; }
.card-inner > p:not(.code-caption) { font-size: .92rem; color: #475569; margin-bottom: 9px; }
.code-key { font-weight: 800; color: var(--ink); }
.card-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 7px; }
.card-tags span { direction: ltr; font: 700 .76rem/1.4 Tahoma, Arial, sans-serif; color: var(--primary-dark); background: #eef2ff; border-radius: 6px; padding: 6px 10px; }
.floating-label { position: absolute; padding: 8px 12px; border-radius: 10px; color: var(--primary); background: white; box-shadow: var(--shadow); font: 800 .86rem/1.4 monospace; direction: ltr; }
.floating-label-one { top: 6px; left: -13px; transform: rotate(8deg); }
.floating-label-two { bottom: 2px; right: -8px; transform: rotate(7deg); }

.section-heading { margin-bottom: 33px; }
.section-kicker { display: block; margin-bottom: 7px; color: var(--primary); font-size: .79rem; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3vw, 2.3rem); line-height: 1.5; letter-spacing: -.025em; margin-bottom: 8px; }
.section-heading > p { color: var(--muted); font-size: .95rem; margin: 0; }
.about-text { font-size: 1.04rem; line-height: 2.2; color: #475569; margin-bottom: 27px; }
.about-points { display: flex; gap: 12px; flex-wrap: wrap; }
.about-points span { background: white; border: 1px solid var(--border); padding: 8px 18px; border-radius: 9px; font-size: .87rem; font-weight: 700; }
.about-points span::before { content: '✓'; color: var(--primary); margin-left: 8px; }

.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.skill-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 27px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.skill-card:hover { border-color: #c7d2fe; transform: translateY(-3px); box-shadow: var(--shadow); }
.skill-symbol { width: 49px; height: 49px; border-radius: 13px; background: #eef2ff; color: var(--primary); display: grid; place-items: center; font-size: 1.55rem; font-weight: 700; margin-bottom: 20px; }
h3 { font-size: 1.13rem; margin-bottom: 8px; }
.skill-card p, .project-card p { font-size: .88rem; line-height: 1.95; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.pills span { direction: ltr; background: #f1f5f9; color: #475569; border-radius: 7px; font-size: .77rem; font-weight: 700; padding: 5px 10px; }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.project-card { overflow: hidden; background: white; border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-banner { height: 180px; display: grid; place-items: center; }
.banner-one { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }
.banner-two { background: linear-gradient(135deg, #d9f4ef, #bce9e3); color: #0f766e; }
.project-banner > span { font: 800 3.2rem/1 monospace; direction: ltr; opacity: .75; }
.project-body { padding: 26px; }
.project-label { display: inline-block; font-size: .77rem; color: var(--primary); font-weight: 800; margin-bottom: 6px; }
.project-body p { margin-bottom: 14px; }

.contact-panel { background: linear-gradient(130deg, #4338ca, #4f46e5 62%, #6366f1); text-align: center; color: white; border-radius: 25px; padding: 64px 24px; }
.contact-panel .section-kicker { color: #c7d2fe; }
.contact-panel h2 { margin-bottom: 10px; }
.contact-panel p { margin-bottom: 24px; color: #e0e7ff; }
.btn-light { color: var(--primary-dark); background: white; }
.btn-light:hover { background: #eef2ff; }
.social-links { margin-top: 24px; display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.social-links a { font-size: .88rem; font-weight: 700; color: #e0e7ff; }
.social-links a:hover { color: white; text-decoration: underline; }
.site-footer { border-top: 1px solid var(--border); padding-block: 23px; }
.footer-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #64748b; font-size: .81rem; }

@media (max-width: 850px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-block: 70px; }
  .hero-visual { width: min(100%, 460px); margin-inline: auto; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .container { width: min(100% - 28px, 1120px); }
  .section { padding-block: 65px; }
  .nav-wrap { justify-content: center; flex-direction: column; gap: 9px; padding-block: 12px; }
  .nav-links { gap: 13px; justify-content: center; }
  .nav-links a { font-size: .78rem; }
  html { scroll-padding-top: 130px; }
  h1 { font-size: 2.15rem; }
  .hero { padding-block: 52px 58px; }
  .hero-description { font-size: .99rem; }
  .hero-visual { padding-inline: 12px; }
  .profile-card { transform: none; }
  .floating-label-one { left: 0; }
  .floating-label-two { right: 0; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .project-banner { height: 140px; }
  .contact-panel { padding: 48px 19px; border-radius: 18px; }
  .footer-wrap { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ============================================
   Small additions to the ORIGINAL stylesheet:
   language & theme controls, text-only project cards,
   and dark-mode colors. The original layout remains.
   ============================================ */
button { font: inherit; cursor: pointer; }
.nav-side { display: flex; align-items: center; gap: 22px; }
.site-controls { display: flex; align-items: center; gap: 7px; padding-inline-start: 13px; border-inline-start: 1px solid var(--border); }
.control-button { min-width: 36px; height: 36px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); border-radius: 9px; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; }
.control-button:hover { border-color: var(--primary); color: var(--primary); }
.control-button:focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
.theme-toggle svg { width: 19px; height: 19px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* Text-only project cards, using the same original border, radius and shadow. */
.project-card { position: relative; }
.project-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, #818cf8, #4f46e5); }
.project-body { min-height: 268px; display: flex; flex-direction: column; align-items: flex-start; }
.project-topline { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.project-number { font: 700 .77rem/1.6 Tahoma, Arial, sans-serif; direction: ltr; color: var(--muted); }
.project-status { display: inline-flex; align-items: center; color: var(--primary-dark); background: #eef2ff; border-radius: 999px; padding: 3px 10px; font-size: .75rem; font-weight: 800; }
.project-status.status-live { color: #166534; background: #dcfce7; }
.project-status.status-soon { color: #92400e; background: #fef3c7; }
.project-body > p { margin-bottom: 0; }
.project-body .pills { margin-top: auto; padding-top: 19px; }
.contact-panel h2 { white-space: pre-line; }

/* Original light theme remains exactly as it was. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #a5b4fc;
  --primary-dark: #c7d2fe;
  --ink: #edf2fa;
  --muted: #a2afc2;
  --paper: #0c1322;
  --background: #131e30;
  --border: #2c3850;
  --shadow: 0 16px 44px rgba(0,0,0,.27);
}
:root[data-theme="dark"] .site-header { background: rgba(12,19,34,.97); }
:root[data-theme="dark"] .nav-links a { color: #b6c2d5; }
:root[data-theme="dark"] .nav-links a:hover { color: var(--primary); }
:root[data-theme="dark"] .brand-mark { color: #0c1322; }
:root[data-theme="dark"] .eyebrow { background: #252451; }
:root[data-theme="dark"] .hero-meta { color: var(--muted); }
:root[data-theme="dark"] .visual-glow { background: radial-gradient(ellipse, #333575 0%, #23284f 42%, transparent 75%); }
:root[data-theme="dark"] .profile-card,
:root[data-theme="dark"] .skill-card,
:root[data-theme="dark"] .project-card,
:root[data-theme="dark"] .about-points span,
:root[data-theme="dark"] .floating-label { background: #172339; border-color: var(--border); }
:root[data-theme="dark"] .profile-card { box-shadow: 0 30px 80px rgba(0,0,0,.35); }
:root[data-theme="dark"] .card-top { background: #1f2b41; }
:root[data-theme="dark"] .window-dots i { background: #62718b; }
:root[data-theme="dark"] .window-dots i:first-child { background: #818cf8; }
:root[data-theme="dark"] .file-name,
:root[data-theme="dark"] .code-caption { color: #98a8bf; }
:root[data-theme="dark"] .avatar,
:root[data-theme="dark"] .card-tags span,
:root[data-theme="dark"] .skill-symbol { background: #252451; }
:root[data-theme="dark"] .card-inner > p:not(.code-caption),
:root[data-theme="dark"] .about-text { color: #c3cede; }
:root[data-theme="dark"] .pills span { background: #29364b; color: #c9d3e2; }
:root[data-theme="dark"] .project-status { background: #252451; color: #c7d2fe; }
:root[data-theme="dark"] .project-status.status-live { background: #153d32; color: #86efac; }
:root[data-theme="dark"] .project-status.status-soon { background: #4b311b; color: #fcd34d; }
:root[data-theme="dark"] .btn-primary { background: #818cf8; color: #0b1020; }
:root[data-theme="dark"] .btn-primary:hover { background: #a5b4fc; }
:root[data-theme="dark"] .btn-outline { background: #172339; border-color: #465570; }
:root[data-theme="dark"] .btn-outline:hover { border-color: #818cf8; }
:root[data-theme="dark"] .btn-light { background: #fff; color: #3730a3; }
:root[data-theme="dark"] .contact-panel .section-kicker { color: #c7d2fe; }
:root[data-theme="dark"] .contact-panel p,
:root[data-theme="dark"] .contact-panel .social-links a { color: #e0e7ff; }
:root[data-theme="dark"] .skip-link { background: #172339; color: var(--ink); }
:root[dir="ltr"] .about-points span::before { margin-inline: 0 8px; }
:root[dir="rtl"] .about-points span::before { margin-inline: 0 0 8px; }
@media (max-width: 850px) {
  .nav-side { gap: 13px; }
  .nav-links { gap: 14px; }
}
@media (max-width: 650px) {
  .nav-wrap { flex-direction: column; justify-content: center; padding-block: 12px; gap: 11px; }
  .nav-side { flex-wrap: wrap; justify-content: center; gap: 9px 15px; }
  .site-controls { border-inline-start: 0; padding-inline-start: 0; }
  .project-body { min-height: 0; }
  html { scroll-padding-top: 175px; }
}
