@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --clr-primary: #56228b;
  --clr-primary-light: #7a3dbf;
  --clr-primary-dark: #3a1660;
  --clr-accent: #8b4513;
  --clr-accent-light: #b5601e;
  --clr-bg: #1f1726;
  --clr-bg-card: #2a1e36;
  --clr-bg-glass: rgba(86, 34, 139, 0.12);
  --clr-surface: #251a32;
  --clr-text: #e8dff5;
  --clr-text-muted: #a990c8;
  --clr-text-dim: #7a6490;
  --clr-border: rgba(86, 34, 139, 0.35);
  --clr-hr: rgba(139, 69, 19, 0.5);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --shadow-soft: 0 4px 24px rgba(31, 23, 38, 0.6), 0 1px 6px rgba(86, 34, 139, 0.2);
  --shadow-card: 0 8px 32px rgba(31, 23, 38, 0.7), 0 2px 8px rgba(86, 34, 139, 0.15);
  --font-body: 'Noto Naskh Arabic', 'Noto Sans Arabic', Georgia, 'Times New Roman', serif;
  --font-ui: 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
  --nav-height: 72px;
  --anchor-height: 48px;
  --scroll-top: calc(var(--nav-height) + var(--anchor-height) + 8px);
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  background: var(--clr-bg);
  color: var(--clr-text);
}

body.dark-bio-theme {
  font-family: var(--font-body);
  line-height: 1.75;
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

/* ── Scroll Progress ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-primary-light), var(--clr-accent-light));
  z-index: 2000;
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}

/* ── Site Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(31, 23, 38, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--clr-border);
  box-shadow: 0 2px 20px rgba(31, 23, 38, 0.8);
}

.brand-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
}

.brand-text-logo {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--clr-text);
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #c49ef5 0%, var(--clr-accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hamburger ── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: var(--radius-sm);
  min-height: 48px;
  min-width: 48px;
  justify-content: center;
  align-items: center;
  transition: background 0.2s;
}

.hamburger-btn:hover {
  background: var(--clr-bg-glass);
}

.ham-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: background 0.2s;
}

/* ── Overlay Menu ── */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(21, 13, 32, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.overlay-close:hover {
  color: var(--clr-text);
  border-color: var(--clr-primary-light);
  background: var(--clr-bg-glass);
}

.overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 480px;
  padding: 0 2rem;
}

.overlay-nav .nav-link {
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  text-decoration: none;
  padding: 0.75rem 2rem;
  width: 100%;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-nav .nav-link:hover {
  color: var(--clr-text);
  border-color: var(--clr-border);
  background: var(--clr-bg-glass);
}

/* ── Sticky Anchor Nav ── */
.sticky-anchor-nav {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 800;
  height: var(--anchor-height);
  background: rgba(42, 30, 54, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--clr-border);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.sticky-anchor-nav.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.anchor-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 1rem;
}

.anchor-inner::-webkit-scrollbar {
  display: none;
}

.anchor-link {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--clr-text-dim);
  text-decoration: none;
  padding: 0 0.85rem;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.anchor-link:hover {
  color: var(--clr-text);
  background: var(--clr-bg-glass);
}

/* ── Hero ── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, rgba(86, 34, 139, 0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139, 69, 19, 0.15) 0%, transparent 50%),
              var(--clr-bg);
  padding-top: var(--nav-height);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-blob-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-blob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: blobPulse 8s ease-in-out infinite alternate;
}

@keyframes blobPulse {
  0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.08) rotate(6deg); opacity: 1; }
}

.hero-icon-ring {
  position: relative;
  z-index: 2;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(86, 34, 139, 0.5), 0 0 20px rgba(139, 69, 19, 0.3);
}

.hero-icon-char {
  font-family: var(--font-body);
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  text-align: left;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--clr-accent-light);
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(139, 69, 19, 0.4);
  border-radius: 999px;
  background: rgba(139, 69, 19, 0.1);
}

.hero-h1 {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-text);
  background: linear-gradient(135deg, #e0ccff 0%, #c49ef5 50%, #d4a47a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  max-width: 400px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
  box-shadow: 0 4px 20px rgba(86, 34, 139, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(86, 34, 139, 0.5);
  opacity: 0.92;
}

.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--clr-bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

/* ── Section Scroll Margin ── */
article[id] {
  scroll-margin-top: var(--scroll-top);
}

/* ── Content Layout ── */
.content-body-section {
  padding: 4rem 2rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.content-main {
  min-width: 0;
}

/* ── Page Content Styles ── */
.content-main h2 {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--clr-text);
  margin-top: 3rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  background: linear-gradient(90deg, #c49ef5, var(--clr-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-main h2:first-child {
  margin-top: 0;
}

.content-main hr {
  border: none;
  border-top: 1px solid var(--clr-hr);
  margin: 0.6rem 0 1.5rem;
  border-radius: 1px;
}

.content-main h3 {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.content-main p {
  color: var(--clr-text-muted);
  margin-bottom: 1.1rem;
  line-height: 1.8;
}

.content-main ul, .content-main ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--clr-text-muted);
}

.content-main li {
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.content-main a {
  color: #c49ef5;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.content-main a:hover {
  color: var(--clr-accent-light);
}

.content-main article {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid rgba(86, 34, 139, 0.15);
}

.content-main article:last-child {
  border-bottom: none;
}

/* Glass card sections inside content */
.content-main .card,
.content-main [class*="card"] {
  background: var(--clr-bg-glass);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

/* ── Aside ── */
.content-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--anchor-height) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.aside-card {
  background: rgba(86, 34, 139, 0.1);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.25rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.aside-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(31, 23, 38, 0.8);
}

.aside-title {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-text);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.aside-card hr {
  border: none;
  border-top: 1px solid var(--clr-hr);
  margin-bottom: 1rem;
}

.aside-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.aside-nav-link {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-nav-link:hover {
  color: var(--clr-text);
  background: var(--clr-bg-glass);
}

.aside-tip-card {
  border-color: rgba(139, 69, 19, 0.35);
  background: rgba(139, 69, 19, 0.08);
}

.aside-tip-text {
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  line-height: 1.65;
}

/* ── Footer ── */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 3rem 2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand-big {
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #c49ef5 0%, var(--clr-accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--clr-text-dim);
  max-width: 460px;
  line-height: 1.6;
}

.footer-nav-dl-wrap {
  width: 100%;
  max-width: 680px;
}

.footer-dl {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.8rem;
}

.footer-dl dt,
.footer-dl dd {
  margin: 0;
}

.footer-dl dt a,
.footer-dl dd a {
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--clr-text-dim);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

.footer-dl dt a:hover,
.footer-dl dd a:hover {
  color: var(--clr-text-muted);
  background: var(--clr-bg-glass);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  margin-top: 0.5rem;
  display: block;
}

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-blob {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── HR global ── */
hr {
  border: none;
  border-top: 1px solid var(--clr-hr);
  margin: 0.6rem 0 1.2rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

@media (max-width: 700px) {
  :root {
    --nav-height: 60px;
    --anchor-height: 44px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: 3rem 1.25rem;
  }

  .hero-text {
    align-items: center;
    text-align: center;
  }

  .hero-blob-wrap {
    width: 220px;
    height: 220px;
  }

  .hero-icon-ring {
    width: 100px;
    height: 100px;
  }

  .hero-icon-char {
    font-size: 2.8rem;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .site-header {
    padding: 0 1rem;
  }

  .content-body-section {
    padding: 3rem 1.25rem 4rem;
  }

  .content-aside {
    grid-template-columns: 1fr;
  }

  .overlay-nav .nav-link {
    font-size: 1.1rem;
  }

  .footer-brand-big {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .site-footer {
    padding: 2.5rem 1.25rem 1.5rem;
  }

  .anchor-inner {
    padding: 0 0.5rem;
  }

  .anchor-link {
    font-size: 0.75rem;
    padding: 0 0.6rem;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 16px;
  }

  .hero-inner {
    padding: 2.5rem 1rem;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
