/* ============================================================
   Jennifer Koper Design — Shared Styles
   ============================================================ */

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

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

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

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

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

/* --- Site Wrapper ----------------------------------------- */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: site-fade-in 0.35s ease both;
}

@keyframes site-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Header ----------------------------------------------- */
header {
  padding: 32px 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.logo-link img {
  height: 60px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

nav ul li a {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #555;
  transition: color 0.2s;
}

nav ul li a:hover,
nav ul li.active a {
  color: #000;
}

/* --- Main Content ----------------------------------------- */
main {
  flex: 1;
  padding: 40px 60px 60px;
}

/* --- Portfolio Grid --------------------------------------- */
.portfolio-grid {
  columns: 3 280px;
  column-gap: 12px;
}

.portfolio-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #f0f0f0;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.03);
  filter: brightness(0.88);
}

.portfolio-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 10px 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-item:hover .portfolio-caption {
  opacity: 1;
  transform: translateY(0);
}

/* --- Lightbox --------------------------------------------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 600px;
}

.lightbox-close {
  position: fixed;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 12px 16px;
  opacity: 0.5;
  transition: opacity 0.2s;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

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

/* --- Nav Toggle (Hamburger) ------------------------------- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  top: 22px;
  right: 20px;
  z-index: 10;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #333;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Footer ----------------------------------------------- */
footer {
  padding: 24px 60px;
  text-align: center;
  border-top: 1px solid #eee;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-social a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #000;
}

.footer-copy {
  font-size: 0.68rem;
  color: #bbb;
  letter-spacing: 0.04em;
}

/* --- Personal voice intro --------------------------------- */
/*
   Used on Videos, Services, and Contact pages for first-person
   intro copy. Serif italic distinguishes her voice from the
   functional sans-serif content.
*/
.page-voice {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 2;
  color: #777;
  text-align: center;
  max-width: 860px;
  margin: 0 auto 56px;
  letter-spacing: 0.01em;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  header {
    padding: 20px 24px 0;
    position: relative;
  }

  .nav-toggle {
    display: block;
  }

  nav {
    width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
  }

  nav.open {
    max-height: 320px;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 14px 0 20px;
    border-top: 1px solid #eee;
    margin-top: 16px;
  }

  nav ul li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.75rem;
  }

  main {
    padding: 0 12px 40px;
  }

  .portfolio-grid {
    columns: 2 160px;
    column-gap: 8px;
  }

  .portfolio-item {
    margin-bottom: 8px;
  }

  footer {
    padding: 20px 24px;
  }
}

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

/* Captions are hidden on mobile/touch — they appear in the lightbox when an image is viewed */
@media (hover: none), (max-width: 768px) {
  .portfolio-caption {
    display: none !important;
  }
}
