/* =========================================================
   Ibraheem Eurish — portfolio
   Design system + layout
   ========================================================= */

:root {
  --paper:      #f5f1e8;   /* warm ivory */
  --paper-2:    #efe9dc;
  --ink:        #1c1a17;   /* warm near-black */
  --ink-soft:   #2a2722;
  --muted:      #6c6358;
  --muted-2:    #8c8478;
  --line:       rgba(28, 26, 23, 0.14);
  --line-soft:  rgba(28, 26, 23, 0.08);
  --accent:     #a86a3c;   /* clay / ochre */
  --accent-dk:  #8a5530;
  --shadow:     0 24px 60px -30px rgba(28, 26, 23, 0.55);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 6px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; }
.section__title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-optical-sizing: auto;
}
.section__eyebrow {
  font-size: .74rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent-dk); font-weight: 600; margin-bottom: 1rem;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--wrap); margin-inline: auto; padding: clamp(14px, 2vw, 22px) var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; color: #fff; transition: color .4s; }
.nav__brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid currentColor; border-radius: 50%;
  font-family: var(--serif); font-size: .95rem; letter-spacing: .04em;
}
.nav__brand-name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav__links a {
  color: #fff; font-size: .92rem; font-weight: 500; letter-spacing: .01em;
  position: relative; transition: color .3s, opacity .3s; opacity: .92;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: currentColor; transition: width .35s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__links a:hover { opacity: 1; }
.nav__cta {
  border: 1px solid rgba(255,255,255,.55); padding: 8px 18px; border-radius: 999px;
}
.nav__cta:hover { background: #fff; color: var(--ink) !important; border-color: #fff; }

/* scrolled state */
.nav.is-solid {
  background: rgba(245, 241, 232, 0.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 24px -16px rgba(0,0,0,.4);
}
.nav.is-solid .nav__brand,
.nav.is-solid .nav__links a { color: var(--ink); }
.nav.is-solid .nav__cta { border-color: var(--line); }
.nav.is-solid .nav__cta:hover { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.nav.is-solid .nav__toggle span { background: var(--ink); }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; width: 30px; height: 22px; position: relative; }
.nav__toggle span { position: absolute; left: 0; height: 2px; width: 100%; background: #fff; transition: transform .35s var(--ease), opacity .25s; }
.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 10px; }
.nav__toggle span:nth-child(3) { top: 20px; }
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--ink);
  display: grid; place-items: center; opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.mobile-menu a {
  font-family: var(--serif); font-size: clamp(2rem, 9vw, 3rem); color: var(--paper);
  padding: 8px 24px; opacity: .9; transition: color .3s, opacity .3s;
}
.mobile-menu a:hover { color: var(--accent); opacity: 1; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(20,18,15,.78) 0%, rgba(20,18,15,.18) 38%, rgba(20,18,15,.10) 60%, rgba(20,18,15,.42) 100%);
}
.hero__content { position: relative; max-width: var(--wrap); margin-inline: auto; padding: 0 var(--gut) clamp(70px, 12vh, 130px); width: 100%; }
.hero__eyebrow {
  font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 1.1rem; color: rgba(255,255,255,.86);
}
.hero__title { font-size: clamp(3.2rem, 11vw, 8.5rem); font-weight: 300; letter-spacing: -0.02em; }
.hero__lede { max-width: 42ch; margin-top: 1.4rem; font-size: clamp(1.02rem, 1.5vw, 1.28rem); color: rgba(255,255,255,.9); font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }
.hero__cue {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0; width: 26px; height: 42px;
  border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
}
.hero__cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: #fff; translate: -50% 0; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 14px); } 100% { opacity: 0; } }

/* buttons */
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s; }
.btn--solid { background: var(--paper); color: var(--ink); }
.btn--solid:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn--ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }

/* =========================================================
   STATEMENT
   ========================================================= */
.statement { padding: clamp(70px, 12vh, 140px) 0; background: var(--paper); }
.statement__text { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 3.4vw, 2.5rem); line-height: 1.4; max-width: 22ch; }
.statement .wrap { max-width: 1100px; }
.statement__text { max-width: none; }
.statement__lead { color: var(--accent-dk); font-style: italic; }
.statement__text strong { font-weight: 500; }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { padding: clamp(64px, 11vh, 130px) 0; }
.section--work { background: var(--paper); border-top: 1px solid var(--line-soft); }
.section--photo { background: var(--ink); color: var(--paper); }
.section__head { max-width: 60ch; margin-bottom: clamp(36px, 6vh, 64px); }
.section__intro { margin-top: 1.1rem; color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
.section--photo .section__intro { color: rgba(245,241,232,.66); }
.section--photo .section__eyebrow { color: #c89163; }
.section__note { margin-top: clamp(30px, 5vh, 54px); color: var(--muted); }
.section__note a { color: var(--accent-dk); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.section__note a:hover { color: var(--ink); }

/* ---------- paintings masonry ---------- */
.masonry { columns: 3 300px; column-gap: clamp(16px, 2vw, 28px); }
.art { break-inside: avoid; margin-bottom: clamp(16px, 2vw, 28px); }
.art__link { display: block; position: relative; overflow: hidden; background: var(--ink-soft); box-shadow: var(--shadow); }
.art__link img { width: 100%; transition: transform .9s var(--ease), filter .9s var(--ease); }
.art__link::after {
  content: "View"; position: absolute; inset: auto 0 0 0; padding: 28px 18px 14px;
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: #fff;
  background: linear-gradient(to top, rgba(20,18,15,.6), transparent);
  opacity: 0; transition: opacity .4s var(--ease);
}
.art__link:hover img { transform: scale(1.05); }
.art__link:hover::after { opacity: 1; }
.art figcaption { display: flex; flex-direction: column; padding: 14px 2px 0; }
.art__name { font-family: var(--serif); font-size: 1.18rem; }
.art__meta { font-size: .82rem; color: var(--muted-2); letter-spacing: .04em; margin-top: 2px; }

/* =========================================================
   BAND (interlude)
   ========================================================= */
.band { position: relative; min-height: 64vh; display: grid; place-items: center; color: #fff; text-align: center; overflow: hidden; }
.band__media { position: absolute; inset: 0; }
.band__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.band__scrim { position: absolute; inset: 0; background: rgba(18,16,13,.5); }
.band__quote { position: relative; max-width: 760px; padding: 60px var(--gut); }
.band__quote p { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(1.5rem, 3.6vw, 2.6rem); line-height: 1.34; }
.band__quote cite { display: block; margin-top: 1.4rem; font-style: normal; font-size: .82rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.78); }

/* =========================================================
   PHOTOGRAPHY grid
   ========================================================= */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1vw, 16px); grid-auto-flow: dense; }
.photo { position: relative; overflow: hidden; background: #000; aspect-ratio: 1 / 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity .6s; }
.photo--wide { grid-column: span 2; }
.photo--tall { grid-row: span 2; }
.photo--wide, .photo--tall { aspect-ratio: auto; }
.photo:hover img { transform: scale(1.06); }
.photo__cap {
  position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column;
  padding: 34px 16px 14px; color: #fff; font-size: .82rem;
  background: linear-gradient(to top, rgba(15,13,10,.74), transparent);
  opacity: 0; translate: 0 8px; transition: opacity .45s var(--ease), translate .45s var(--ease);
}
.photo__cap b { font-family: var(--serif); font-weight: 400; font-size: 1.06rem; }
.photo:hover .photo__cap, .photo:focus-visible .photo__cap { opacity: 1; translate: 0 0; }

/* =========================================================
   ABOUT
   ========================================================= */
.section--about { background: var(--paper); border-top: 1px solid var(--line-soft); }
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about__frame {
  aspect-ratio: 4 / 5; display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 30% 20%, #e7dfcd, #d8cdb4);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.about__frame span { font-family: var(--serif); font-size: clamp(4rem, 10vw, 7rem); color: rgba(28,26,23,.22); letter-spacing: .02em; }
.about__portrait-note { margin-top: 12px; font-size: .76rem; color: var(--muted-2); text-align: center; }
.about__portrait-note code { background: var(--paper-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.about__body p { margin-top: 1.1rem; color: var(--ink-soft); font-size: 1.06rem; max-width: 56ch; }
.about__body p:first-of-type { margin-top: 1.4rem; }
.about__facts { list-style: none; padding: 0; margin-top: 2.2rem; border-top: 1px solid var(--line); }
.about__facts li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.about__facts span { color: var(--muted-2); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; align-self: center; }

/* =========================================================
   CONTACT
   ========================================================= */
.section--contact { background: var(--ink); color: var(--paper); text-align: center; }
.section--contact .section__eyebrow { color: #c89163; }
.contact { max-width: 760px; }
.contact .section__title { color: var(--paper); }
.contact__lede { margin: 1.4rem auto 0; color: rgba(245,241,232,.7); max-width: 48ch; font-size: 1.08rem; }
.contact__email {
  display: inline-block; margin-top: 2.4rem; font-family: var(--serif);
  font-size: clamp(1.6rem, 5vw, 3rem); color: var(--paper); position: relative;
}
.contact__email::after { content: ""; position: absolute; left: 0; bottom: 2px; width: 0; height: 1px; background: var(--accent); transition: width .5s var(--ease); }
.contact__email:hover { color: #fff; }
.contact__email:hover::after { width: 100%; }
.contact__socials { margin-top: 2rem; display: flex; gap: 14px; justify-content: center; align-items: center; color: rgba(245,241,232,.55); font-size: .9rem; letter-spacing: .04em; }
.contact__socials a { letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; transition: color .3s; }
.contact__socials a:hover { color: var(--accent); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: #14120f; color: rgba(245,241,232,.6); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer__brand { font-family: var(--serif); font-size: 1.2rem; color: var(--paper); }
.footer__nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 28px); }
.footer__nav a { font-size: .86rem; transition: color .3s; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { font-size: .82rem; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  background: rgba(14,12,10,.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); padding: 5vh 4vw;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__stage { max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox__stage img { max-width: 92vw; max-height: 80vh; object-fit: contain; box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); transition: opacity .3s; }
.lightbox__cap { color: rgba(255,255,255,.86); text-align: center; }
.lightbox__cap b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.lightbox__cap span { font-size: .82rem; letter-spacing: .06em; color: rgba(255,255,255,.55); }
.lightbox__close { position: fixed; top: 22px; right: 28px; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; opacity: .8; transition: opacity .25s, transform .25s; }
.lightbox__close:hover { opacity: 1; transform: rotate(90deg); }
.lightbox__nav { position: fixed; top: 50%; translate: 0 -50%; background: none; border: 0; color: #fff; font-size: 3rem; cursor: pointer; opacity: .65; transition: opacity .25s; padding: 18px; }
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* =========================================================
   REVEAL animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero__cue span { animation: none; }
  .art__link img, .photo img { transition: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 360px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo--wide { grid-column: span 2; }
  .photo--tall { grid-row: span 1; }
}
@media (max-width: 540px) {
  .masonry { columns: 1; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo--wide { grid-column: span 1; }
  .photo { aspect-ratio: 4 / 3; }
  .hero { min-height: 92svh; }
  .about__facts li { grid-template-columns: 1fr; gap: 2px; }
}
