/* ============================================================
   Photographer Portfolio – Shared Stylesheet
   ============================================================ */

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

:root {
  --accent:    #111111;
  --muted:     #888888;
  --border:    #e8e8e8;
  --nav-h:     64px;
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: #ffffff;
  color: var(--accent);
  min-height: 100vh;
}

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

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

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

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

/* ── Section dropdowns (pure CSS hover) ─────────────────────── */

.has-dropdown {
  position: relative;
}

/* Section title (and Contact) — single shared class so every top-level
   nav item has an identical box model and stays perfectly aligned. */
.nav-section-title {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-section-title:hover,
.has-dropdown:hover .nav-section-title,
.nav-section-title.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Brand: photographer name (2 lines) + Instagram icon, on the right ── */

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-logo {
  position: relative;
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  line-height: 1.4;
  white-space: nowrap;
}

.nav-logo-name {
  display: block;
  transition: opacity 0.2s ease;
}

/* Email overlay — hidden until the name is hovered */
.nav-logo-email {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.nav-logo:hover .nav-logo-name {
  opacity: 0;
}

.nav-logo:hover .nav-logo-email {
  opacity: 1;
}

/* Dropdown panel */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  list-style: none;
  padding: 0.4rem 0;
  min-width: 130px;
  z-index: 200;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.has-dropdown:hover .nav-dropdown {
  display: block;
}

.nav-dropdown li a {
  display: block;
  padding: 0.45rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  border-bottom: none;
}

.nav-dropdown li a:hover,
.nav-dropdown li a.active {
  color: var(--accent);
  background: #fafafa;
  border-bottom: none;
}

/* ============================================================
   GALLERY CARDS (index page)
   ============================================================ */

.gallery-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  margin: 0;
}

@media (max-width: 1100px) {
  .gallery-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-card {
  display: block;
  overflow: hidden;
  position: relative;
}

.gallery-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s;
}

.gallery-card:hover .gallery-card-img {
  transform: scale(1.04);
  opacity: 0.85;
}

/* Gallery name overlay — visible only on hover, centered */
.gallery-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

/* ============================================================
   PAGE HEADER (gallery & contact pages)
   ============================================================ */

.page-header {
  padding: 4rem 2rem 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 2rem 6rem;
}

.bio-section,
.contact-links-section {
  margin-bottom: 3.5rem;
}

.bio-section h2,
.contact-links-section h2 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.bio-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: #444;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-links li {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.contact-link-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 80px;
  flex-shrink: 0;
}

.contact-link-value {
  font-size: 1rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s;
}

.contact-link-value:hover {
  text-decoration-color: var(--accent);
}

/* Instagram icon in nav */
.nav-instagram {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
  flex-shrink: 0;
}

.nav-instagram:hover {
  color: var(--accent);
}

.nav-instagram svg {
  display: block;
}

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

@media (max-width: 700px) {
  nav {
    padding: 0 1rem;
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    width: 100%;
    order: 2;
    margin-top: 0.6rem;
  }

  .gallery-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-wrap {
    padding: 0.5rem 1rem 4rem;
  }

  .viewer-title {
    top: auto;
    bottom: 148px; /* stacked above the nav arrows + filmstrip */
    left: 1rem;
    max-width: calc(100vw - 2rem);
    background: rgba(255, 255, 255, 0.94);
    padding: 0.5rem 0.75rem;
  }

  .viewer-title h1 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  .viewer-desc {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .gallery-nav-arrow {
    top: auto;
    bottom: 92px; /* just above the filmstrip; nav wraps taller on mobile */
  }

  .gallery-nav-prev { right: 3rem; }
  .gallery-nav-next { right: 1rem; }

  .filmstrip {
    height: 68px;
    padding: 4px 6px;
  }

  .filmstrip a {
    height: 52px;
    width: 72px;
  }
}

@media (max-width: 400px) {
  .gallery-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   VIEWER PAGE (full-size scroll view)
   ============================================================ */

body.viewer-body {
  background: #ffffff;
  color: #111;
  padding-bottom: 80px; /* room for filmstrip */
}

/* Light nav on viewer (matches rest of site) */
body.viewer-body nav {
  background: #fff;
  border-bottom-color: var(--border);
}

/* ── Gallery title + description ─────────────────────────────
   Fixed on the left, below the nav, so it stays visible while
   scrolling through the photos. ───────────────────────────── */

.viewer-title {
  position: fixed;
  top: calc(var(--nav-h) + 1.5rem);
  left: 2rem;
  z-index: 30;
  max-width: 230px;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.2rem 0;
}

.viewer-title h1 {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.viewer-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.viewer-desc-placeholder {
  font-style: italic;
  opacity: 0.6;
}

/* ── Prev / Next gallery navigation arrows ───────────────── */
/* Fixed top-right, just below the photographer name in the nav. */

.gallery-nav-arrow {
  position: fixed;
  top: calc(var(--nav-h) + 1.5rem); /* vertically aligned with .viewer-title */
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s;
}

.gallery-nav-arrow:hover {
  color: #555;
}

.gallery-nav-prev { right: 3.4rem; }
.gallery-nav-next { right: 1.5rem; }

.gallery-nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* Gallery name — hidden by default, revealed only on hover */
.gallery-nav-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-nav-arrow:hover .gallery-nav-label {
  opacity: 0.8;
}

/* Each slide = one full-viewport photo */
.viewer-slide {
  min-height: calc(100vh - var(--nav-h) - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem;
}

.viewer-slide img {
  max-width: 100%;
  max-height: calc(100vh - var(--nav-h) - 80px - 4rem);
  object-fit: contain;
  display: block;
}

/* ── Filmstrip ───────────────────────────────────────────── */

.filmstrip {
  position: fixed;
  bottom: 0;
  top: auto; /* override nav { top: 0 } */
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(240, 240, 240, 0.96);
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 6px 8px;
  overflow-x: auto;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.filmstrip::-webkit-scrollbar { height: 3px; }
.filmstrip::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 2px;
}

.filmstrip a {
  flex-shrink: 0;
  display: block;
  height: 62px;
  width: 94px;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.2s;
  outline: 1px solid transparent;
  outline-offset: 1px;
}

.filmstrip a:hover {
  opacity: 1;
  outline-color: rgba(0, 0, 0, 0.4);
}

.filmstrip a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

