/* ============================================
   Bassam Anouti — Portfolio
   Color palette derived from the Iconic catalog
   ============================================ */

:root {
  --sand:        #FAFAFA;
  --sand-light:  #FFFFFF;
  --sand-dark:   #E8E8E8;
  --brown:       #1A1A1A;
  --brown-light: #3A3A3A;
  --brown-muted: #888888;
  --grey-warm:   #F0F0F0;
  --cream:       #FFFFFF;
  --white:       #FFFFFF;
  --black:       #0A0A0A;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--sand);
  color: var(--brown);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Typography ---- */
.display-font {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  font-weight: 400;
  letter-spacing: 0.08em;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(91, 52, 37, 0.1);
}

.nav__logo {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  transition: opacity 0.3s;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brown);
  transition: width 0.3s;
}

.nav__links a:hover::after { width: 100%; }
.nav__links a:hover { opacity: 0.7; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--brown);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.hero__title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1;
  color: var(--brown);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1.2s ease forwards 0.3s;
}

.hero__subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.35em;
  margin-top: 1.5rem;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 0.8s;
}

.hero__year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 1.1s;
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 1.6s;
}

.hero__scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--brown);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ---- Section base ---- */
.section {
  padding: 6rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section__label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown-muted);
  margin-bottom: 1rem;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--brown);
  opacity: 0.3;
  margin: 3rem 0;
}

/* ---- About ---- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  padding-top: 8rem;
}

.about__col h3 {
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--brown);
}

.about__col p {
  font-size: 1.05rem;
  color: var(--brown);
  opacity: 0.85;
  margin-bottom: 1.2rem;
  text-align: justify;
}

/* ---- Series Intro ---- */
.series-intro {
  padding: 6rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.series-intro__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}

.series-intro__content p {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 1.2rem;
  text-align: justify;
}

/* ---- Category Divider ---- */
.category-divider {
  padding: 8rem 3rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  text-align: right;
}

.category-divider__title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--brown-muted);
  opacity: 0.6;
}

/* ---- Gallery Grid ---- */
.gallery {
  padding: 2rem 3rem 6rem;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery__filters {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.gallery__filter {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border: 1px solid transparent;
  color: var(--brown-muted);
  transition: all 0.3s;
}

.gallery__filter:hover,
.gallery__filter.active {
  color: var(--brown);
  border-color: var(--brown);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ---- Artwork Card ---- */
.artwork-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--grey-warm);
  aspect-ratio: 1;
  transition: transform 0.4s;
}

.artwork-card:hover { transform: scale(1.02); }

.artwork-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.artwork-card:hover img { transform: scale(1.05); }

.artwork-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,18,16,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.artwork-card:hover .artwork-card__overlay { opacity: 1; }

.artwork-card__title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--cream);
  letter-spacing: 0.05em;
}

.artwork-card__meta {
  font-size: 0.75rem;
  color: var(--sand-dark);
  margin-top: 0.3rem;
  letter-spacing: 0.1em;
}

/* placeholder for missing images */
.artwork-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--grey-warm);
  color: var(--sand-light);
  padding: 2rem;
  text-align: center;
}

.artwork-card__placeholder .placeholder-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.artwork-card__placeholder .placeholder-dim {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ---- Artwork Modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 16, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  max-width: 1200px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--sand);
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s;
}

.modal-backdrop.open .modal {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--brown);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.modal__close:hover { opacity: 0.5; }

.modal__image {
  background: var(--grey-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__text {
  padding: 3rem;
  overflow-y: auto;
}

.modal__category {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown-muted);
  margin-bottom: 0.75rem;
}

.modal__title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.modal__dimensions {
  font-size: 0.8rem;
  color: var(--brown-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.modal__body p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-align: justify;
  opacity: 0.85;
  line-height: 1.8;
}

/* ---- Exhibitions ---- */
.exhibitions__list {
  margin-top: 2rem;
}

.exhibition {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(91, 52, 37, 0.1);
}

.exhibition:first-child {
  border-top: 1px solid rgba(91, 52, 37, 0.1);
}

.exhibition__year {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--brown-muted);
  padding-top: 0.2rem;
}

.exhibition__title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.exhibition__venue {
  font-size: 0.85rem;
  color: var(--brown-muted);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-style: italic;
}

.exhibition__desc {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.7;
}

.exhibition__desc em {
  font-style: italic;
}

/* ---- Education ---- */
.education {
  padding: 6rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid rgba(91, 52, 37, 0.1);
}

.education__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3rem;
}

.education__card {
  padding: 2rem;
  border: 1px solid rgba(91, 52, 37, 0.12);
}

.education__card h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.education__card p {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.6;
}

.education__card .card-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown-muted);
  margin-bottom: 0.5rem;
}

/* ---- Footer ---- */
.footer {
  padding: 4rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(91, 52, 37, 0.1);
}

.footer__name {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__links a {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.footer__links a:hover { opacity: 1; }

.footer__copy {
  font-size: 0.7rem;
  opacity: 0.4;
  letter-spacing: 0.1em;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .about,
  .series-intro__content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .education__grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    grid-template-columns: 1fr;
  }

  .modal__image {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem;
    gap: 2rem;
    transition: right 0.4s;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  }

  .nav__links.open { right: 0; }

  .nav__hamburger { display: flex; }

  .nav__hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  .nav__hamburger.open span:nth-child(2) { opacity: 0; }
  .nav__hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  .section { padding: 4rem 1.5rem; }

  .hero__title { letter-spacing: 0.1em; }

  .gallery { padding: 2rem 1.5rem 4rem; }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .education__grid {
    grid-template-columns: 1fr;
  }

  .exhibition {
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
  }

  .category-divider { padding: 5rem 1.5rem 2rem; }

  .modal { width: 96%; }
  .modal__text { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--white); }
::-webkit-scrollbar-thumb { background: #CCCCCC; border-radius: 3px; }
