:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e2e8f0;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
}
[dir="ltr"] body, body.ltr { font-family: 'Inter', 'Cairo', system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 1rem;
}
.logo { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.2rem; margin-inline-start: auto; }
.nav-links a { color: var(--text); font-weight: 600; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; margin-inline-start: auto; }
.lang-btn {
  background: var(--accent); color: #fff; border: none;
  padding: .45rem .9rem; border-radius: 999px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.lang-btn:hover { background: var(--accent-dark); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1e3a8a, #2563eb 55%, #38bdf8);
  color: #fff; text-align: center;
  padding: 4rem 1rem 3.5rem;
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.avatar {
  width: 150px; height: 150px; object-fit: cover;
  border-radius: 50%; border: 4px solid rgba(255,255,255,.85);
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2.6rem; font-weight: 800; }
.tagline { font-size: 1.25rem; opacity: .95; margin: .3rem 0 .8rem; }
.intro { opacity: .88; max-width: 560px; margin: 0 auto 1.5rem; }
.hero-buttons { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .7rem 1.5rem;
  border-radius: 999px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: 2px solid transparent; font-size: 1rem;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #fff; color: #1e3a8a; }
.btn-primary:hover { background: #e0e7ff; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.contact-form .btn-primary { background: var(--accent); color: #fff; }
.contact-form .btn-primary:hover { background: var(--accent-dark); }

/* Sections */
.section { max-width: 960px; margin: 0 auto; padding: 3rem 1rem; }
.section h2 { font-size: 1.8rem; margin-bottom: 1.2rem; text-align: center; }
.section-note { text-align: center; color: var(--muted); margin-bottom: 1.2rem; }
.about-card, .contact-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem;
  box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.facts { list-style: none; margin-top: 1rem; }
.facts li { padding: .4rem 0; border-top: 1px solid var(--border); }

/* Work */
.work-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.work-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.work-card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.work-card p { color: var(--muted); font-size: .95rem; }

/* Gallery */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.photo-slot {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-align: center;
}
.photo-slot img { width: 100%; height: 200px; object-fit: cover; display: block; }
.photo-slot.empty img { display: none; }
.photo-slot.empty::before {
  content: "＋";
  display: flex; align-items: center; justify-content: center;
  height: 140px; font-size: 2.5rem; color: var(--muted);
  background: #f1f5f9;
}
.photo-slot figcaption { padding: .6rem; color: var(--muted); font-size: .9rem; }

/* Social */
.social-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.social-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--text); font-weight: 700;
  transition: transform .15s, box-shadow .15s;
}
.social-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.social-icon { font-size: 1.8rem; }
.social-card[href="#"] { opacity: .55; }

/* Contact */
.contact-card { text-align: center; }
.email-link { font-size: 1.15rem; font-weight: 700; word-break: break-all; }
.contact-form { max-width: 520px; margin: 1.5rem auto 0; display: flex; flex-direction: column; gap: .8rem; }
.contact-form input, .contact-form textarea {
  padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

footer { text-align: center; padding: 2rem 1rem; color: var(--muted); border-top: 1px solid var(--border); }

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    background: #fff; flex-direction: column; padding: 1rem;
    border-bottom: 1px solid var(--border); gap: .8rem;
  }
  .nav-links.open { display: flex; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
}
