:root {
  --navy: #14375c;
  --navy-deep: #0e2742;
  --teal: #1b9aa3;
  --teal-soft: #e6f5f6;
  --gold: #c4a35a;
  --gold-soft: #f7f1e4;
  --surface: #ffffff;
  --canvas: #f7f9fb;
  --border: #e3e8ef;
  --text: #10233a;
  --muted: #5c6b7f;
  --danger: #b42318;
  --radius: 18px;
  --media-radius: 14px;
  --shadow: 0 8px 24px rgba(20, 55, 92, 0.07);
  --space-section: 96px;
  --space-block: 32px;
  --space-item: 24px;
  --card-pad: 28px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.65;
}

html[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", sans-serif;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

main.wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-section);
  padding-block: var(--space-block) var(--space-section);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.mark {
  width: 36px;
  height: 36px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  color: var(--navy);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
}

nav a[aria-current="page"] {
  background: var(--teal-soft);
  color: var(--teal);
}

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.lang-switch a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 9px;
  border-radius: 999px;
}

.lang-switch a[aria-current="true"] {
  background: var(--navy);
  color: #fff;
  text-decoration: none;
}

.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--navy);
}

.hero, .panel, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-block);
  padding: var(--card-pad);
  margin: 0;
  align-items: start;
}

.photo {
  width: 100%;
  height: 500px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 22px;
  background: var(--canvas);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.kicker {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 0 0 12px; }
h2 { font-size: 1.45rem; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-item);
  margin: 0;
}

.stat {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
}

.stat b {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--gold);
  margin-bottom: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-item);
}

.card { padding: var(--card-pad); }
.card h3 { margin-top: 0; }

.project-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-block);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-pad);
}

.project-card .tag {
  margin-bottom: 8px;
  align-self: start;
}

.project-card h3 {
  margin: 0 0 8px;
}

.project-card-summary {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.3em;
}

.project-card .shot-grid {
  margin: var(--space-item) 0;
}

.project-card .shot-grid figure,
.project-card .shot-placeholder {
  border-radius: var(--media-radius);
}

.project-card figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.project-card .shot-grid img {
  width: 100%;
  height: 458px;
  max-height: none;
  object-fit: cover;
  object-position: top center;
}

.phone-frame {
  border: 1px solid var(--border);
  border-radius: var(--media-radius);
  overflow: hidden;
  background: #eef2f6;
}

.phone-status {
  height: 22px;
  background: #dce3eb;
  position: relative;
}

.phone-status::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5ced8;
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.project-card-link {
  margin-top: auto;
  font-weight: 700;
  align-self: start;
}

.shot-placeholder {
  min-height: 0;
  height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--media-radius);
  overflow: hidden;
  box-shadow: none;
  text-align: center;
}

.shot-placeholder-navy {
  background: #3d5a78;
}

.shot-placeholder-teal {
  background: #4aafb6;
}

.ph-letter {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
}

.ph-caption {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  max-width: 12em;
}

.tag {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--navy);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-inline-end: 6px;
  margin-bottom: 6px;
}

.section { margin: 0; }
.section-head { margin-bottom: var(--space-block); }

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.table th, .table td {
  text-align: start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table th {
  background: var(--navy);
  color: #fff;
  width: 28%;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.num {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gold-soft);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.note {
  background: var(--gold-soft);
  border-inline-start: 4px solid var(--gold);
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--navy);
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-item);
  margin: var(--space-item) 0;
}

.shot-grid figure {
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--media-radius);
  overflow: hidden;
  box-shadow: none;
}

.shot-grid img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--canvas);
}

.shot-phone img {
  max-height: 560px;
  object-fit: contain;
}

.shot-wide {
  grid-column: 1 / -1;
}

.shot-grid figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}


form {
  position: relative;
  display: grid;
  gap: 12px;
}

label { font-weight: 700; color: var(--navy); }

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
}

.hp {
  position: absolute !important;
  inset-inline-start: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.links { display: grid; gap: 8px; }

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.draft-note {
  margin: 0;
  padding: 8px 0;
  font-size: 12px;
  color: var(--navy);
  background: var(--gold-soft);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 860px) {
  :root {
    --space-section: 56px;
    --card-pad: 24px;
  }
  .hero {
    padding: var(--card-pad);
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .actions .btn { width: 100%; }
  .hero, .stats, .grid, .step, .table th, .project-list {
    grid-template-columns: 1fr;
  }
  .photo {
    height: 320px;
  }
  .project-card .shot-grid img {
    height: 298px;
  }
  .shot-placeholder {
    height: 320px;
  }
  .ph-letter {
    font-size: 48px;
  }
  .table, .table tbody, .table tr, .table th, .table td {
    display: block;
    width: 100%;
  }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  nav {
    display: none;
    position: absolute;
    inset-inline: 16px;
    top: 72px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  nav.open { display: flex; }
}
