/* These sources look only on the reader's device. No web font files are served. */
@font-face {
  font-family: "Thmanyah Text Local";
  src: local("thmanyahseriftext-Light"), local("thmanyah serif text Light");
  font-style: normal; font-weight: 300; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Text Local";
  src: local("thmanyahseriftext-Regular"), local("thmanyah serif text Regular");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Text Local";
  src: local("thmanyahseriftext-Medium"), local("thmanyah serif text Medium");
  font-style: normal; font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Text Local";
  src: local("thmanyahseriftext-Bold"), local("thmanyah serif text Bold");
  font-style: normal; font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Text Local";
  src: local("thmanyahseriftext-Black"), local("thmanyah serif text Black");
  font-style: normal; font-weight: 900; font-display: swap;
}
/* UI and reading faces follow different rhythms in Arabic. */
@font-face {
  font-family: "Thmanyah Sans Local";
  src: local("thmanyahsans-Regular"),local("thmanyah sans Regular");
  font-weight: 400;
}
@font-face {
  font-family: "Thmanyah Sans Local";
  src: local("thmanyahsans-Medium"),local("thmanyah sans Medium");
  font-weight: 500;
}
@font-face {
  font-family: "Thmanyah Sans Local";
  src: local("thmanyahsans-Bold"),local("thmanyah sans Bold");
  font-weight: 700;
}
@font-face {
  font-family: "Thmanyah Sans Local";
  src: local("thmanyahsans-Black"),local("thmanyah sans Black");
  font-weight: 900;
}
@font-face {
  font-family: "Portfolio Naskh";
  src: url("/assets/fonts/noto-naskh-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Naskh";
  src: url("/assets/fonts/noto-naskh-arabic-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-size: 100%;
  --arabic-ui: "Thmanyah Sans Local", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  --arabic-reading: "Thmanyah Text Local", "Portfolio Naskh", "IBM Plex Sans Arabic", Georgia, serif;
  --thmanyah-local: var(--arabic-reading);
}
html:lang(ar) { --sans: var(--arabic-ui); font-family: var(--sans); }
html:lang(ar) :is(h1,h2,h3):lang(ar) { letter-spacing: normal; }
.thmanyah-live { font-family: var(--arabic-reading); letter-spacing: normal; }
.main-nav:lang(ar) a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  font-size: 1.04rem;
}
.type-art picture { display: block; }
.type-art {
  position: relative;
  display: inline-block;
  max-width: 100%;
  width: var(--art-size, var(--art-width));
  vertical-align: middle;
  letter-spacing: normal;
  line-height: 0;
}
.type-art .type-art-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.type-art .type-art-natural {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Keep the three identity treatments inside a stable canvas when switched. */
.type-art--name {
  width: var(--art-size, 4.6em);
  aspect-ratio: 3.3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}
.type-art--name .type-art-image {
  width: var(--art-width);
  max-width: 100%;
  height: 100%;
  object-position: right center;
}
.type-art--wordmark { width: var(--art-size, 5.15rem); }
.type-art--inline { width: var(--art-size, var(--art-width)); vertical-align: -.14em; }

@supports ((mask-image: linear-gradient(black, black)) or (-webkit-mask-image: linear-gradient(black, black))) {
  .type-art--tone .type-art-image { opacity: 0; }
  .type-art--tone::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: currentColor;
    -webkit-mask: var(--art-source) right center / contain no-repeat;
    mask: var(--art-source) right center / contain no-repeat;
  }
  .type-art--tone.type-art--name::after {
    width: min(100%, var(--art-width));
    inset-inline-end: auto;
  }
}

@media (forced-colors: active), print {
  .type-art, .type-art--name, .type-art--wordmark, .type-art--inline {
    width: auto; max-width: 100%; aspect-ratio: auto; display: inline; line-height: inherit;
  }
  .type-art .type-art-natural {
    position: static; width: auto; height: auto; clip-path: none; white-space: normal; overflow: visible;
  }
  .type-art .type-art-image, .type-art--tone::after { display: none; }
}


/* When an illustration fails, its original Arabic phrase takes its place. */
.type-art[data-unavailable] {
  display: inline; width: auto; aspect-ratio: auto; line-height: 1.45;
}
.type-art[data-unavailable] .type-art-natural {
  position: static; width: auto; height: auto; clip-path: none; white-space: normal;
}
.type-art[data-unavailable] :is(img,picture,.silver-face), .type-art[data-unavailable]::after { display: none; }
@media (max-width: 40rem) {
  .main-nav:lang(ar) a {font-size: .99rem;}
}
