/* ---------------------------------------------------------------------------
   Sub-page phone pass, 29 Sep 2026.
   Loaded after the inline <style> on all 15 section pages (EN + AR).
   Research: ~/claude/research/appllama-alizaabi-20260929/FIXES.md
   --------------------------------------------------------------------------- */

/* Tags read better in sentence case at 13 px (fix 7). */
.sp-tags li { font-size: 13px; text-transform: none; letter-spacing: 0; padding: 5px 12px; }

/* Contact actions (fix 3): three tiles, email, LinkedIn, CV. */
.sp-actions {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.sp-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 88px; padding: 14px 8px; border-radius: 16px;
  background: var(--white); box-shadow: var(--shadow);
  color: var(--black-72); text-decoration: none; font-size: 14px; font-weight: 500; text-align: center;
}
.dark-mode .sp-action { background: #171717; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.sp-action .sp-action-ic {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #0a0a0a;
}
.sp-action svg { width: 20px; height: 20px; }
.sp-action:active { transform: scale(0.97); }

/* Timeline rail (fix 4): Experience, Education, Awards. */
.sp-tl .sp-card { position: relative; margin-inline-start: 26px; }
.sp-tl .sp-card::before {
  content: ""; position: absolute; inset-inline-start: -17px; top: 0; bottom: -16px;
  width: 2px; background: var(--black-15);
}
.sp-tl .sp-card:first-of-type::before { top: 30px; }
.sp-tl .sp-card:last-of-type::before { bottom: auto; height: 30px; }
.sp-tl .sp-card::after {
  content: ""; position: absolute; inset-inline-start: -23px; top: 24px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px var(--surface, var(--bg));
}
.dark-mode .sp-tl .sp-card::after { box-shadow: 0 0 0 4px var(--dark); }

/* Section cards that navigate (fix 5): the whole card is the link, with a chevron. */
.sp-card:has(> h3:first-child > a) { position: relative; padding-inline-end: 52px; }
.sp-card > h3:first-child > a::before { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.sp-card:has(> h3:first-child > a)::after {
  content: ""; position: absolute; inset-inline-end: 24px; top: 50%;
  width: 9px; height: 9px; margin-top: -5px;
  border-top: 2px solid var(--black-40); border-right: 2px solid var(--black-40);
  transform: rotate(45deg);
}
[dir="rtl"] .sp-card:has(> h3:first-child > a)::after { transform: rotate(-135deg); }
.sp-card:has(> h3:first-child > a):active { transform: scale(0.99); }

@media (max-width: 640px) {
  /* Header (fix 1): one line of tools, one line of tabs that scrolls sideways. */
  .sp-header-in { padding: 6px 16px 0; gap: 0 8px; }
  .sp-brand { min-height: 44px; }
  .sp-lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 13px; }
  .sp-tools .tf-btn-icon { width: 44px; height: 44px; }
  .sp-nav {
    width: calc(100% + 32px); margin: 0 -16px;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
  }
  .sp-nav::-webkit-scrollbar { display: none; }
  .sp-nav ul { flex-wrap: nowrap; gap: 0 2px; padding: 0 16px; width: max-content; }
  .sp-nav a {
    display: flex; align-items: center; min-height: 44px; padding: 0 10px;
    font-size: 14px; white-space: nowrap; border-bottom-width: 2px;
  }
  .sp-main { padding-top: 24px; }

  /* Footer sitemap (fix 6): two columns of 44 px rows. */
  .sp-sitemap { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .sp-sitemap a {
    display: flex; align-items: center; min-height: 44px; font-size: 15px;
    border-bottom: 1px solid var(--black-15);
  }
  .sp-foot-bottom a { display: inline-flex; align-items: center; min-height: 44px; }

  .sp-action { font-size: 13px; }
}

/* The theme sets Inter on every <a>, so Arabic link text fell back to a small
   system face. Links and tiles on Arabic pages, and the Arabic language link on
   English pages, use the same Arabic face as the body text. */
[dir="rtl"] .sp-header a, [dir="rtl"] .sp-main a, [dir="rtl"] .sp-footer a,
.sp-lang[lang="ar"], .sp-sitemap a[hreflang="ar"] {
  font-family: "IBM Plex Sans Arabic", "Inter", system-ui, -apple-system, sans-serif;
}
