/* Custom styles for Brooke Kanas portfolio */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom colors as CSS variables */
:root {
  --bg-cream: #F0EBE3;
  --text-charcoal: #3D3229;
  --sage: #A7B5A0;
  --terracotta: #C4907E;
  --clay: #D4B5A0;
  --neutral: #E2DDD5;
}

/* Nav bar gradient */
nav.fixed {
  background: linear-gradient(135deg, var(--neutral) 0%, var(--clay) 50%, var(--sage) 100%);
  background-color: rgba(226, 221, 213, 0.9);
}

@supports (backdrop-filter: blur(8px)) {
  nav.fixed {
    background: linear-gradient(135deg, rgba(226, 221, 213, 0.85) 0%, rgba(212, 181, 160, 0.85) 50%, rgba(167, 181, 160, 0.85) 100%);
  }
}

/* Nav link hover underline effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--terracotta);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Masonry layout */
.masonry {
  columns: 1;
  column-gap: 16px;
}

@media (min-width: 640px) {
  .masonry {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .masonry {
    columns: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
}

/* Gallery image hover */
.gallery-item {
  overflow: hidden;
  border-radius: 2px;
}

.gallery-item img {
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Lightbox */
#lightbox {
  display: none;
}

#lightbox.active {
  display: flex;
}

#lightbox-description {
  white-space: pre-line;
}

/* Hide scrollbar inside lightbox on mobile */
#lightbox-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#lightbox-scroll::-webkit-scrollbar {
  display: none;
}

/* Lightbox image — clicking opens fullscreen */
#lightbox-img {
  cursor: zoom-in;
  user-select: none;
}

/* Fullscreen viewer */
#fullscreen-viewer {
  display: none;
  cursor: zoom-out;
}

#fullscreen-viewer.active {
  display: flex;
  animation: fadeIn 0.15s ease;
}

#fullscreen-viewer img {
  cursor: zoom-in;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
}

#lightbox.active {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Press card hover */
.press-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.press-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(61, 50, 41, 0.1);
}

/* Mobile nav animation */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 300px;
  opacity: 1;
}

/* Placeholder image backgrounds */
.placeholder-img {
  background: linear-gradient(135deg, var(--neutral) 0%, var(--clay) 50%, var(--sage) 100%);
}

.placeholder-img-alt {
  background: linear-gradient(135deg, var(--sage) 0%, var(--neutral) 50%, var(--terracotta) 100%);
}

/* Hero overlay */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(240, 235, 227, 0.3) 0%,
    rgba(240, 235, 227, 0.7) 60%,
    rgba(240, 235, 227, 1) 100%
  );
}

/* Active nav link */
.nav-link-active::after {
  width: 100%;
}
