/* ============================================================
   SAM BENARI — STREET PHOTOGRAPHY
   Editorial Black & White Photography Website
   Inspired by Magnum Photos aesthetic
   ============================================================ */

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

:root {
  --black: #0d0d0d;
  --white: #f4f2ee;   /* warm off-white, like photo paper */
  --mid: #8a8680;
  --light: #d8d4ce;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --nav-h: 64px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--white);
  border-bottom: 1px solid var(--light);
  transition: border-color var(--transition);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--black);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--black);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--black);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  margin-top: var(--nav-h);
  padding: 0;
  border-bottom: 1px solid var(--light);
  display: flex;
  align-items: stretch;
  min-height: 60vh;
  position: relative;
}

.hero-image {
  flex: 1;
  overflow: hidden;
  background: var(--light);
  padding-left: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-text {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 60px 32px 80px;
  background: var(--white);
}

.hero-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  font-family: var(--sans);
  font-weight: 300;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 10vw, 8.5rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--black);
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */

.projects-section {
  padding: 0 32px 120px;
  flex: 1;
}

.section-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--light);
  margin-bottom: 40px;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
}

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

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--black);
  aspect-ratio: 4/3;
  display: block;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  opacity: 0.9;
}

.project-card:hover img {
  transform: scale(1.04);
  opacity: 0.75;
}

.project-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  transform: translateY(8px);
  transition: transform var(--transition);
}

.project-card:hover .project-card-info {
  transform: translateY(0);
}

.project-card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.project-card-count {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,242,238,0.55);
  margin-top: 4px;
}

/* Empty state */
.no-projects {
  grid-column: 1/-1;
  padding: 80px 0;
  text-align: center;
  color: var(--mid);
}

.no-projects h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 12px;
}

.no-projects p {
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ============================================================
   PROJECT PAGE
   ============================================================ */

.project-header {
  margin-top: var(--nav-h);
  padding: 48px 32px 32px;
  border-bottom: 1px solid var(--light);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color var(--transition);
  margin-bottom: 32px;
}

.back-link:hover {
  color: var(--black);
}

.project-title-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.project-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

.project-count {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}

.project-description {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--mid);
  line-height: 1.5;
  margin-top: 12px;
  max-width: 600px;
}

.project-slideshow-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  cursor: pointer;
  transition: color var(--transition);
  padding: 4px 0;
  white-space: nowrap;
}

.project-slideshow-btn:hover {
  color: var(--black);
}

/* ============================================================
   PHOTO STRIP / MASONRY
   ============================================================ */

.photo-strip-section {
  padding: 40px 32px 120px;
}

.photo-strip {
  columns: 3;
  column-gap: 3px;
}

.strip-item {
  break-inside: avoid;
  margin-bottom: 3px;
  cursor: zoom-in;
  overflow: hidden;
  display: block;
  background: var(--black);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.strip-item img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0.92;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.strip-item:hover img {
  transform: scale(1.02);
  opacity: 1;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: lb-in 0.25s ease;
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  filter: grayscale(100%);
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.lightbox-counter {
  color: rgba(244,242,238,0.45);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 10;
  background: none;
  border: none;
  color: rgba(244,242,238,0.6);
  cursor: pointer;
  transition: color var(--transition);
  padding: 8px;
}

.lightbox-close:hover {
  color: var(--white);
}

.lightbox-slideshow {
  position: absolute;
  top: 24px;
  right: 100px;
  z-index: 10;
  background: none;
  border: none;
  color: rgba(244,242,238,0.6);
  cursor: pointer;
  transition: color var(--transition);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 300;
}

.lightbox-slideshow:hover {
  color: var(--white);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover { color: var(--white); transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { color: var(--white); transform: translateY(-50%) translateX(3px); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-main {
  margin-top: var(--nav-h);
  flex: 1;
  padding: 80px 32px 120px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-portrait {
  position: relative;
}

.portrait-placeholder {
  aspect-ratio: 3/4;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  /* Replace this with your photo — see comment in HTML */
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(100%);
}

.about-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--light);
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.about-bio p {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.7;
  font-weight: 300;
  color: var(--black);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--light);
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color var(--transition);
}

.about-link:hover {
  color: var(--black);
}

/* ============================================================
   STORE PAGE
   ============================================================ */

.store-main {
  margin-top: var(--nav-h);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.under-construction {
  text-align: center;
  padding: 80px 32px;
}

.construction-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.construction-rule {
  width: 60px;
  height: 1px;
  background: var(--light);
}

.construction-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

.construction-sub {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
}

.construction-text {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--mid);
  margin: 4px 0;
}

.construction-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 32px;
  border: 1px solid var(--black);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
  transition: background var(--transition), color var(--transition);
}

.construction-btn:hover {
  background: var(--black);
  color: var(--white);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--light);
  padding: 24px 32px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--black);
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--mid);
  letter-spacing: 0.06em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero-image {
    height: 350px;
    padding-left: 0;
    padding-right: 32px;
  }

  .hero-text {
    flex: 1;
    padding: 56px 32px;
  }

  .hero-title {
    font-size: clamp(4rem, 9vw, 6rem);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 600px;
  }
  .about-portrait {
    max-width: 320px;
  }
  .photo-strip {
    columns: 2;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  #nav {
    padding: 0 20px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--light);
    flex-direction: column;
    gap: 0;
    padding: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    border-bottom: 1px solid var(--light);
  }

  .nav-links a {
    display: block;
    padding: 18px 20px;
    font-size: 0.85rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    flex-direction: column;
    min-height: auto;
    padding: 0;
  }

  .hero-image {
    height: 300px;
    padding-left: 0;
    padding-right: 20px;
  }

  .hero-text {
    flex: 1;
    padding: 48px 20px;
    gap: 6px;
  }

  .hero-title {
    font-size: clamp(3.5rem, 9vw, 5rem);
  }

  .projects-section {
    padding: 0 20px 80px;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }

  .project-header {
    padding: 32px 20px 24px;
  }

  .project-title-section {
    flex-direction: column;
    gap: 16px;
  }

  .project-description {
    font-size: 0.9rem;
  }

  .project-slideshow-btn {
    font-size: 0.7rem;
  }

  .photo-strip-section {
    padding: 24px 20px 80px;
  }

  .photo-strip {
    columns: 2;
    column-gap: 2px;
  }

  .about-main {
    padding: 48px 20px 80px;
  }

  .about-grid {
    gap: 32px;
  }

  .lightbox-prev { left: 8px; padding: 12px 10px; }
  .lightbox-next { right: 8px; padding: 12px 10px; }
  .lightbox-slideshow { right: 70px; font-size: 0.65rem; padding: 8px 10px; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    gap: 20px;
  }
}

@media (max-width: 380px) {
  .photo-strip {
    columns: 1;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PAGE LOAD ANIMATION
   ============================================================ */

.fade-in {
  animation: fadeIn 0.6s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
