/* Rodeina Fouad — site styles. Every value comes from Edit website → Design, through the CSS variables printed in the page head. */
:root {
	--rfs-font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
	--rfs-font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
	--rfs-size-name: clamp(25.5px, 2.083vw, 52.5px);
	--rfs-size-menu: clamp(14.5px, 1.181vw, 29.8px);
	--rfs-size-text: clamp(13.6px, 1.111vw, 28px);
	--rfs-name-case: uppercase;
	--rfs-bg: #ffffff;
	--rfs-ink: #000000;
	--rfs-text: rgba(0,0,0,.85);
	--rfs-current: #a6a6a6;
	--rfs-margin: 37px;
	--rfs-header-pos: sticky;
	--rfs-work-h: 70vh;
	--rfs-work-gap: 40vh;
	--rfs-grid-h: 40vh;
	--rfs-grid-gap: 12px;
	--rfs-align: center;
	--rfs-home-header: #ffffff;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--rfs-bg); color: var(--rfs-text); font-family: var(--rfs-font); font-size: var(--rfs-size-text); line-height: 1.45; overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
html[lang="ar"] body { font-family: var(--rfs-font-ar); line-height: 1.75; font-size: calc(var(--rfs-size-text) * 1.1); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--rfs-ink); outline-offset: 3px; }
@media (hover: hover) { a:hover { opacity: .6; } }
i, em { font-style: italic; }
.u { text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--rfs-ink); color: var(--rfs-bg); padding: 8px 12px; }
.skip:focus { left: 8px; }
main { flex: 1 0 auto; outline: none; }

/* Header: name at the start, menu at the end, on one line */
.site-header { position: var(--rfs-header-pos); top: 0; z-index: 20; padding: 28px var(--rfs-margin); background: var(--rfs-bg); }
.admin-bar .site-header { top: 32px; }
.rfs-header-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 32px; pointer-events: auto; }
.brand { font-size: var(--rfs-size-name); text-transform: var(--rfs-name-case); letter-spacing: .01em; color: var(--rfs-ink); line-height: 1.1; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; font-size: var(--rfs-size-menu); }
.site-nav li { display: flex; align-items: baseline; }
.site-nav li + li::before { content: "|"; padding: 0 .7em; }
.site-nav a[aria-current="page"] { color: var(--rfs-current); }
.site-nav .rfs-langswitch a { font-family: var(--rfs-font-ar); }
html[lang="ar"] .site-nav .rfs-langswitch a { font-family: var(--rfs-font); }
.menu-toggle { display: none; font: inherit; font-size: var(--rfs-size-menu); color: inherit; background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; }
.menu-toggle .when-open, .is-open .menu-toggle .when-closed { display: none; }
.is-open .menu-toggle .when-open { display: inline; }

/* Home with the default image: full screen, name and menu over it */
.home-image .site-header { position: absolute; left: 0; right: 0; color: var(--rfs-home-header); background: transparent; }
.home-image .brand { color: var(--rfs-home-header); }
.home-image .site-footer { display: none; }
.home-image-wrap { position: fixed; inset: 0; }
.home-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* Home with an exhibition */
.home-ex { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 12px var(--rfs-margin) 40px; }
.home-ex-media img { max-height: calc(var(--rfs-work-h) + 6vh); width: auto; }

.caption { margin: 0; text-align: var(--rfs-align); max-width: 1100px; }
.empty { padding: 40px var(--rfs-margin); }

/* Artworks: one per screen */
.works { display: flex; flex-direction: column; gap: var(--rfs-work-gap); padding: 24px var(--rfs-margin) 20vh; }
.work { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4vh; }
.work img { max-height: var(--rfs-work-h); width: auto; }
.work .caption { margin-top: 2vh; }

/* Exhibitions */
.exhibitions { display: flex; flex-direction: column; gap: calc(var(--rfs-work-gap) * .6); padding: 24px var(--rfs-margin) 20vh; }
.ex { display: flex; flex-direction: column; align-items: center; gap: 48px; scroll-margin-top: 120px; }
.ex-single img { max-height: var(--rfs-work-h); width: auto; }
.ex-grid { width: 100%; display: flex; flex-wrap: wrap; gap: var(--rfs-grid-gap); }
.ex-grid::after { content: ""; flex-grow: 999; }
.ex-cell { flex: var(--r) 1 calc(var(--rfs-grid-h) * var(--r)); height: var(--rfs-grid-h); min-width: 0; }
.ex-cell img { width: 100%; height: 100%; object-fit: cover; }
.ex-texts { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ex-text { scroll-margin-top: 120px; }

/* CV */
.cv { padding: 24px var(--rfs-margin) 12vh; }
.cv-intro { margin: 0 0 32px; }
.cv-cols { display: flex; flex-wrap: wrap; gap: 28px 4vw; }
.cv-col { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.cv-section h2 { margin: 0 0 4px; font-size: inherit; font-weight: 600; color: var(--rfs-ink); }
.cv-section ul { list-style: none; margin: 0; padding: 0; }
.cv-section li { display: grid; grid-template-columns: 4.8em minmax(0, 1fr); gap: 8px; line-height: 1.5; }
.cv-year { font-weight: 600; color: var(--rfs-ink); }
.cv a { text-decoration: underline; text-underline-offset: 3px; }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 40px 48px; padding: 24px var(--rfs-margin) 12vh; align-items: flex-start; }
.contact-portrait { margin: 0; flex: 0 1 34vw; min-width: 260px; }
.contact-text { display: flex; flex-direction: column; gap: 6px; padding-top: 24px; flex: 1 1 300px; }
.contact-title { margin: 0; font-size: inherit; font-weight: 400; }
.contact-email { font-weight: 600; color: var(--rfs-ink); }
.contact-note { margin-top: 64px; }
.contact-ig { margin-top: 36px; display: inline-flex; width: 44px; height: 44px; align-items: center; }

/* Footer */
.site-footer { padding: 24px var(--rfs-margin); font-size: calc(var(--rfs-size-text) * .82); }

/* Phone */
@media (max-width: 760px) {
	.site-header { padding: 18px 20px; }
	.rfs-header-inner { flex-wrap: nowrap; align-items: center; }
	.brand { font-size: max(22px, var(--rfs-size-name)); }
	.menu-toggle { display: inline-block; margin-inline-start: auto; }
	.site-nav { display: none; }
	.site-header.is-open { position: fixed; inset: 0; background: var(--rfs-bg); color: var(--rfs-text); z-index: 50; }
	.site-header.is-open .brand { color: var(--rfs-ink); }
	.site-header.is-open .rfs-header-inner { flex-wrap: wrap; }
	.site-header.is-open .site-nav { display: block; width: 100%; padding-top: 20px; }
	.site-nav ul { flex-direction: column; align-items: flex-start; font-size: 22px; line-height: 1.7; }
	.site-nav li + li::before { content: none; }
	.works, .exhibitions, .cv, .contact, .home-ex { padding-left: 20px; padding-right: 20px; }
	.work img, .ex-single img, .home-ex-media img { max-height: none; width: 100%; }
	.ex-cell { flex-basis: 100%; height: auto; }
	.ex-cell img { height: auto; }
	.contact-portrait { flex-basis: 100%; }
	.cv-section li { grid-template-columns: 3.6em minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
