:root {
  --paper: #f4f1eb;
  --ink: #151515;
  --muted: #817d75;
  --line: rgba(21,21,21,.18);
  --accent: #d85d3f;
  --dark: #202521;
  --mono: "DM Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Cairo", Arial, sans-serif; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
main { overflow: hidden; }

.site-header { position: fixed; z-index: 20; top: 0; right: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 25px; width: min(100%, 1700px); margin: auto; padding: 22px clamp(20px, 5vw, 78px); transition: background .3s ease, padding .3s ease; }
.site-header.scrolled { padding-block: 13px; background: rgba(244,241,235,.92); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(15px); }
.brand { display: inline-flex; align-items: center; gap: 9px; direction: ltr; font-size: .88rem; font-weight: 800; }
.brand b { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--ink); font: .66rem var(--mono); letter-spacing: -.1em; }
.nav-links { display: flex; gap: 30px; font-size: .77rem; font-weight: 700; }
.nav-links a { color: var(--muted); transition: color .2s ease; }
.nav-links a:hover, .nav-links a.active, .contact-link:hover { color: var(--accent); }
.contact-link { display: inline-flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 800; }
.contact-link i { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--ink); border-radius: 50%; font-style: normal; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--ink); background: transparent; }
.menu-toggle span { display: block; width: 100%; height: 1px; margin: 6px 0; background: var(--ink); transition: transform .25s ease; }
.menu-toggle.is-open span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.portfolio-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; min-height: 315px; padding: 133px clamp(20px, 8vw, 130px) 45px; border-bottom: 1px solid var(--line); }
.eyebrow { display: block; color: var(--muted); font: .61rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.intro-title h1 { margin: 22px 0 0; color: var(--ink); font-family: "Aref Ruqaa Ink", Cairo, sans-serif; font-size: clamp(4.2rem, 8.5vw, 8.2rem); font-weight: 700; line-height: 1.12; letter-spacing: -.04em; white-space: nowrap; }
em { color: var(--accent); font-style: normal; }
.intro-info { display: flex; align-items: end; gap: 30px; color: var(--muted); font-size: .78rem; }
.intro-info p { margin: 0; line-height: 1.8; }
.intro-info span { font: .6rem var(--mono); }

.gallery-section { padding: 54px clamp(20px, 8vw, 130px) 125px; }
.gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.gallery-heading .eyebrow { color: var(--accent); }
.gallery-heading h2 { margin: 18px 0 0; font-size: clamp(3.3rem, 6.2vw, 6.5rem); line-height: 1.05; letter-spacing: -.09em; }
.gallery-count { color: var(--muted); font: .6rem var(--mono); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 175px; gap: 14px; margin-top: 54px; }
.gallery-item { position: relative; min-width: 0; min-height: 220px; padding: 0; border: 0; overflow: hidden; background: var(--dark); cursor: zoom-in; text-align: right; }
.gallery-item:nth-child(8n+1) { grid-column: span 2; grid-row: span 3; }
.gallery-item:nth-child(8n+2) { grid-row: span 2; }
.gallery-item:nth-child(8n+3) { grid-row: span 3; }
.gallery-item:nth-child(8n+4) { grid-row: span 2; }
.gallery-item:nth-child(8n+5) { grid-row: span 2; }
.gallery-item:nth-child(8n+6) { grid-column: span 2; grid-row: span 3; }
.gallery-item:nth-child(8n+7), .gallery-item:nth-child(8n+8) { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease, opacity .35s ease; }
.gallery-item:hover img { transform: scale(1.055); opacity: .72; }

.load-more { display: block; margin: 42px auto 0; padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: .74rem; font-weight: 800; }
.load-more span { margin-right: 8px; color: var(--accent); }

.about { display: grid; grid-template-columns: .55fr 1.35fr auto; align-items: center; gap: 30px; padding: 56px clamp(20px, 8vw, 130px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about .eyebrow { color: var(--accent); }
.about p { max-width: 680px; margin: 0; font-size: clamp(1.4rem, 2.7vw, 2.8rem); line-height: 1.6; letter-spacing: -.05em; font-weight: 700; }
.about-socials { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.about a { padding-bottom: 6px; border-bottom: 1px solid var(--ink); font: .65rem var(--mono); }
.contact-name { margin: -28px 0 42px; color: rgba(255,255,255,.78); font: .72rem var(--mono); }
.contact { padding: clamp(85px, 11vw, 160px) clamp(20px, 8vw, 130px) 35px; background: var(--accent); color: #fff; }
.contact h2 { margin: 26px 0 45px; font-size: clamp(4rem, 9vw, 10rem); line-height: 1.04; letter-spacing: -.1em; }
.contact h2 em { color: var(--dark); }
.contact-button { display: inline-flex; align-items: center; gap: 24px; padding: 13px 19px; background: var(--dark); font-size: .78rem; font-weight: 800; transition: transform .25s ease, background .25s ease, color .25s ease; }
.contact-button:hover { transform: translateY(-3px); background: #fff; color: var(--ink); }
.contact-button b { font-size: 1.1rem; font-weight: 400; }
.contact-details { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 32px; margin-top: 72px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.4); font: .63rem var(--mono); }
.contact-info { display: grid; gap: 9px; white-space: nowrap; }
.contact-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.contact-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 13px 15px; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.08); transition: background .25s ease, color .25s ease, transform .25s ease; }
.contact-action b { font-size: .95rem; font-weight: 400; }
.contact-action:hover { opacity: 1 !important; transform: translateY(-3px); background: #fff; color: var(--ink); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px clamp(20px, 8vw, 130px); color: var(--muted); font: .6rem var(--mono); }
.site-footer a { color: var(--ink); }
.footer-logo { display: inline-flex; align-items: center; }
.footer-logo img { width: min(190px, 24vw); max-width: 100%; height: auto; max-height: 58px; object-fit: contain; }

.whatsapp-float { position: fixed; z-index: 25; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: clamp(52px, 4.2vw, 64px); height: clamp(52px, 4.2vw, 64px); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .25s ease; }
.whatsapp-float img { width: 100%; height: 100%; border-radius: 0; object-fit: contain; }
.whatsapp-float:hover { transform: translateY(-4px) scale(1.05); }
.whatsapp-float:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@media (max-width: 900px) { .whatsapp-float { width: 58px; height: 58px; } }
@media (max-width: 650px) { .whatsapp-float { left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); width: 54px; height: 54px; } }
@media (max-height: 500px) and (orientation: landscape) { .whatsapp-float { width: 48px; height: 48px; } }


.lightbox { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(16,18,16,.96); opacity: 1; transition: opacity .32s ease; }
.lightbox[hidden] { display: none; }
.lightbox.is-closing { opacity: 0; }
.lightbox-inner { display: grid; gap: 12px; justify-items: center; align-items: center; width: min(1500px, 97vw); max-height: 94svh; margin: 0 auto; transform: scale(1); opacity: 1; }
.lightbox:not(.is-closing) .lightbox-inner { animation: lightboxIn .42s cubic-bezier(.2,.75,.25,1) both; }
.lightbox.is-closing .lightbox-inner { transform: scale(.96); opacity: 0; transition: transform .32s ease, opacity .25s ease; }
.lightbox img { width: auto; max-width: 96vw; max-height: 90svh; object-fit: contain; box-shadow: 0 24px 90px rgba(0,0,0,.38); }
.lightbox p { margin: 0; color: #fff; font-size: .76rem; }
.lightbox-close { position: absolute; top: 20px; left: 24px; width: 43px; height: 43px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font-size: 1.8rem; cursor: pointer; transition: transform .25s ease, background .25s ease; }
.lightbox-close:hover { transform: rotate(90deg); background: var(--accent); border-color: var(--accent); }
@keyframes lightboxIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 900px) {
  .portfolio-intro { padding-inline: 6vw; }
  .gallery-section, .about, .contact, .site-footer { padding-inline: 6vw; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 160px; gap: 10px; }
  .about { grid-template-columns: .35fr 1fr; }
  .about-socials { grid-column: 2; }
  .about a { grid-column: auto; }
}
@media (max-width: 650px) {
  .site-header, .site-header.scrolled { padding: 13px 18px; }
  .nav-links { position: fixed; inset: 0; display: grid; align-content: center; gap: 27px; padding: 90px 28px 40px; background: var(--paper); transform: translateX(100%); transition: transform .35s ease; font-size: 1.35rem; }
  .nav-links.is-open { transform: translateX(0); }
  .contact-link { display: none; }
  .menu-toggle { position: relative; z-index: 2; display: block; }
  .portfolio-intro { display: block; min-height: 0; padding: 113px 20px 32px; }
  .intro-title { text-align: center; }
  .intro-title h1 { margin-top: 20px; font-size: clamp(3.25rem, 15vw, 5.6rem); line-height: 1.2; letter-spacing: -.03em; white-space: nowrap; }
  .intro-info { justify-content: space-between; margin-top: 28px; font-size: .74rem; }
  .gallery-section { padding: 38px 20px 90px; }
  .gallery-heading h2 { font-size: clamp(3.6rem, 18vw, 6rem); }
  .gallery-count { align-self: end; font-size: .56rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 145px; gap: 8px; margin-top: 36px; }
  .gallery-item:nth-child(8n+1), .gallery-item:nth-child(8n+6) { grid-column: span 2; grid-row: span 3; }
  .gallery-item:nth-child(8n+2), .gallery-item:nth-child(8n+3), .gallery-item:nth-child(8n+4), .gallery-item:nth-child(8n+5), .gallery-item:nth-child(8n+7), .gallery-item:nth-child(8n+8) { grid-column: span 1; grid-row: span 2; }
  .gallery-item { min-height: 0; }
  .about { display: block; padding: 48px 20px; }
  .about p { margin: 30px 0 25px; font-size: 1.9rem; }
  .about-socials { gap: 15px; }
  .contact-name { margin: -22px 0 35px; }
  .contact { padding: 82px 20px 28px; }
  .contact h2 { margin: 24px 0 40px; font-size: clamp(4.2rem, 20vw, 7rem); line-height: 1.08; }
  .contact-details { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 60px; }
  .contact-info { gap: 8px; }
  .contact-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .contact-action { padding: 12px 9px; gap: 5px; font-size: .54rem; }
  .site-footer { display: grid; gap: 12px; padding: 23px 20px; }
  .footer-logo img { width: min(155px, 52vw); max-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
