/* ============================================================
   Tarik Chouika — Professional Digital Identity
   Dark premium theme · coffee-gold accents · RTL aware
   ============================================================ */

:root {
  --bg: #0b0d10;
  --bg-2: #0e1117;
  --card: #141821;
  --card-2: #11151d;
  --border: rgba(255, 255, 255, 0.07);
  --border-gold: rgba(217, 166, 72, 0.35);
  --text: #ece9e2;
  --muted: #a3a9b4;
  --soft: #7d8490;
  --gold: #d9a648;
  --gold-2: #e8c06a;
  --gold-3: #b9872f;
  --gold-dark: #1a1408;
  --gold-soft: rgba(217, 166, 72, 0.12);
  --green: #5fbf77;
  --font-body: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Playfair Display", "Cairo", Georgia, serif;
  --font-ar: "Cairo", "Inter", system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(217, 166, 72, 0.35); color: #fff; }

.container { width: min(1140px, 92%); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -60px; inset-inline-start: 16px; z-index: 300;
  background: var(--gold); color: var(--gold-dark); font-weight: 700;
  padding: 0.6rem 1.2rem; border-radius: 8px; transition: top 0.25s ease;
}
.skip-link:focus { top: 12px; }

.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }

/* ---------- Reveal animations (JS only) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  padding-block: 0.9rem;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.site-header.scrolled {
  background: rgba(11, 13, 16, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  padding-block: 0.55rem;
}

.nav-wrap { display: flex; align-items: center; gap: 1.2rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  color: var(--gold-dark);
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px -6px rgba(217, 166, 72, 0.55);
}
.brand-text { font-family: var(--font-head); font-size: 1.06rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }

.nav-links { display: flex; gap: 1.35rem; margin-inline-start: auto; }
.nav-links a {
  position: relative;
  color: var(--muted); font-size: 0.88rem; font-weight: 500;
  padding-block: 0.4rem; transition: color 0.25s ease;
}
.nav-links a::after {
  content: ""; position: absolute; bottom: 0; inset-inline: 0;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-3));
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-2); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.lang-wrap {
  position: relative; display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px; padding: 0.35rem 0.85rem;
  color: var(--muted); transition: border-color 0.25s ease, color 0.25s ease;
}
.lang-wrap:hover { border-color: var(--border-gold); color: var(--gold-2); }
.lang-globe { display: inline-flex; }
.lang-globe .ic { width: 1em; height: 1em; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; color: inherit;
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0 1.15rem 0 0; margin: 0; cursor: pointer; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a3a9b4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
}
html[dir="rtl"] .lang-select { background-position: left 0.1rem center; padding: 0 0 0 1.15rem; }
.lang-select:focus-visible { outline: 2px solid var(--border-gold); outline-offset: 2px; border-radius: 4px; }
.lang-select option { background: #141821; color: var(--text); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border); color: var(--text);
}
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: inline-flex; }
.nav-toggle .ic { width: 1.3em; height: 1.3em; }

.nav-panel {
  display: none;
  background: rgba(11, 13, 16, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.nav-panel.open { display: block; animation: panelIn 0.3s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-panel-links { display: flex; flex-direction: column; padding: 1rem 0 1.4rem; }
.nav-panel-links a {
  padding: 0.85rem 0.4rem; color: var(--muted); font-size: 1.02rem; font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04); transition: color 0.25s ease, padding 0.25s ease;
}
.nav-panel-links a:hover, .nav-panel-links a.active { color: var(--gold-2); padding-inline-start: 0.8rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 9.5rem 0 5rem;
  overflow: hidden;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; }
.hero-glow.g1 { width: 540px; height: 540px; background: #d9a648; opacity: 0.16; top: -170px; inset-inline-end: -140px; }
.hero-glow.g2 { width: 440px; height: 440px; background: #9a6420; opacity: 0.2; bottom: -160px; inset-inline-start: -140px; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(217, 166, 72, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 166, 72, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 62% at 50% 42%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 62% at 50% 42%, #000 25%, transparent 72%);
}

.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero-photo { margin-bottom: 1.6rem; }
.hero-photo img {
  width: 216px; height: 216px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 9px rgba(217, 166, 72, 0.1), 0 26px 60px -18px rgba(0, 0, 0, 0.75);
}

.hero-greeting {
  color: var(--gold-2); font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 0.5rem;
}
.hero-name {
  font-size: clamp(2.4rem, 6.5vw, 4.1rem); font-weight: 700;
  letter-spacing: 0.02em; line-height: 1.15;
  background: linear-gradient(180deg, #f4efe4, #cfc6b2);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-name-alt {
  color: var(--soft); font-size: 1rem; letter-spacing: 0.28em; margin-top: 0.45rem;
}
.hero-role { margin-top: 1.1rem; font-size: clamp(1.05rem, 2.6vw, 1.35rem); font-weight: 600; color: var(--gold-2); min-height: 1.7em; }
.tw-cursor {
  display: inline-block; width: 2px; height: 1.05em; margin-inline-start: 3px;
  background: var(--gold); vertical-align: -0.15em;
  animation: blink 0.9s steps(1) infinite;
}
html:not(.js) .tw-cursor { display: none; }
@keyframes blink { 50% { opacity: 0; } }

.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1.5rem; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.05rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--muted); font-size: 0.88rem; font-weight: 500;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
a.meta-chip:hover { border-color: var(--border-gold); color: var(--gold-2); transform: translateY(-2px); }
.meta-chip .ic { color: var(--gold); }

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 2.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 700; line-height: 1;
  padding: 0.95rem 1.9rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  color: var(--gold-dark);
  box-shadow: 0 14px 32px -12px rgba(217, 166, 72, 0.65);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 38px -12px rgba(217, 166, 72, 0.75); }
.btn-outline {
  background: transparent; color: var(--gold-2);
  border-color: rgba(217, 166, 72, 0.45);
}
.btn-outline:hover { background: var(--gold-soft); border-color: var(--gold); transform: translateY(-3px); }
.btn-lg { padding: 1.1rem 2.4rem; font-size: 1.02rem; }

.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 2.6rem; margin-top: 3.2rem;
  padding-top: 2.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: min(720px, 100%);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 120px; }
.stat-v {
  font-family: var(--font-head); font-size: 2.45rem; font-weight: 700;
  color: var(--gold-2); line-height: 1.1;
}
.stat-l { color: var(--muted); font-size: 0.85rem; font-weight: 500; text-align: center; }

/* ---------- Sections ---------- */
.section { padding-block: 6rem; position: relative; }
.section.alt {
  background: var(--bg-2);
  border-block: 1px solid rgba(255, 255, 255, 0.03);
}

.section-head { text-align: center; margin-bottom: 3.2rem; }
.eyebrow {
  display: inline-block;
  color: var(--gold); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.38em; text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: 0.01em; }
.section-head .subtitle { color: var(--muted); margin-top: 0.7rem; font-size: 1.02rem; max-width: 640px; margin-inline: auto; }
.section-head::after {
  content: ""; display: block; width: 64px; height: 3px; border-radius: 3px;
  margin: 1.3rem auto 0;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-3));
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, #161b25, var(--card-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow);
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: start; }
.about-text p { color: #c3c8d1; font-size: 1.02rem; margin-bottom: 1.25rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-facts { display: flex; flex-direction: column; gap: 1rem; }
.fact { display: flex; align-items: center; gap: 1.1rem; padding: 1.15rem 1.4rem; }
.fact .ic { width: 1.45rem; height: 1.45rem; color: var(--gold); }
.fact-l { display: block; color: var(--soft); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }
.fact-v { display: block; color: var(--text); font-size: 0.98rem; font-weight: 600; margin-top: 0.1rem; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; padding-inline-start: 2.4rem; max-width: 860px; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(217, 166, 72, 0.65), rgba(217, 166, 72, 0.06));
}
.tl-item { position: relative; margin-bottom: 1.5rem; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; inset-inline-start: -2.4rem; top: 2rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-2); border: 3px solid var(--gold);
  box-shadow: 0 0 14px rgba(217, 166, 72, 0.55);
}
.period {
  display: inline-block; padding: 0.34rem 0.95rem; border-radius: 999px;
  background: var(--gold-soft); border: 1px solid rgba(217, 166, 72, 0.35);
  color: var(--gold-2); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em;
  margin-bottom: 0.9rem;
}
.tl-item h3 { font-size: 1.28rem; font-weight: 700; }
.org { color: var(--soft); font-size: 0.92rem; font-weight: 500; margin-top: 0.3rem; margin-bottom: 1rem; }
.bullets li {
  position: relative; padding-inline-start: 1.35rem;
  color: #b9bec8; font-size: 0.96rem; margin-bottom: 0.55rem;
}
.bullets li::before {
  content: ""; position: absolute; inset-inline-start: 0.15rem; top: 0.62em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--gold); transform: rotate(45deg);
}

/* ---------- Certificates ---------- */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.cert-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.cert-top .ic { width: 2rem; height: 2rem; color: var(--gold); }
.cred {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem; color: var(--gold-2);
  background: var(--gold-soft); border: 1px solid rgba(217, 166, 72, 0.3);
  border-radius: 8px; padding: 0.35rem 0.7rem;
}
.cert-card h3 { font-size: 1.16rem; font-weight: 700; line-height: 1.45; }
.cert-meta { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
.cert-meta div { border-top: 1px dashed rgba(255, 255, 255, 0.09); padding-top: 0.8rem; }
.cert-meta dt { color: var(--soft); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 0.25rem; }
.cert-meta dd { margin: 0; color: #c3c8d1; font-size: 0.94rem; }

.drive-banner {
  display: flex; align-items: center; gap: 1.6rem;
  margin-top: 1.5rem; padding: 1.7rem 1.9rem;
  background: linear-gradient(135deg, rgba(217, 166, 72, 0.1), rgba(217, 166, 72, 0.03));
  border: 1px dashed rgba(217, 166, 72, 0.4);
  border-radius: var(--radius);
}
.drive-icon .ic { width: 2.6rem; height: 2.6rem; color: var(--gold); }
.drive-body { flex: 1; }
.drive-body h3 { font-size: 1.14rem; margin-bottom: 0.35rem; }
.drive-body p { color: var(--muted); font-size: 0.94rem; }
.drive-banner .btn { flex: none; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.skill-card { padding: 1.7rem; }
.skill-icon {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--gold-soft); border: 1px solid rgba(217, 166, 72, 0.3);
  margin-bottom: 1.15rem;
}
.skill-icon .ic { width: 1.6rem; height: 1.6rem; color: var(--gold-2); }
.skill-card h3 { font-size: 1.12rem; margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.42rem 0.9rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #b9bec8; font-size: 0.85rem; font-weight: 500;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.chip:hover { color: var(--gold-2); border-color: var(--border-gold); background: var(--gold-soft); }

/* ---------- Education ---------- */
.edu-card { max-width: 760px; margin-inline: auto; text-align: center; padding: 2.6rem 2.2rem; }
.edu-icon {
  display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--gold-soft); border: 1px solid rgba(217, 166, 72, 0.3);
  margin: 0 auto 1.3rem;
}
.edu-icon .ic { width: 1.8rem; height: 1.8rem; color: var(--gold-2); }
.edu-card h3 { font-size: 1.3rem; margin-bottom: 0.9rem; }
.edu-card p { color: var(--muted); font-size: 0.99rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.g-item {
  position: relative; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--border);
  margin: 0;
}
.g-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.6s ease;
}
.g-item:hover img { transform: scale(1.05); }
.g-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 9, 12, 0.85));
  pointer-events: none;
}
.g-item figcaption {
  position: absolute; bottom: 0; inset-inline: 0; z-index: 1;
  padding: 1.1rem 1.3rem;
  color: var(--text); font-size: 0.95rem; font-weight: 600;
}
.g-item figcaption::before {
  content: ""; display: inline-block; width: 18px; height: 2px;
  background: var(--gold); border-radius: 2px;
  margin-inline-end: 0.55rem; vertical-align: middle;
}

/* ---------- Contact ---------- */
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  text-align: center;
  max-width: 680px; margin-inline: auto;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, #161b25, var(--card-2));
  border: 1px solid var(--border);
  border-radius: 22px;
  position: relative; overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  width: 380px; height: 280px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(217, 166, 72, 0.16), transparent 70%);
  pointer-events: none;
}
.avail {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 1.15rem; border-radius: 999px;
  background: rgba(95, 191, 119, 0.1); border: 1px solid rgba(95, 191, 119, 0.35);
  color: var(--green); font-size: 0.87rem; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s ease infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(95, 191, 119, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(95, 191, 119, 0); } }

.contact-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.info-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1.15rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
}
.info-chip .ic { color: var(--gold); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: transparent; border: 0; padding: 0;
  color: var(--gold-2); font-size: 0.85rem; font-weight: 700;
}
.copy-btn:hover { color: var(--gold); }
.copy-btn .ic { width: 0.95em; height: 0.95em; }
.contact-note { color: var(--soft); font-size: 0.88rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg-2);
  padding: 3rem 0 2.4rem;
  text-align: center;
}
.footer-name { font-family: var(--font-head); color: var(--gold-2); font-size: 1.35rem; font-weight: 700; margin-bottom: 0.5rem; }
.footer-copy { color: var(--muted); font-size: 0.9rem; }
.footer-built { color: var(--soft); font-size: 0.82rem; margin-top: 0.45rem; }
.footer-langs {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.35rem 0.9rem; margin-top: 1.4rem;
}
.footer-langs a { color: var(--soft); font-size: 0.82rem; font-weight: 500; transition: color 0.25s ease; }
.footer-langs a:hover { color: var(--gold-2); }
.footer-langs .sep { color: rgba(255, 255, 255, 0.15); font-size: 0.8rem; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; bottom: 1.6rem; inset-inline-end: 1.6rem; z-index: 150;
  width: 47px; height: 47px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 24, 33, 0.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--border-gold); color: var(--gold-2);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s ease;
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--gold-soft); }
.back-to-top .ic { width: 1.15rem; height: 1.15rem; }

/* ---------- Arabic (RTL) typography ---------- */
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.9; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .brand-text, html[lang="ar"] .stat-v, html[lang="ar"] .footer-name,
html[lang="ar"] .edu-card h3, html[lang="ar"] .tl-item h3, html[lang="ar"] .cert-card h3 {
  font-family: var(--font-ar);
  letter-spacing: 0;
}
html[lang="ar"] .hero-greeting, html[lang="ar"] .eyebrow, html[lang="ar"] .hero-name-alt,
html[lang="ar"] .fact-l, html[lang="ar"] .cert-meta dt { letter-spacing: 0.05em; }
html[lang="ar"] .hero-name { font-weight: 900; }
html[lang="ar"] .brand-mark { font-family: var(--font-head); }
html[lang="ar"] .btn, html[lang="ar"] .lang-select, html[lang="ar"] .chip { font-family: var(--font-ar); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .brand-text { display: none; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .section { padding-block: 4.6rem; }
  .hero { padding-top: 8rem; }
}
@media (max-width: 760px) {
  .certs-grid { grid-template-columns: 1fr; }
  .drive-banner { flex-direction: column; text-align: center; gap: 1.1rem; }
  .drive-body p { font-size: 0.9rem; }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
  .stat { min-width: 96px; }
  .stat-v { font-size: 2rem; }
  .hero-photo img { width: 180px; height: 180px; }
  .contact-card { padding: 2.4rem 1.4rem; }
  .info-chip { font-size: 0.85rem; padding: 0.55rem 0.95rem; }
  .tl-item::before { top: 1.7rem; }
}

/* ---------- Print (CV) ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #16181c; font-size: 12px; }
  .site-header, .nav-panel, .hero-glow, .hero-grid-bg, .hero-cta, .hero-stats,
  #gallery, .back-to-top, .skip-link, .drive-banner .btn, .copy-btn,
  .footer-built, .footer-langs, .tw-cursor, .contact-card::before { display: none !important; }
  .hero { min-height: auto; padding: 1rem 0 0.5rem; }
  .hero-photo img { width: 110px; height: 110px; }
  .hero-name { color: #16181c; -webkit-text-fill-color: #16181c; }
  .hero-greeting, .hero-role, .eyebrow { color: #8a6d2f; }
  .hero-name-alt { color: #6a6f78; }
  .meta-chip { border-color: #ddd; color: #444; }
  .meta-chip .ic { color: #8a6d2f; }
  .section { padding-block: 1.1rem; }
  .section.alt { background: #fff; border: 0; }
  .section-head { margin-bottom: 1.2rem; }
  .section-head h2 { font-size: 1.35rem; color: #16181c; }
  .section-head::after { background: #b9872f; }
  .subtitle { color: #555; }
  .card, .contact-card, .edu-card { background: #fff; border: 1px solid #ddd; box-shadow: none; break-inside: avoid; padding: 1rem 1.1rem; }
  .card:hover { transform: none; }
  .about-text p, .bullets li, .cert-meta dd, .drive-body p, .edu-card p, .org, .contact-note { color: #333; }
  .fact { border: 1px solid #ddd; }
  .fact-l { color: #777; }
  .fact-v { color: #16181c; }
  .timeline { padding-inline-start: 1.4rem; }
  .timeline::before { background: #b9872f; }
  .tl-item::before { border-color: #b9872f; box-shadow: none; inset-inline-start: -1.4rem; }
  .tl-item h3, .cert-card h3, .edu-card h3, .drive-body h3 { color: #16181c; }
  .period { background: #f6efdd; border-color: #e5d5ac; color: #7a5c1e; }
  .bullets li::before { background: #b9872f; }
  .cred { background: #f6efdd; border-color: #e5d5ac; color: #7a5c1e; }
  .cert-top .ic, .skill-icon .ic, .edu-icon .ic, .fact .ic, .drive-icon .ic { color: #b9872f; }
  .skill-icon, .edu-icon { background: #f6efdd; border-color: #e5d5ac; }
  .chip { border-color: #ddd; color: #333; }
  .avail { background: #eef7f0; border-color: #bcdcc6; color: #2c7a44; }
  .contact-card { border: 0; }
  .site-footer { background: #fff; padding: 1rem 0; border-top: 1px solid #ddd; }
  .footer-name { color: #16181c; }
  .footer-copy { color: #555; }
  @page { margin: 1.4cm; }
}
