/* ==========================================================
   د. فهد كمال الشريف — الموقع الشخصي
   Palette: deep navy + teal + warm gold accent
   ========================================================== */
:root {
  --navy-900: #0A1B33;
  --navy-800: #12305A;
  --navy-700: #1B3F72;
  --teal-600: #0E7C86;
  --teal-700: #0B5F67;
  --teal-50:  #E6F4F5;
  --gold-500: #E8A33D;
  --gold-100: #FBEFD9;
  --coral:    #FF7A59;
  --ink:      #1A2433;
  --muted:    #5B6779;
  --line:     #E3E8EF;
  --bg:       #F6F8FB;
  --card:     #FFFFFF;
  --radius:   18px;
  --shadow-sm: 0 2px 8px rgba(10, 27, 51, .06);
  --shadow:    0 12px 32px rgba(10, 27, 51, .10);
  --font: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 16px; }
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--gold-500); color: var(--navy-900); padding: 8px 16px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* placeholder label for owner */
.todo {
  display: inline-block; font-size: .72em; font-weight: 700; line-height: 1.6;
  padding: 0 .6em; margin-inline-start: .4em; border-radius: 999px;
  color: #8A5A00; background: var(--gold-100); border: 1px dashed var(--gold-500);
  vertical-align: middle;
}

/* ---------------- NAV ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(10, 27, 51, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.05rem; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: transparent; color: #fff; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.nav-links {
  position: absolute; top: var(--nav-h); inset-inline: 0;
  display: none; flex-direction: column; gap: 2px;
  margin: 0; padding: 10px 16px 16px; list-style: none;
  background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-links.open { display: flex; }
.nav-links a {
  display: block; padding: 10px 14px; border-radius: 10px;
  color: rgba(255,255,255,.82); font-weight: 600; font-size: .98rem;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav-links a.active { box-shadow: inset -3px 0 0 var(--gold-500); }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static; display: flex; flex-direction: row; padding: 0; background: none; border: 0; gap: 4px;
  }
  .nav-links a { padding: 8px 14px; font-size: .95rem; }
  .nav-links a.active { box-shadow: inset 0 -2px 0 var(--gold-500); }
}

/* ---------------- HERO ---------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(14,124,134,.55), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(232,163,61,.18), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-800) 60%, #0F4A5E);
  padding: 56px 0 72px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 36px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 900; margin-bottom: .2em; }
.hero .name-en { font-size: 1rem; letter-spacing: .04em; color: rgba(255,255,255,.65); direction: ltr; unicode-bidi: isolate; margin-bottom: 14px; }
.hero .roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.hero .roles li {
  font-size: .9rem; font-weight: 600; padding: 4px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
}
.hero .lead { font-size: 1.08rem; color: rgba(255,255,255,.88); max-width: 640px; }
.hero .todo { color: #FFE2B0; background: rgba(232,163,61,.15); }

.monogram-wrap { display: flex; justify-content: center; }
.monogram {
  position: relative; width: min(260px, 66vw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--teal-600), var(--navy-800));
  box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 0 0 8px rgba(255,255,255,.06);
  animation: float 6s ease-in-out infinite;
}
.monogram::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(232,163,61,.65); border-inline-start-color: transparent; border-block-end-color: transparent;
  animation: spin 14s linear infinite;
}
.monogram span { font-size: clamp(3.4rem, 15vw, 5.2rem); font-weight: 900; color: #fff; letter-spacing: .02em; }
.monogram small {
  position: absolute; bottom: 18%; font-size: .72rem; letter-spacing: .18em; color: rgba(255,255,255,.6); direction: ltr;
}

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--gold-500); color: var(--navy-900); box-shadow: 0 8px 20px rgba(232,163,61,.3); }
.btn-primary:hover { color: var(--navy-900); background: #F0B355; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); }

@media (min-width: 860px) {
  .hero { padding: 88px 0 104px; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
}

/* ---------------- SECTIONS ---------------- */
section { padding: 64px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 800; letter-spacing: .08em;
  color: var(--teal-600); background: var(--teal-50); padding: 2px 14px; border-radius: 999px; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.5rem, 4.4vw, 2.1rem); font-weight: 800; }
.section-head h2::after {
  content: ""; display: block; width: 64px; height: 4px; margin: 12px auto 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-500), var(--teal-600));
}
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #CFE3E6; }
.card h3 { font-size: 1.12rem; font-weight: 800; }

/* About */
.about-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.5fr 1fr; } }
.about-text p { font-size: 1.05rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts .ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-600);
}
.facts .ico svg { width: 20px; height: 20px; }
.facts strong { display: block; color: var(--navy-900); font-size: .98rem; }
.facts span { color: var(--muted); font-size: .92rem; }
.src { font-size: .8rem; color: var(--muted); }
.src a { color: var(--muted); text-decoration: underline; text-decoration-color: #C4CDD9; }

/* Timeline */
.timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 860px; }
.timeline::before {
  content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 15px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--teal-600), var(--gold-500));
}
.timeline li { position: relative; padding-inline-start: 52px; margin-bottom: 22px; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: 7px; top: 22px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; border: 4px solid var(--teal-600); box-shadow: 0 0 0 4px var(--teal-50);
}
.timeline li.highlight::before { border-color: var(--gold-500); box-shadow: 0 0 0 4px var(--gold-100); }
.timeline .date {
  display: inline-block; font-size: .82rem; font-weight: 800; color: var(--teal-700);
  background: var(--teal-50); padding: 0 12px; border-radius: 999px; margin-bottom: 6px;
}
.timeline .card p { margin-bottom: .4em; color: #334155; }

/* Research */
.tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 36px; padding: 0; list-style: none; }
.tags li {
  padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .93rem;
  background: #fff; border: 1px solid var(--line); color: var(--navy-800); box-shadow: var(--shadow-sm);
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 36px; }
.stat { text-align: center; background: linear-gradient(160deg, var(--navy-800), var(--teal-700)); color: #fff; border-radius: var(--radius); padding: 18px 12px; }
.stat b { display: block; font-size: 1.9rem; font-weight: 900; line-height: 1.2; }
.stat span { font-size: .88rem; color: rgba(255,255,255,.8); }

.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pub { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.pub .year {
  font-weight: 900; font-size: .95rem; color: var(--navy-800); background: var(--gold-100);
  border-radius: 10px; padding: 4px 10px; min-width: 62px; text-align: center;
}
.pub .title { direction: ltr; text-align: left; unicode-bidi: isolate; font-weight: 700; color: var(--navy-900); line-height: 1.55; display: block; }
.pub .meta { direction: ltr; text-align: left; unicode-bidi: isolate; font-size: .86rem; color: var(--muted); display: block; margin-top: 4px; line-height: 1.6; }
.pub .meta a { font-weight: 700; }
.more-links { text-align: center; margin-top: 28px; }
.more-links .btn { margin: 4px; }
.btn-outline { color: var(--navy-800); border-color: var(--line); background: #fff; }
.btn-outline:hover { color: var(--teal-700); border-color: var(--teal-600); }

/* Company / products */
.company-intro {
  display: grid; gap: 20px; align-items: center; margin-bottom: 32px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: #fff; border-radius: 24px; padding: 28px;
}
.company-intro img { width: 96px; height: 96px; }
.company-intro h3 { color: #fff; font-size: 1.4rem; }
.company-intro p { color: rgba(255,255,255,.85); margin: 0; }
.company-intro .todo { color: #FFE2B0; background: rgba(232,163,61,.15); }
@media (min-width: 720px) { .company-intro { grid-template-columns: auto 1fr; padding: 32px 36px; } }

.product { display: flex; flex-direction: column; }
.product .logo { height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.product .logo img { max-height: 120px; width: auto; }
.product .tagline { color: var(--teal-700); font-weight: 700; font-size: .95rem; margin-top: -6px; }
.product ul { margin: 0 0 12px; padding-inline-start: 1.1em; color: #334155; }
.product ul li { margin-bottom: 4px; }
.product .badge {
  align-self: flex-start; margin-top: auto; font-size: .78rem; font-weight: 800; padding: 2px 12px; border-radius: 999px;
  background: var(--teal-50); color: var(--teal-700);
}
.product.doctori { border-top: 4px solid var(--teal-600); }
.product.digischool { border-top: 4px solid #2F4FB8; }
.product.niqaba { border-top: 4px solid #1E6B52; }
.note { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 18px; }

/* Contact */
.contact-card { max-width: 760px; margin: 0 auto; text-align: center; }
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .contact-list { grid-template-columns: repeat(2, 1fr); } }
.contact-list a, .contact-list .ph {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg); color: var(--navy-800); font-weight: 700; text-align: start;
}
.contact-list a:hover { border-color: var(--teal-600); text-decoration: none; background: var(--teal-50); }
.contact-list svg { width: 22px; height: 22px; flex: none; color: var(--teal-600); }
.contact-list small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; direction: ltr; text-align: right; unicode-bidi: isolate; word-break: break-all; }

/* Footer */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.75); padding: 32px 0; font-size: .92rem; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.site-footer a { color: #fff; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { width: 26px; height: 26px; }
@media (min-width: 760px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: start; } }

.to-top {
  position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 40;
  width: 46px; height: 46px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--teal-600); color: #fff; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Profile photo (replaces the monogram) */
.photo-frame {
  position: relative;
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 34px;
  border: 2px solid rgba(201,162,77,.55);
  pointer-events: none;
}
.photo-frame img {
  display: block;
  width: clamp(150px, 34vw, 210px);
  height: auto;
  aspect-ratio: 146 / 192;
  object-fit: cover;
  border-radius: 20px;
  background: #fff;
}
.product.niqaba .logo img { object-fit: contain; }

/* Arrafni product + store button */
.product.arrafni { border-top: 4px solid #8BC34A; }
.product.arrafni .logo img { border-radius: 24px; }
.store-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  margin: 2px 0 12px; padding: 8px 14px; border-radius: 10px;
  background: #0f172a; color: #fff; font-weight: 700; font-size: .9rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.25); text-decoration: none; color: #fff; }
.store-btn svg { width: 20px; height: 20px; }
