@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400&display=swap');

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: #000;
  color: #fff;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* Prevent double-tap zoom on interactive elements (preserves pinch-to-zoom for accessibility) */
a, button, .image-row-wrapper {
  touch-action: manipulation;
}

/* === Hero section – single full-width dominant image === */
.hero-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

/* Individual hero cells */
.hero-item {
  position: relative;
  overflow: hidden;
}

.hero-item--main {
  position: absolute;
  inset: 0;
}

/* Right-column images hidden at all screen sizes per design */
.hero-item--top-right,
.hero-item--bot-right {
  display: none;
}

/* Each hero image: oversized for parallax room */
.hero-img {
  position: absolute;
  top: -12%;
  left: 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
  object-position: center top;
  will-change: transform;
  display: block;
}

/* Subtle dark gradient at top + bottom of each hero cell */
.hero-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.28) 0%,
    transparent 28%,
    transparent 72%,
    rgba(0,0,0,0.38) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Zoom out right-column hero images so full image is visible instead of cropping into faces */
/* (kept for safety; right-column items are hidden via display:none) */
.hero-item--top-right .hero-img,
.hero-item--bot-right .hero-img {
  object-fit: cover;
  object-position: center center;
}

/* Wrapper for hero group: hero image + Tycho image, with layered button at junction */
.hero-tycho-group {
  position: relative;
}

/* Full-width text block pinned to the bottom of the hero section */
.hero-text-block {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

/* Title / subtitle – no background, sits cleanly above the bio bar */
.hero-titles {
  width: 100%;
  max-width: 900px;
  text-align: center;
  padding: 0 20px 12px;
  box-sizing: border-box;
  pointer-events: auto;
}

/* Solid black bio bar – full-width, pinned to very bottom of hero image */
.hero-bio-bar {
  width: 100%;
  background-color: #000;
  text-align: center;
  padding: 14px 20px;
  box-sizing: border-box;
  pointer-events: auto;
}

/* Editorial / Film button – full-width bar layered at the junction of hero image
   and Tycho image.  top: 100vh aligns with the hero section's explicit height;
   transform: translateY(-50%) centres it exactly at that seam. */
.editorial-film-btn {
  position: absolute;
  top: 100vh;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  display: block;
  text-align: center;
  box-sizing: border-box;
  color: rgba(255,255,255,0.7);
  background-color: #000;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 22px 0;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.editorial-film-btn:hover {
  color: #fff;
  background-color: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.3);
}

/* === Bio parallax image section === */
.bio-parallax-section {
  position: relative;
  height: 80vh;
  overflow: hidden;
  margin: 0;
}

/* Subtle top + bottom gradient overlay on parallax images for consistent depth */
.bio-parallax-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    transparent 22%,
    transparent 78%,
    rgba(0,0,0,0.3) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.bio-parallax-section .parallax-image {
  position: absolute;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center center;
  will-change: transform;
  display: block;
}

/* Tycho image: keep face centered; top:-15% / height:130% oversizes the image to
   provide bleed room for the JS parallax translateY transform. */
#bio-parallax .tycho-parallax-img {
  position: absolute;
  top: -15%;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  display: block;
}

/* Tycho section height override */
#bio-parallax {
  height: 60vh;
}

/* BSHP / Faye parallax section: show full image without cropping */
.bshp-parallax-section {
  display: block;
  height: auto;
  overflow: visible;
}

.bshp-parallax-section .parallax-image {
  object-fit: cover;
  object-position: center top;
  background-color: #000;
  top: -15%;
  height: 130%;
}

/* Ball-pit image: full natural dimensions, no parallax cropping */
.bshp-image {
  position: relative;
  top: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
  display: block;
  background-color: #000;
}

/* Fade top edge of Faye section to soften the transition from the text barrier */
.bshp-parallax-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* === Full-width vertical image stack === */
.image-stack {
  display: block;
  width: 100%;
}

.image-stack img {
  width: 100%;
  height: auto;
  display: block;
}

/* === Feature full-height image sections (after bio-parallax) === */
.feature-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.feature-img {
  position: absolute;
  top: -12%;
  left: 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  display: block;
}

main.portfolio {
  padding: 3rem 2.5rem 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Headings */
h1 {
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 2rem;  /* reduced size for sleeker look */
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Subtitle under main name */
h1.subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  margin-top: 1rem;
  margin-bottom: 1.2rem;
}

h2, .project-title {
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: rgba(255,255,255,0.5);
}

.subtitle {
  font-size: 1.1rem;
  text-align: center;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.bio {
  text-align: center;
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  max-width: 800px;
  width: 100%;
  margin: 0;
  line-height: 1.85;
  padding: 0 1rem 2rem;
  box-sizing: border-box;
}

.contact-footer {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 3rem;
}

/* === Homepage work-type navigation === */
.work-nav {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 5rem;
  padding: 6rem 2rem 7rem;
}

.work-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 200;
  font-size: 2.4rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 0.4rem;
  transition: color 0.3s ease;
}

/* Animated underline */
.work-nav-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: rgba(255,255,255,0.85);
  transition: width 0.35s ease-in-out;
}

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

/* Arrow indicator */
.nav-arrow {
  display: inline-block;
  font-size: 1.8rem;
  font-weight: 100;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.work-nav-btn:hover .nav-arrow {
  opacity: 0.85;
  transform: translateX(0);
}

/* === Sub-page top navigation === */
.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.back-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #fff;
}

.page-nav-title {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* === Page fade-in === */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  animation: pageFadeIn 0.4s ease both;
}

.contact {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
}
.contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.4);
}

.project {
  margin-bottom: 5rem;
}

/* === Carousel layout === */
.image-row-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.image-row {
  display: flex;
  gap: 8px;
  padding: 0 40px;
  overflow-x: auto;
  scroll-behavior: smooth;
  /* Hide scrollbars */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.image-row::-webkit-scrollbar {
  display: none;
}

.image-row img,
.image-row video {
  height: 400px;
  width: auto;
  flex-shrink: 0;
  border-radius: 3px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
  cursor: zoom-in;
}
.image-row img:hover {
  transform: scale(1.015);
  opacity: 0.88;
}

/* Navigation arrows – minimal pill buttons */
.image-nav {
  color: transparent;
  background: rgba(0,0,0,0.55);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0;
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  z-index: 10;
  padding: 0;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-row-wrapper:hover .image-nav {
  opacity: 0.8;
}
.image-nav::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid rgba(255,255,255,0.95);
  border-right: 1.5px solid rgba(255,255,255,0.95);
  flex-shrink: 0;
}
.image-nav.left  { left: 8px; }
.image-nav.right { right: 8px; }
.image-nav.left::before  { transform: rotate(-135deg) translate(2px, -2px); }
.image-nav.right::before { transform: rotate(45deg)   translate(-2px, 2px); }
.image-nav:hover {
  opacity: 1 !important;
  background: rgba(0,0,0,0.8);
  border-color: rgba(255,255,255,0.45);
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox img,
.lightbox video {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 4px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 1.6rem;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  font-size: 2rem;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 1000;
  transition: background 0.2s ease, color 0.2s ease;
}
.lightbox-nav:hover { background: rgba(0,0,0,0.7); color: #fff; }
.lightbox-nav.left { left: 20px; }
.lightbox-nav.right { right: 20px; }

/* Scroll snap for smoother carousel */
.image-row { scroll-snap-type: x mandatory; }
.image-row img, .image-row video { scroll-snap-align: start; }

/* === Site header (index page) === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 2.5rem;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
  pointer-events: none;
}
.site-header a,
.site-header span {
  pointer-events: auto;
}
.site-header.scrolled {
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.1rem 2.5rem;
}
.site-header-logo {
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-header-logo:hover { color: #fff; }
.site-header-nav {
  display: flex;
  gap: 2.4rem;
}
.site-header-nav a {
  position: relative;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s ease;
  padding-bottom: 3px;
}
.site-header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255,255,255,0.7);
  transition: width 0.3s ease;
}
.site-header-nav a:hover { color: rgba(255,255,255,0.95); }
.site-header-nav a:hover::after { width: 100%; }

/* === Premium full-width section bar links (Commercial button) === */
.section-bar {
  width: 100%;
  background-color: #000;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.section-bar a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  font-weight: 300;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.section-bar a:hover {
  color: #fff;
}

/* === Ballpit image wrapper with overlay button === */
.image-wrapper {
  position: relative;
}

.overlay-button {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.overlay-button a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 2px;
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  text-transform: uppercase;
}

/* === Scroll-reveal animation === */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
  /* Hero section is already single-column; ensure main image fills the viewport */
  .hero-item--main {
    position: absolute;
    inset: 0;
  }
  .image-row {
    gap: 6px;
    padding: 0 32px;
  }
  .image-row img,
  .image-row video {
    height: 260px;
  }
  .image-row-wrapper:hover .image-nav,
  .image-nav {
    opacity: 0.75;
  }
  h1 { font-size: 1.5rem; }
  h1.subtitle { font-size: 0.85rem; }
  .hero-titles {
    padding: 0 1.2rem 10px;
  }
  .editorial-film-btn {
    font-size: 0.68rem;
    padding: 18px 0;
    letter-spacing: 0.2em;
  }
  #bio-parallax {
    height: 45vh;
  }
  .bio-parallax-section {
    height: 55vh;
  }
  /* Tycho image: face is on the left – crop right side to keep it in frame */
  #bio-parallax .tycho-parallax-img {
    object-position: left center;
  }
  .feature-section {
    height: 90vh;
  }
  .work-nav {
    flex-direction: column;
    align-items: center;
    gap: 2.2rem;
    padding: 3.5rem 1.2rem 4.5rem;
  }
  .work-nav-btn {
    font-size: 1.7rem;
    letter-spacing: 0.14em;
  }
  .nav-arrow {
    font-size: 1.4rem;
  }
  .page-nav {
    padding: 1rem 1.2rem;
  }
  .site-header {
    padding: 1rem 1.2rem;
  }
  .site-header.scrolled {
    padding: 0.8rem 1.2rem;
  }
  .site-header-nav {
    gap: 1.6rem;
  }
  main.portfolio {
    padding: 2rem 1.2rem 3rem;
  }
  .project {
    margin-bottom: 3.5rem;
  }
}

/* === Landscape-oriented mobile: confirm single-column hero === */
@media (orientation: landscape) and (max-height: 600px) {
  .hero-section {
    height: 100vh;
  }
  .hero-item--main {
    position: absolute;
    inset: 0;
  }
}