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

html {
  overflow-x: hidden;
  --header-h: 96px;
  --bg: #FAFAFA;
}
html, body {
  width: 100%;
  background: var(--bg);
  color: #111111;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}
body { padding-top: var(--header-h); }

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

/* ---- Fixed header bar ---- */
#nav-root {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 90;
  background: var(--bg);
}

/* ---- Site brand ---- */
.site-brand {
  position: fixed;
  top: 32px;
  left: 24px;
  z-index: 100;
  font-family: "Josefin Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---- Hamburger ---- */
.hamburger {
  position: fixed;
  top: 32px;
  right: 24px;
  z-index: 100;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform .25s ease, opacity .25s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }
.nav-overlay ul { list-style: none; text-align: center; }
.nav-overlay li { margin: 1.2rem 0; }
.nav-overlay a {
  font-size: clamp(1.6rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 300;
  text-transform: uppercase;
  opacity: .8;
}
.nav-overlay a:hover, .nav-overlay a.is-current { opacity: 1; }

@media (min-width: 769px) {
  .hamburger { display: none; }
  .nav-overlay {
    position: fixed;
    inset: auto;
    top: 32px;
    right: 24px;
    left: auto;
    bottom: auto;
    background: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-overlay ul { display: flex; gap: 2rem; text-align: left; }
  .nav-overlay li { margin: 0; }
  .nav-overlay a {
    font-size: .9rem;
    letter-spacing: -0.02em;
    font-weight: 300;
    text-transform: uppercase;
    opacity: .7;
  }
}

/* ---- Hero ---- */
.hero {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  width: 100%;
  min-height: 55vh;
  max-height: 92vh;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem clamp(1rem, 6vw, 4rem);
}
.hero img {
  display: block;
  max-width: 100%;
  /* vh-based, not %, since .hero's height is auto (content-driven) and a
     percentage max-height would not resolve against it — this is what let
     portrait images render past 85vh and get cropped by .hero's overflow:hidden */
  max-height: calc(92vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
}
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: .8rem;
  letter-spacing: .1em;
  opacity: .7;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,6px); } }

/* ---- Grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px;
  padding: 4px;
}
.grid-centered {
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 16px 12.5%;
}
/* 2 per row, but each thumbnail stays the same size as the previous 6-column
   layout — columns are sized to that fixed width instead of stretching to 1fr. */
.grid-portraits {
  grid-template-columns: repeat(2, calc((75vw - 80px) / 6));
  justify-content: center;
}
.grid-3col {
  grid-template-columns: repeat(3, 1fr);
}
.street-section { position: relative; z-index: 1; background: var(--bg); }
.notes-label-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.notes-label {
  position: sticky;
  /* header-h + 16px so the stuck position clears the fixed nav bar instead of
     being hidden behind it (the old top:16px value stuck right under the
     header, which is why the label used to vanish on scroll). */
  top: calc(var(--header-h) + 16px);
  /* aligns the label's resting spot with the grid's first row (its top
     padding) before it locks in place. */
  margin-top: 16px;
  display: inline-block;
  margin-left: 6.25%;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .5;
  pointer-events: auto;
}
.grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.grid-item:hover img { transform: scale(1.04); }

.page-header {
  padding: 2rem 1.5rem 1rem;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 300;
}
.page-header-center { text-align: center; }

/* ---- Text pages (Bio, Contact) ---- */
.text-page {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 8rem;
  font-size: .95rem;
  line-height: 1.8;
  font-weight: 300;
}
.text-page p { margin: 0 0 1.4rem; }
.text-page h2 {
  margin: 4rem 0 1.2rem;
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.text-page a { border-bottom: 1px solid currentColor; }
.text-page-center { text-align: center; }

/* ---- Tab nav (Works, Still Life) ---- */
.works-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 0 1.5rem 2rem;
}
.works-tab {
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .5;
  padding-bottom: .4rem;
  border-bottom: 2px solid transparent;
}
.works-tab:hover { opacity: .8; }
.works-tab.is-active { opacity: 1; border-bottom-color: currentColor; }

/* ---- Works: project card (one shown per active tab) ---- */
.project-card {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2rem;
}
.project-card img {
  display: block;
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.project-card .project-card-label {
  margin-top: 1rem;
  font-size: .95rem;
  letter-spacing: -0.02em;
  font-weight: 300;
}

/* ---- Photo detail / full-photo scroll (one per screen) ---- */
.project-title {
  padding: 2rem 1.5rem 1rem;
  font-size: clamp(.7rem, 2vw, 1.1rem);
  letter-spacing: -0.02em;
  font-weight: 200;
  text-align: center;
}
.photo-scroll { display: flex; flex-direction: column; align-items: center; }
.photo-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 8vw, 6rem);
}
.photo-screen img {
  display: block;
  max-width: min(84vw, 1000px);
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Portrait-oriented photos are let grow past the viewport height instead of
   being capped at ~vh — they're allowed to be larger than one screen, and the
   user scrolls to see the rest, so width is the only real constraint. */
.photo-screen.is-portrait img {
  max-width: min(66vw, 770px);
  max-height: none;
}
.back-link {
  display: inline-block;
  margin: 0 1.5rem 1.5rem;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .6;
}
.back-link:hover { opacity: 1; }

/* ---- Short film ---- */
.video-wrap {
  position: relative;
  max-width: 50%;
  margin: 0 auto;
  padding-top: 28.125%;
  background: #111111;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 66vw;
  max-height: 66vh;
  object-fit: contain;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  z-index: 201;
}
.lightbox-close { top: 12px; right: 16px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

footer.site-footer {
  padding: 3rem 1.5rem 5rem;
  text-align: center;
  opacity: .5;
  font-size: .85rem;
}

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 2px; padding: 2px; }
  .page-header { padding: 5rem 1rem 1rem; }
  .grid-centered { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .hero {
    min-height: calc(100vh - var(--header-h));
    max-height: calc(100vh - var(--header-h));
    /* svh, not dvh: dvh changes as Safari's toolbar collapses mid-scroll,
       resizing the sticky hero and causing scroll jank. */
    min-height: calc(100svh - var(--header-h));
    max-height: calc(100svh - var(--header-h));
  }
}
