@font-face {
  font-family: Inter;
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("fonts/noto-sans-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --surface: #fffdf8;
  --ink: #20211e;
  --body: #43453e;
  --muted: #595d53;
  --rule: #d7d4cb;
  --orange: #e54e2b;
  --dark-orange: #a6361a;
  --dark: #242620;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(1.25rem, 5.8vw, 6.25rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 Inter, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, summary { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
section[id] { scroll-margin-top: 1rem; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 3px solid #ab3b1c; outline-offset: 4px; }
::selection { background: #f5aa87; color: #1c1915; }
[hidden] { display: none !important; }
.wrap { width: min(calc(100% - var(--gutter) * 2), 78rem); margin-inline: auto; }
.icon { width: 1.1em; height: 1.1em; flex: none; stroke-width: 1.7; }
.skip-link { position: fixed; inset-block-start: .5rem; inset-inline-start: .7rem; z-index: 20; padding: .5rem 1rem; background: var(--ink); color: white; transform: translateY(-170%); }
.skip-link:focus { transform: translateY(0); }
.nowrap { white-space: nowrap; }

/* Navigation */
.site-header { position: sticky; top: 0; z-index: 8; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 4.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.brand-mark { font-family: Inter, Arial, sans-serif; font-weight: 785; font-size: 2.33rem; line-height: .98; letter-spacing: -.125em; padding-inline-end: .11em; }
.brand-mark span, .accent-stop { color: var(--orange); font-style: normal; }
.brand-name { font-size: .9rem; font-weight: 620; letter-spacing: -.035em; padding-inline-start: 1rem; border-inline-start: 1px solid #c8c6bb; }
.header-actions, .desktop-nav, .hero-actions, .social-links { display: flex; align-items: center; }
.header-actions { gap: clamp(.8rem, 2vw, 2rem); }
.desktop-nav { gap: clamp(1.15rem, 2.3vw, 2.3rem); }
.desktop-nav > a, .header-cv, .language-picker > summary, .mobile-list a { font-size: .9rem; font-weight: 570; }
.desktop-nav > a { padding: .55rem 0; }
.desktop-nav > a:hover, .social-links a:hover, .mobile-list a:hover { color: var(--dark-orange); }
.menu-pop { position: relative; }
.menu-pop > summary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.6rem; }
.language-picker { margin-inline-start: .15rem; padding-inline-start: clamp(.7rem, 1.8vw, 1.7rem); border-inline-start: 1px solid var(--rule); }
.language-picker > summary { font-family: Inter, Arial, sans-serif; font-size: .84rem; }
.language-picker .icon:first-child { width: 1rem; height: 1rem; }
.chevron { width: .85rem; height: .85rem; transition: transform .15s ease; }
.menu-pop[open] > summary .chevron { transform: rotate(180deg); }
.header-cv { border: 1px solid #383a32; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .62rem .95rem; line-height: 1.3; }
.header-cv:hover { background: var(--ink); color: var(--surface); }
.drop-list { position: absolute; inset-block-start: calc(100% + .45rem); inset-inline-end: 0; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; min-width: 9.1rem; box-shadow: 0 7px 22px #24241d18; }
.drop-list a { display: flex; align-items: center; gap: .6rem; padding: .52rem .68rem; border-radius: 3px; white-space: nowrap; }
.drop-list a:hover, .drop-list a:focus-visible { background: #f2eee5; }
.language-list a { font-size: .94rem; justify-content: space-between; }
.language-list a[aria-current] { font-weight: 690; }
.language-list a[lang="ar"] { font-family: "Noto Sans Arabic", sans-serif; }
.language-list .icon { width: .95rem; color: var(--dark-orange); }
.mobile-nav { display: none; }

/* The first screen */
.hero { overflow: clip; }
.hero-grid { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 3.8vw, 3.9rem); padding-block: clamp(3.2rem, 5.8vw, 6rem) clamp(3.4rem, 5.2vw, 5.5rem); }
.kicker, .project-type { display: flex; align-items: center; gap: .7rem; font: 600 .82rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .083em; }
.kicker > span { width: 1.7rem; height: 2px; background: var(--orange); flex: none; }
.hero h1 { margin: 1.25rem 0 1.3rem; font-size: clamp(4.4rem, 7.45vw, 7.2rem); line-height: .97; font-weight: 690; letter-spacing: -.061em; }
.hero h1 > span { display: block; }
.hero h1 .accent-stop { margin-inline-start: .012em; }
.hero-intro, .case-lead { max-width: 32.5rem; color: var(--body); font-size: clamp(1.03rem, 1.25vw, 1.2rem); line-height: 1.59; letter-spacing: -.028em; }
.hero-actions { flex-wrap: wrap; gap: .75rem; margin-top: 1.55rem; }
.btn { min-height: 2.9rem; display: inline-flex; align-items: center; justify-content: center; gap: .61rem; border: 1px solid transparent; border-radius: 5px; padding: .68rem 1.2rem; font-size: .95rem; line-height: 1.45; font-weight: 620; letter-spacing: -.018em; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--ink); color: #fffdf9; border-color: var(--ink); }
.btn-primary:hover { background: #414339; border-color: #414339; }
.btn-secondary { border-color: #aaa99f; background: transparent; }
.btn-secondary:hover { border-color: var(--ink); background: #efede5; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .84rem; margin-top: 1.35rem; font-size: .86rem; color: var(--muted); }
.hero-meta > span { display: inline-flex; align-items: center; gap: .38rem; }
.hero-meta .icon { width: .99rem; height: .99rem; }
.status-dot { width: .45rem; height: .45rem; border-radius: 50%; background: #59754d; }
.meta-divider { width: 1px; height: .76rem; background: #c8c7bc; }
.hero-art { display: flex; align-items: center; justify-content: center; }
.hero-art img { width: 100%; mask-image: linear-gradient(90deg, transparent, black 3%, black 97%, transparent), linear-gradient(0deg, transparent, black 3%, black 97%, transparent); mask-composite: intersect; }

/* Project and evidence */
.section { padding-block: clamp(3.5rem, 5.7vw, 6rem); }
.work-section { background: var(--surface); border-block: 1px solid var(--rule); }
.section-title { font-size: clamp(2.8rem, 4.4vw, 4.25rem); line-height: 1.06; letter-spacing: -.055em; font-weight: 655; margin-bottom: clamp(1.55rem, 2.6vw, 2.7rem); }
.section-title .accent-stop { margin-inline-start: .018em; }
.feature { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); border: 1px solid var(--rule); border-radius: 9px; overflow: hidden; }
.feature-image { min-height: 22rem; position: relative; background: #292520; overflow: hidden; }
.feature-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.feature-image:hover img { transform: scale(1.025); }
.feature-body { padding: clamp(1.6rem, 3.15vw, 3.45rem); align-self: center; }
.project-type { font-size: .78rem; letter-spacing: .065em; color: var(--muted); }
.tiny-square { width: .52rem; height: .52rem; background: var(--orange); flex: none; }
.project-name { font-family: Inter, Arial, sans-serif; text-align: start; font-size: clamp(2.6rem, 3.7vw, 3.7rem); margin: .65rem 0 .55rem; letter-spacing: -.07em; line-height: 1.08; font-weight: 665; }
.feature-description, .about-intro, .case-chapter p, .case-notes p { color: var(--body); }
.feature-description { font-size: 1.04rem; letter-spacing: -.02em; line-height: 1.62; }
.tags { display: flex; flex-wrap: wrap; gap: .37rem; list-style: none; padding: 0; margin-top: 1rem; }
.tags li { border: 1px solid var(--rule); border-radius: 4px; padding: .15rem .47rem; font: 500 .77rem/1.6 var(--mono); color: #42443c; }
.case-link { width: fit-content; display: flex; align-items: center; gap: .48rem; margin-top: 1.4rem; font-weight: 625; font-size: .94rem; border-bottom: 1px solid var(--ink); padding-bottom: .14rem; }
.case-link:hover, .breadcrumb a:hover { color: var(--dark-orange); border-color: var(--dark-orange); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-start: clamp(1.75rem, 3vw, 3rem); }
.stats > div { border-inline-start: 1px solid var(--rule); padding-inline-start: clamp(1rem, 3.4vw, 3rem); }
.stats > div:first-child { border: 0; padding-inline-start: 0; }
.stats dt { font-size: .93rem; color: var(--muted); }
.stats dd { display: block; font-family: Inter, Arial, sans-serif; font-size: clamp(2rem, 3.4vw, 3.45rem); font-weight: 645; line-height: 1.2; letter-spacing: -.065em; direction: ltr; text-align: inherit; }
.stats > div { display: flex; flex-direction: column; }
.stats dd { order: -1; }

/* Background and contact */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); }
.about-intro { font-size: clamp(1.12rem, 1.4vw, 1.35rem); line-height: 1.62; letter-spacing: -.027em; max-width: 37rem; }
.education { margin-top: 1.7rem; }
.about-grid h3 { font-size: 1.05rem; font-weight: 670; line-height: 1.4; margin-bottom: .65rem; }
.education h3 { margin-bottom: .34rem; }
.education p, .languages span { font-size: .96rem; color: var(--body); }
.education .school { font-weight: 595; color: var(--ink); }
.languages { margin-top: 1.2rem; }
.languages strong, .languages span { display: block; }
.languages strong { font-size: 1.03rem; margin-bottom: .15rem; }
.skill-rows > div { display: grid; grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.7fr); gap: 1rem; line-height: 1.55; padding-block: .6rem; border-top: 1px solid var(--rule); }
.skill-rows dt { font-size: .94rem; font-weight: 615; }
.skill-rows dd { font-size: .95rem; color: var(--body); }
.cert-list { margin-top: 1.25rem; border-block: 1px solid var(--rule); }
.cert-list summary, .case-notes summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; padding-block: .85rem; }
.cert-list .count { color: var(--muted); font-size: .84rem; }
.expander { width: 1.1rem; height: 1.1rem; }
details[open] > summary .expander .v { display: none; }
.cert-year { font-family: var(--mono); font-size: .81rem; color: var(--muted); }
.cert-list ul { padding: .4rem 0 1rem 1.25rem; color: var(--body); font-size: .94rem; }
.cert-list li + li { margin-top: .3rem; }
.contact-section, .case-contact { background: var(--dark); color: #fffdf7; }
.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 4rem; padding-block: clamp(3.2rem, 5.5vw, 5.5rem); }
.contact-title { font-size: clamp(3rem, 5.6vw, 5.8rem); font-weight: 630; line-height: 1.1; letter-spacing: -.075em; }
.contact-grid p, .case-contact p { color: #d2d4c9; max-width: 35rem; margin-top: .7rem; }
.contact-actions { position: relative; justify-self: end; width: fit-content; max-width: 100%; }
.email-link { display: inline-block; max-width: 100%; font-size: clamp(1.4rem, 2.8vw, 2.6rem); font-weight: 530; line-height: 1.35; letter-spacing: -.055em; border-bottom: 1px solid #888b7e; overflow-wrap: anywhere; }
.email-link:hover { color: #ffc4a9; }
.copy-email { margin-top: .65rem; display: flex; gap: .42rem; align-items: center; background: transparent; color: #e2e3db; border: 0; padding: .3rem 0; font-size: .9rem; }
.copy-email:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-status { display: block; min-height: 1.4rem; font-size: .82rem; color: #ffb293; }
.contact-section :focus-visible, .case-contact :focus-visible { outline-color: #ffae8c; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.25rem; color: var(--muted); }
.footer small, .social-links { font-size: .85rem; }
.social-links { gap: 1.2rem; }
.social-links a { padding-block: .3rem; }

/* Project case study */
.case-page { background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: .65rem; padding-block: 1.6rem .65rem; font-size: .88rem; color: var(--muted); }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span { color: #99988b; }
.case-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(2rem, 5vw, 5.2rem); align-items: center; padding-block: 1.2rem 2.5rem; }
.case-hero h1 { font: 670 clamp(4rem, 7.1vw, 7.1rem)/1.05 Inter, Arial, sans-serif; letter-spacing: -.082em; margin: .75rem 0 1rem; }
.case-art { overflow: hidden; border-radius: 7px; background: #191815; }
.case-art img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.case-facts { display: grid; grid-template-columns: 1.05fr .8fr .85fr 1.45fr; border-block: 1px solid var(--rule); padding-block: 1.15rem; gap: 1.5rem; }
.case-facts dt { font: 550 .8rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .035em; color: var(--muted); margin-bottom: .35rem; }
.case-facts dd { font-size: .95rem; color: var(--ink); }
.store-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem 0; }
.store-badge { display: inline-flex; align-items: center; gap: .6rem; padding: .72rem 1.3rem; background: var(--ink); color: #fffdf9; border-radius: 7px; font-size: .92rem; font-weight: 580; letter-spacing: -.015em; transition: background .15s, box-shadow .15s; border: 1px solid transparent; }
.store-badge:hover { background: #414339; box-shadow: 0 2px 8px #24241d22; }
.store-badge .icon { width: 1.25rem; height: 1.25rem; stroke-width: 0; fill: currentColor; }
.case-page .stats { margin-block: 2.2rem 2.8rem; }
.case-chapter { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(2rem, 5.3vw, 5rem); padding-block: 2.9rem; border-top: 1px solid var(--rule); }
.case-chapter h2, .case-contact h2 { font-weight: 635; font-size: clamp(1.85rem, 3vw, 3rem); line-height: 1.13; letter-spacing: -.06em; }
.case-chapter > p { font-size: 1.08rem; line-height: 1.75; max-width: 47rem; }
.case-notes details { border-bottom: 1px solid var(--rule); }
.case-notes details:first-child { border-top: 1px solid var(--rule); }
.case-notes summary { font-size: 1.1rem; line-height: 1.5; padding-block: 1rem; }
.case-notes p { padding-bottom: 1.2rem; font-size: 1rem; line-height: 1.72; }
.case-contact-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; align-items: center; gap: 3rem; padding-block: clamp(3rem, 5vw, 5rem); }
.case-bottom-links { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.btn-light { color: var(--ink); background: var(--surface); }
.btn-light:hover { background: #f0e5d5; }
.back-work { font-size: .95rem; text-decoration: underline; text-underline-offset: 4px; }

/* Keep the same composition and comfortable line heights in Arabic. */
html:lang(ar) body { font-family: "Noto Sans Arabic", Inter, Arial, sans-serif; }
html:lang(ar) .hero h1 { letter-spacing: -.035em; line-height: 1.25; font-size: clamp(4rem, 6.8vw, 6.8rem); margin-block: .5rem .9rem; }
html:lang(ar) .kicker, html:lang(ar) .project-type, html:lang(ar) .case-facts dt { font-family: inherit; letter-spacing: 0; }
html:lang(ar) .section-title, html:lang(ar) .contact-title, html:lang(ar) .case-chapter h2, html:lang(ar) .case-contact h2 { letter-spacing: -.035em; line-height: 1.4; }
html:lang(ar) .hero-intro, html:lang(ar) .about-intro, html:lang(ar) .case-lead, html:lang(ar) .feature-description { letter-spacing: 0; line-height: 1.8; }
html:lang(ar) .brand-name, html:lang(ar) .btn { letter-spacing: 0; }
html:lang(ar) .project-name, html:lang(ar) .stats dd { text-align: right; }
html:lang(ar) .skill-rows dd { unicode-bidi: plaintext; text-align: right; }

@media (min-width: 1500px) {
  .hero-grid { padding-block: 5.7rem; }
}
@media (max-width: 940px) {
  :root { --gutter: clamp(1.3rem, 4.5vw, 3rem); }
  .brand-name { display: none; }
  .hero-grid { gap: 1.25rem; }
  .hero h1 { font-size: clamp(3.8rem, 8.3vw, 5.5rem); }
  .feature-body { padding: 1.8rem; }
  .feature-image { min-height: 20rem; }
  .about-grid { gap: 2.5rem; }
  .case-facts { grid-template-columns: 1fr 1fr; }
  .case-contact-inner { grid-template-columns: 1fr; gap: 1.4rem; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 4.6rem; }
  .header-inner { min-height: 3.8rem; }
  .header-actions { gap: .95rem; }
  .brand-name { display: inline; font-size: .8rem; }
  .brand { gap: .7rem; }
  .brand-name { padding-inline-start: .7rem; }
  .brand-mark { font-size: 2rem; }
  .desktop-nav, .header-cv { display: none; }
  .language-picker { padding-inline-start: 0; border: 0; }
  .mobile-nav { display: block; }
  .mobile-nav > summary { width: 2.5rem; min-height: 2.5rem; }
  .mobile-nav > summary .icon { width: 1.37rem; height: 1.37rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.35rem; padding-block: 2.75rem 2.15rem; }
  .hero h1 { font-size: clamp(3.45rem, 16.4vw, 6.3rem); margin-block: 1rem; }
  .hero-intro { max-width: 35rem; }
  .hero-actions { margin-top: 1.2rem; }
  .hero-meta { margin-top: 1rem; }
  .hero-art { width: min(100%, 31rem); margin-inline: auto; }
  .hero-art img { max-height: 23rem; object-fit: contain; }
  .section { padding-block: 2.8rem; }
  .feature { grid-template-columns: 1fr; }
  .feature-image { min-height: 0; aspect-ratio: 1.65 / 1; }
  .feature-body { padding: 1.4rem; }
  .stats { gap: .65rem; }
  .stats > div { padding-inline-start: .75rem; }
  .stats dt { font-size: .84rem; line-height: 1.45; margin-top: .2rem; }
  .stats dd { font-size: clamp(1.55rem, 5.4vw, 2.25rem); }
  .about-grid, .contact-grid, .case-hero, .case-chapter { grid-template-columns: 1fr; }
  .contact-grid { gap: 1.5rem; }
  .contact-actions { justify-self: start; }
  .case-hero { gap: 1.4rem; }
  .case-hero h1 { margin-block: .7rem; }
  .case-art img { max-height: 26rem; }
  .case-chapter { gap: 1.15rem; padding-block: 2rem; }
  html:lang(ar) .hero h1 { font-size: clamp(3.7rem, 12vw, 5.8rem); }
}
@media (max-width: 480px) {
  .hero-actions { gap: .55rem; }
  .hero-actions .btn { padding-inline: .75rem; gap: .4rem; font-size: .9rem; }
}
@media (max-width: 370px) {
  .brand-name { display: none; }
  .stats { gap: .25rem; }
  .stats > div { padding-inline-start: .45rem; }
  .skill-rows > div { grid-template-columns: 1fr; gap: .15rem; }
  .contact-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.cv-options {
  width: min(26rem, calc(100% - 2rem));
  padding: 1.5rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: .6rem;
}
.cv-options::backdrop { background: #20211e66; }
.cv-options h2 { font-size: 1.4rem; }
.cv-options p { margin: .5rem 0 1.2rem; color: var(--body); }
.cv-options form { display: inline; margin-inline-start: .75rem; }
.cv-options button { background: none; border: 0; padding: .6rem; color: var(--body); text-decoration: underline; }
.cv-options .header-cv { display: inline-flex; }
