/* =====================================================================
   AB · Abdulrahman Bahmishan
   Identity: white #ffffff · charcoal #2b2b2b · gray #a9a9a9
   Type: Canela (Latin) · Huwiya Display (Arabic). Until their licensed
   files are added (assets/fonts/licensed), the closest open fonts stand in:
   Newsreader for Canela, Zain for Huwiya Display.
   Background: one colour, with a very faint swell of light drifting across it.
   Shape system: square corners everywhere.
   Layout: phone first. One screen (identity, contact, tiles); each tile
   opens its own panel.
   ===================================================================== */

/* ---------- open stand-in fonts (SIL OFL) ---------- */
@font-face {
  font-family: "Zain";
  src: url("../fonts/Zain-Regular-arabic.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Zain";
  src: url("../fonts/Zain-Bold-arabic.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Zain";
  src: url("../fonts/Zain-ExtraBold-arabic.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --white: #ffffff;
  --charcoal: #2b2b2b;
  --gray: #a9a9a9;

  --bg: var(--charcoal);
  --fg: var(--white);
  --muted: var(--gray);
  --line: rgb(255 255 255 / 0.12);        /* hairlines: white at low opacity */
  --line-2: rgb(255 255 255 / 0.3);
  --surface: rgb(255 255 255 / 0.03);     /* cards: the charcoal lifted a touch */

  --serif: "Canela", "Newsreader";
  --font: var(--serif), "Huwiya Display", "Zain", "Geeza Pro", "Traditional Arabic", "Times New Roman", serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 5.5vw, 2rem);
  --maxw: 34rem;
  --sheet-pad: clamp(1.25rem, 5.5vw, 2.25rem);

  /* layers */
  --z-bg: 0;
  --z-page: 1;
  --z-skip: 60;
}
@media (min-width: 700px) {
  :root { --maxw: 36rem; }
}

/* Arabic and Latin need different sizes and leading to look the same weight on the page */
html[lang="ar"] {
  --fs-body: 1.125rem;
  --lh-body: 1.85;
  --fs-small: 1rem;
  --fs-btn: 1.0625rem;
  --fs-name: clamp(1.7rem, 8.6vw, 3rem);       /* the full name is 9.7em wide: one line on any phone */
  --lh-name: 1.35;
  --fs-titles: 1.1875rem;
  --fs-h2: clamp(1.45rem, 5.6vw, 2.1rem);
  --fs-h3: 1.3rem;
  --fs-lead: 1.3rem;
  --lh-lead: 1.85;
  --lh-tight: 1.4;
  --w-display: 800;
  --w-strong: 700;
  --track-display: 0;
}
html[lang="en"] {
  --fs-body: 1.0625rem;
  --lh-body: 1.6;
  --fs-small: 0.9375rem;
  --fs-btn: 1rem;
  --fs-name: clamp(1.2rem, 6vw, 2.45rem);      /* the full name in capitals is 14.2em wide: one line too */
  --lh-name: 1.15;
  --fs-titles: 0.8125rem;
  --fs-h2: clamp(1.5rem, 5.8vw, 2.2rem);
  --fs-h3: 1.25rem;
  --fs-lead: 1.25rem;
  --lh-lead: 1.5;
  --lh-tight: 1.2;
  --w-display: 300;
  --w-strong: 500;
  --track-display: -0.005em;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scrollbar-color: rgb(255 255 255 / 0.28) var(--bg);
}
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.has-sheet, html.has-sheet body { overflow: hidden; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: var(--w-strong); }
p { text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; inset-block-start: 0.75rem; inset-inline-start: 0.75rem; z-index: var(--z-skip);
  padding: 0.7rem 1.1rem; background: var(--fg); color: var(--bg); text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--dir { transform: scaleX(var(--flip, 1)); }
[dir="rtl"] .icon--dir { --flip: -1; }

#app { position: relative; z-index: var(--z-page); }
#app.is-swapping { opacity: 0; }
.js #app { transition: opacity 0.22s ease; }
.lang-pending #app { visibility: hidden; }

/* ---------- background: one colour; a very faint swell of light drifts across it ----------
   waves.svg holds soft blurred ribbons that repeat every half of its width. Each layer is twice the
   screen wide and slides by half its width, so the loop is seamless; the second layer is the same art
   mirrored and moving the other way, which is what makes the light ripple rather than scroll.
   Only transforms animate: the art is drawn once. */
.waves { position: fixed; inset: 0; z-index: var(--z-bg); overflow: hidden; pointer-events: none; }
.waves i {
  position: absolute; top: -6%; left: 0; width: 200%; height: 112%;
  background: url("../img/waves.svg") 0 0 / 100% 100% no-repeat;
  opacity: 0.56; /* at its brightest the light lifts the charcoal by about 3% */
}
.waves i + i { opacity: 0.34; transform: scale(-1, -1); }

/* ---------- top bar ---------- */
.top { padding-block-start: max(0.75rem, env(safe-area-inset-top)); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lang, .iconbtn {
  display: inline-grid; place-items: center;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 1rem;
  background: transparent; color: var(--fg); border: 1px solid var(--line-2);
  font-size: 0.9375rem; line-height: 1; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.lang[lang="ar"] { font-size: 1.125rem; padding-block-end: 0.15rem; }
.iconbtn { padding: 0; }
.iconbtn .icon { width: 1.35rem; height: 1.35rem; }
@media (hover: hover) {
  .lang:hover, .iconbtn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
}
.lang:active, .iconbtn:active { transform: scale(0.96); }

/* ---------- buttons ---------- */
.btn, .chan {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.55rem 1.25rem;
  background: transparent; color: var(--fg); border: 1px solid var(--line-2);
  font-size: var(--fs-btn); font-weight: var(--w-strong); line-height: 1.3;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease), transform 0.25s var(--ease);
}
html[lang="en"] .btn, html[lang="en"] .chan { font-weight: 500; }
.btn::before, .chan::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: var(--fg); transform: scaleY(0); transform-origin: center bottom;
  transition: transform 0.55s var(--ease);
}
.btn--solid { color: var(--bg); border-color: var(--fg); }
.btn--solid::before { transform: scaleY(1); }
@media (hover: hover) {
  .btn--solid:hover { color: var(--fg); }
  .btn--solid:hover::before { transform: scaleY(0); transform-origin: center top; }
  .btn--line:hover, .chan:hover { color: var(--bg); border-color: var(--fg); }
  .btn--line:hover::before, .chan:hover::before { transform: scaleY(1); }
}
.btn:active, .chan:active { transform: scale(0.98); }
.btn .icon, .chan .icon { width: 1.35em; height: 1.35em; }
.btn__swap { position: relative; display: inline-grid; width: 1.35em; height: 1.35em; }
.btn__i { grid-area: 1 / 1; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.btn__i--done { opacity: 0; transform: scale(0.6); }
.btn.is-done .btn__i--idle { opacity: 0; transform: scale(0.6); }
.btn.is-done .btn__i--done { opacity: 1; transform: none; }

/* ---------- the one screen ---------- */
.hub {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
}
.hub__main { display: grid; align-items: center; padding-block: clamp(0.75rem, 3vh, 2.5rem); }

.id { text-align: center; }
.id__mark { width: clamp(5.75rem, 26vw, 8.5rem); margin-inline: auto; color: var(--fg); }
.mark--hero { width: 100%; height: auto; }
.id__name {
  margin-block-start: clamp(0.85rem, 2.6vh, 1.4rem);
  font-size: var(--fs-name); font-weight: var(--w-display);
  line-height: var(--lh-name); letter-spacing: var(--track-display);
}
html[lang="en"] .id__name { text-transform: uppercase; font-variation-settings: "opsz" 60; }
.id__part { display: inline-block; white-space: nowrap; }
.id__part--muted { color: var(--muted); }

/* the titles, directly under the name */
.id__titles {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 0.15rem;
  margin-block-start: 0.3rem; font-size: var(--fs-titles); line-height: 1.6;
}
html[lang="en"] .id__titles { letter-spacing: 0.22em; text-transform: uppercase; }
.id__title + .id__title::before {
  content: ""; display: inline-block; width: 1px; height: 0.9em; margin-inline: 0.85rem;
  background: var(--line-2); vertical-align: -0.08em;
}
html[lang="en"] .id__title + .id__title::before { margin-inline: 0.7rem 0.9rem; }
.id__statement { margin-block-start: 0.45rem; color: var(--muted); font-size: var(--fs-small); line-height: 1.7; text-wrap: balance; }
html[lang="ar"] .id__statement { font-size: clamp(0.875rem, 3.8vw, 1rem); }

.id__actions { display: grid; gap: 0.6rem; margin-block-start: clamp(1.1rem, 3vh, 1.75rem); }
.id__actions > .btn { width: 100%; }
.chans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.chan { width: 100%; padding-inline: 0.5rem; gap: 0.45rem; font-size: var(--fs-small); font-weight: 400; }
@media (max-width: 379px) {
  .chan { flex-direction: column; gap: 0.15rem; min-height: 3.75rem; font-size: 0.875rem; }
}

/* tiles: each one opens its panel */
.tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem;
  margin-block-start: clamp(1rem, 2.8vh, 1.6rem);
}
/* same structure in every tile (mark, title, caption), so titles line up across a row */
.tile {
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 0.7rem 0.9rem 0.75rem;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--fg); text-decoration: none; text-align: start;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.5s var(--ease), background-color 0.5s var(--ease), transform 0.25s var(--ease);
}
.tile__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; height: 1.3rem; }
.tile__icon { width: 1.3rem; height: 1.3rem; }
.tile__swatches { display: inline-flex; gap: 2px; }
.tile__swatches i { display: block; width: 0.42rem; height: 1.05rem; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16); }
.tile__label { display: block; margin-block-start: 0.45rem; font-size: 1.0625rem; font-weight: var(--w-strong); line-height: 1.35; }
.tile__arrow {
  width: 0.95rem; height: 0.95rem; color: var(--muted);
  transform: scaleX(var(--flip, 1)) translate(var(--nx, 0), var(--ny, 0));
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
}
.tile__cap { display: block; color: var(--muted); font-size: 0.8125rem; line-height: 1.45; }
html[lang="ar"] .tile__cap { font-size: 0.875rem; }
.tile:active { transform: scale(0.98); }
@media (hover: hover) {
  .tile:hover { border-color: var(--line-2); background-color: rgb(255 255 255 / 0.05); }
  .tile:hover .tile__arrow { color: var(--fg); --nx: 0.15rem; --ny: -0.15rem; }
}
@media (min-width: 700px) {
  .tile { padding: 0.9rem 1.1rem 0.95rem; }
  .tile__label { font-size: 1.2rem; }
}

.foot { padding-block: 0.5rem calc(1rem + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--muted); font-size: 0.8125rem; }

/* ---------- panels ---------- */
.sheet {
  position: fixed; inset: 0; margin: 0; padding: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  border: 0; background: transparent; color: var(--fg); overflow: hidden;
}
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet::backdrop { background: rgb(0 0 0 / 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet__panel {
  display: flex; flex-direction: column;
  width: 100%; max-height: calc(100% - max(1.25rem, env(safe-area-inset-top)));
  background-color: var(--bg);
  border-block-start: 1px solid var(--line-2);
  box-shadow: 0 -1.5rem 3rem -1.5rem rgb(0 0 0 / 0.5);
}
.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--sheet-pad) 0.85rem; border-block-end: 1px solid var(--line);
}
.sheet__titles { min-width: 0; }
.sheet__title { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; letter-spacing: var(--track-display); }
html[lang="en"] .sheet__title { font-weight: 400; font-variation-settings: "opsz" 48; }
.sheet__title:focus { outline: none; } /* receives focus on open so the panel is announced by name */
/* subtitles in the other language sit in the card's direction (aligned under their title); only the text is isolated */
.sheet__sub, .block__sub, .domain__sub, .ach__sub {
  color: var(--muted); font-size: 0.75rem; line-height: 1.5; letter-spacing: 0.2em; text-transform: uppercase;
}
.sheet__sub[lang="ar"], .block__sub[lang="ar"], .domain__sub[lang="ar"], .ach__sub[lang="ar"] { font-size: 0.9375rem; letter-spacing: 0; text-transform: none; }
.sheet__sub { margin-block-start: 0.15rem; }
.sheet__close {
  display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; padding: 0;
  background: transparent; color: var(--fg); border: 1px solid var(--line-2); cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.sheet__close .icon { width: 1.25rem; height: 1.25rem; }
@media (hover: hover) { .sheet__close:hover { background: var(--fg); color: var(--bg); } }
.sheet__body {
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: var(--sheet-pad) var(--sheet-pad) calc(var(--sheet-pad) + env(safe-area-inset-bottom, 0px));
}
.sheet__intro { margin-block-end: 1.25rem; color: var(--muted); }
@media (min-width: 760px) {
  .sheet[open] { align-items: center; }
  .sheet__panel { width: min(46rem, 100% - 4rem); max-height: min(54rem, 100% - 4rem); border: 1px solid var(--line-2); }
}

/* shared panel pieces */
.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); }
.hl { color: var(--fg); font-weight: 500; white-space: nowrap; }
h3 .hl, h4 .hl { font-weight: inherit; }
.num { color: var(--muted); font-size: 0.8125rem; letter-spacing: 0.18em; font-variant-numeric: lining-nums tabular-nums; }
.metric { font-weight: 300; line-height: 1; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; font-variant-numeric: lining-nums; }
.block { margin-block-start: 2.5rem; }
.block__head { margin-block-end: 1.1rem; }
.block__h { font-size: var(--fs-h3); line-height: var(--lh-tight); }
.block__h--solo { margin-block-end: 1rem; }

/* about */
.prose p + p { margin-block-start: 1rem; }
.prose p:not(.lead) { color: rgb(255 255 255 / 0.82); }
.areas { list-style: none; margin: 0; padding: 0; border-block-start: 1px solid var(--line); }
.area { padding-block: 1.1rem; border-block-end: 1px solid var(--line); }
.area__t { font-size: 1.0625rem; line-height: var(--lh-tight); }
.area__p { margin-block-start: 0.35rem; color: var(--muted); font-size: var(--fs-small); }
.creed { display: grid; gap: 1rem; padding-inline-start: 1.1rem; border-inline-start: 1px solid var(--line-2); }
.creed p { font-size: 1.125rem; line-height: 1.75; }
html[lang="en"] .creed p { font-size: 1.1875rem; line-height: 1.5; font-style: normal; }

/* ventures, each in its own brand colours; the whole card opens its website */
.ventures { display: grid; gap: 0.75rem; }
.venture {
  position: relative; display: block; padding: 1.25rem 1.25rem 1.3rem;
  background: var(--v-bg, var(--surface)); color: var(--v-fg, var(--fg));
  text-decoration: none;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.venture__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.venture__name, .venture__tagline, .venture__text { display: block; }
.venture__logo { width: 3.75rem; height: 3.75rem; object-fit: contain; }
.venture__status { font-size: 0.875rem; line-height: 1.6; opacity: 0.78; text-align: end; }
.venture__name { margin-block-start: 1.3rem; font-size: 1.75rem; font-weight: var(--w-display); line-height: var(--lh-tight); }
html[lang="en"] .venture__name { font-weight: 400; }
.venture__alt { margin-inline-start: 0.6rem; font-size: 0.5em; font-weight: 400; letter-spacing: 0.2em; opacity: 0.72; }
.venture__alt[lang="ar"] { font-size: 0.7em; letter-spacing: 0; }
.venture__tagline { margin-block-start: 0.3rem; line-height: 1.6; }
.venture__text { margin-block-start: 0.35rem; font-size: var(--fs-small); opacity: 0.8; }
.venture__visit {
  display: flex; align-items: center; gap: 0.4rem;
  margin-block-start: 1rem; padding-block-start: 0.85rem; width: 100%;
  border-block-start: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 22%, transparent);
  font-size: 0.9375rem; font-weight: var(--w-strong);
}
.venture__visit .icon { width: 1rem; height: 1rem; transition: transform 0.45s var(--ease); }
.venture--linked:active { transform: scale(0.99); }
@media (hover: hover) {
  .venture--linked:hover { transform: translateY(-3px); box-shadow: 0 1.25rem 2.5rem -1.5rem rgb(0 0 0 / 0.6); }
  .venture--linked:hover .venture__visit .icon { transform: scaleX(var(--flip, 1)) translate(0.15rem, -0.15rem); }
}

/* expertise: four numbered domains */
.domains { display: grid; gap: 0.75rem; margin-block-start: 1.75rem; }
.domain {
  padding: 1.15rem 1.15rem 1.25rem; background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.5s var(--ease), background-color 0.5s var(--ease);
}
.domain__head { display: flex; align-items: flex-start; gap: 0.9rem; }
.domain__head .num { font-size: 1.6rem; letter-spacing: 0.02em; line-height: 1; font-weight: 300; padding-block-start: 0.2rem; color: var(--muted); }
.domain__t { font-size: var(--fs-h3); line-height: var(--lh-tight); }
.domain__sub { margin-block-start: 0.1rem; }
.domain__list {
  list-style: none; margin: 1rem 0 0; padding: 0.95rem 0 0;
  border-block-start: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem 1rem;
  font-size: 0.9375rem; line-height: 1.5; color: rgb(255 255 255 / 0.84);
}
html[lang="en"] .domain__list { font-size: 0.9375rem; }
.domain__list li { position: relative; padding-inline-start: 0.85rem; }
.domain__list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.62em; width: 4px; height: 4px; background: var(--muted); }
@media (max-width: 519px) { .domain__list { grid-template-columns: 1fr; } }
@media (hover: hover) { .domain:hover { border-color: var(--line-2); background-color: rgb(255 255 255 / 0.05); } }

/* skills as tags */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  padding: 0.35rem 0.85rem; border: 1px solid var(--line); color: rgb(255 255 255 / 0.84);
  font-size: 0.9375rem; line-height: 1.55;
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), background-color 0.4s var(--ease);
}
@media (hover: hover) { .tag:hover { border-color: var(--line-2); color: var(--fg); background-color: rgb(255 255 255 / 0.05); } }

/* selected experience */
.xps { display: grid; gap: 0.75rem; }
.xpc { padding: 1.1rem 1.15rem 1.2rem; border: 1px solid var(--line); background: var(--surface); }
.xpc--metric { border-color: var(--line-2); }
.xpc--metric .metric { font-size: clamp(3rem, 15vw, 4.25rem); margin-block-end: 0.6rem; }
.xpc__t { font-size: 1.0625rem; line-height: var(--lh-tight); }
.xpc__p { margin-block-start: 0.35rem; color: var(--muted); font-size: var(--fs-small); }
@media (min-width: 560px) {
  .xps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xpc--metric { grid-column: 1 / -1; }
}

/* achievements: numbered cards; the 250% has its own space; TEFSAL in its colours */
.achv { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.ach {
  position: relative; padding: 1.15rem 1.15rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease), background-color 0.5s var(--ease);
}
.ach__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 1.5rem; margin-block-end: 0.85rem; }
.ach__logo { width: 2.75rem; height: 2.75rem; object-fit: contain; }
.ach__date { padding: 0.2rem 0.6rem; border: 1px solid var(--line-2); font-size: 0.875rem; line-height: 1.5; }
.ach__metric { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 0.75rem; margin-block-end: 0.75rem; }
.ach__metric .metric { font-size: 2.75rem; }
.metric__label { color: var(--muted); font-size: var(--fs-small); line-height: 1.4; }
.ach__t { font-size: var(--fs-h3); line-height: var(--lh-tight); }
.ach__sub { margin-block-start: 0.15rem; }
.ach__p { margin-block-start: 0.55rem; color: rgb(255 255 255 / 0.78); font-size: var(--fs-small); }
.ach--feature { padding-block: 1.5rem 1.6rem; border-color: var(--line-2); background: rgb(255 255 255 / 0.05); }
.ach--feature .ach__metric { display: block; margin-block-end: 1rem; }
.ach--feature .metric { display: block; font-size: clamp(4.25rem, 22vw, 6.5rem); }
.ach--feature .metric__label { display: block; margin-block-start: 0.4rem; font-size: 1rem; }
.ach--venture { background: var(--v-bg); color: var(--v-fg); border-color: transparent; }
.ach--venture .num, .ach--venture .ach__sub { color: inherit; opacity: 0.72; }
.ach--venture .ach__p { color: inherit; opacity: 0.86; }
.ach__image { display: block; margin-block-start: 1rem; border: 1px solid var(--line); background: var(--white); }
.ach__image img { width: 100%; height: auto; }
@media (hover: hover) {
  .ach:hover { transform: translateY(-2px); border-color: var(--line-2); }
  .ach--venture:hover { border-color: transparent; }
}

/* positions */
.pos { padding: 1.25rem; border: 1px solid var(--line-2); background: var(--surface); }
.pos__head { display: flex; align-items: center; gap: 1rem; }
.pos__logo { width: 3.75rem; height: 3.75rem; flex: none; object-fit: contain; }
.pos__role { font-size: var(--fs-h3); line-height: var(--lh-tight); }
.pos__org { margin-block-start: 0.2rem; font-size: var(--fs-small); line-height: 1.55; }
.pos__alt { margin-block-start: 0.1rem; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; letter-spacing: 0.06em; }
.pos__alt[lang="ar"] { font-size: 0.9375rem; letter-spacing: 0; }
.pos__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-block-start: 1rem; }
.badge { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0.7rem; border: 1px solid var(--line-2); font-size: 0.875rem; line-height: 1.5; }
.badge i { display: block; width: 6px; height: 6px; background: var(--fg); }
.pos__since { color: var(--muted); font-size: 0.875rem; }
.pos__p { margin-block-start: 0.85rem; color: rgb(255 255 255 / 0.82); }
.pos__image { display: block; margin-block-start: 1.25rem; border: 1px solid var(--line); }
.pos__image img { width: 100%; height: auto; }

/* CV: save first, preview after */
.cv__actions { display: grid; gap: 0.6rem; }
.cv__actions .btn { width: 100%; }
@media (min-width: 480px) { .cv__actions { grid-template-columns: 1.4fr 1fr; } }
.cv__pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-block-start: 1.5rem; }
.cv__page a { display: block; border: 1px solid var(--line); background: var(--white); transition: transform 0.45s var(--ease); }
.cv__page img { width: 100%; height: auto; }
.cv__page figcaption { margin-block-start: 0.5rem; color: var(--muted); font-size: 0.875rem; text-align: center; }
@media (hover: hover) { .cv__page a:hover { transform: translateY(-3px); } }

/* share: the QR appears only here, on request */
.share { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.share__qr { width: min(15rem, 66vw); aspect-ratio: 1; padding: 0.9rem; background: var(--white); color: var(--charcoal); }
.share__qr svg { width: 100%; height: 100%; }
.share__hint { color: var(--muted); font-size: var(--fs-small); }
.share__hint[hidden] { display: none; }
.share__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.6rem; width: 100%; margin-block-start: 0.5rem; }
.share__actions [hidden] { display: none; }

.noscript { position: relative; z-index: var(--z-page); padding: 1rem var(--gutter); color: var(--muted); font-size: var(--fs-small); text-align: center; }

/* ---------- motion (light) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(0.9rem); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes mk-in { to { opacity: 1; } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(1rem) scale(0.985); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(0.6rem) scale(0.99); } }
/* the light drifts slowly sideways and rises and falls a little */
@keyframes wave-a { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes wave-b { from { transform: translate3d(-50%, 0, 0) scale(-1, -1); } to { transform: translate3d(0, 0, 0) scale(-1, -1); } }
@keyframes wave-swell { from { translate: 0 -1.6%; } to { translate: 0 1.6%; } }
.mk { opacity: 0; animation: mk-in 0.26s linear forwards; }

@media (prefers-reduced-motion: no-preference) {
  .waves i { animation: wave-a 110s linear infinite, wave-swell 23s ease-in-out infinite alternate; }
  .waves i + i { animation: wave-b 160s linear infinite, wave-swell 31s ease-in-out infinite alternate-reverse; }
  html.has-sheet .waves i { animation-play-state: paused; } /* nothing moves behind an open panel */
  .waves-still .waves i { animation: none; }

  /* first paint: the mark assembles, then name, titles, actions and tiles settle in order */
  .id__mark { animation: fade 0.9s ease backwards; animation-delay: 0.1s; }
  .mark--hero .mark__c { animation: fade 0.8s ease backwards; animation-delay: 1.35s; }
  .id__name, .id__titles, .id__statement, .id__actions {
    animation: rise 1s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 80ms + 180ms);
  }
  .tile { animation: rise 0.9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms + 560ms); }
  .no-intro .id__mark, .no-intro .mark--hero .mark__c, .no-intro .id__name, .no-intro .id__titles,
  .no-intro .id__statement, .no-intro .id__actions, .no-intro .tile { animation: none; }

  /* panels slide up on phones and settle in the centre on larger screens */
  .sheet[open] .sheet__panel { animation: sheet-in 0.55s var(--ease) backwards; }
  .sheet[open]::backdrop { animation: fade 0.4s ease backwards; }
  .sheet.is-closing .sheet__panel { animation: sheet-out 0.28s cubic-bezier(0.4, 0, 1, 1) forwards; }
  .sheet.is-closing::backdrop { animation: fade-out 0.28s ease forwards; }

  /* inside a panel, cards settle in as they scroll into view */
  .js .sheet [data-reveal] { opacity: 0; transform: translateY(0.8rem); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), border-color 0.5s var(--ease), background-color 0.5s var(--ease); }
  .js .sheet [data-reveal].is-in { opacity: 1; transform: none; }
  @media (hover: hover) {
    .js .sheet .ach[data-reveal].is-in:hover { transform: translateY(-2px); }
    .js .sheet .venture--linked[data-reveal].is-in:hover { transform: translateY(-3px); }
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  .sheet[open] .sheet__panel { animation-name: modal-in; animation-duration: 0.45s; }
  .sheet.is-closing .sheet__panel { animation-name: modal-out; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .sheet::backdrop { animation: none !important; }
}

/* without scripts the panels simply follow the screen as ordinary sections */
.no-js .sheet { display: block; position: static; width: auto; height: auto; overflow: visible; }
.no-js .sheet__panel { max-height: none; width: min(100% - 2 * var(--gutter), var(--maxw)); margin: 0 auto 2rem; border: 1px solid var(--line); box-shadow: none; }
.no-js .sheet__close, .no-js .iconbtn, .no-js #share { display: none; }

@media print {
  .waves, .top, #share { display: none !important; }
  html, body { background: #fff; color: #000; }
}
