@font-face {
  font-family: 'NeueMontreal';
  src: url('../assets/fonts/NeueMontreal-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'GeistMono';
  src: url('../assets/fonts/GeistMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.snap-anchor {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  scroll-snap-align: start;
  pointer-events: none;
}

body {
  background: #290505;
  color: #fff;
  font-family: 'GeistMono', 'Courier New', monospace;
}

/* ── Scroll driver + sticky hero ─────────────────────── */

.scroll-driver {
  height: 460vh;
  position: relative;
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Home layout ─────────────────────────────────────── */

.home {
  display: grid;
  grid-template-columns: max-content clamp(280px, 38vw, 600px) max-content;
  grid-template-rows: 1fr auto 1fr;
  column-gap: clamp(24px, 3.5vw, 56px);
  padding: 32px 0;
  height: 100vh;
  justify-content: center;
}

/* ── Landing grid cells ──────────────────────────────── */

.home-top-l {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-bottom: 20px;
}

.home-top-r {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 20px;
}

/* ── Left column ─────────────────────────────────────── */

.clocks {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-align: right;
}

.clock-line {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
}

.home-name {
  grid-column: 1;
  grid-row: 2;
  font-family: 'NeueMontreal', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 2.6vw, 3.6rem);
  line-height: 1.05;
  text-align: right;
  white-space: nowrap;
  align-self: center;
}

.home-nav {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.42rem;
  padding-top: 20px;
  align-self: flex-start;
}

.home-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ── Center column: globe ────────────────────────────── */

.home-center {
  grid-column: 2;
  grid-row: 1 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-stack {
  position: relative;
  width: clamp(280px, 38vw, 600px);
  height: clamp(280px, 38vw, 600px);
  /* no overflow:hidden — hero clips instead, so images emerge from viewport bottom */
}

.media-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

/* bottom of layer sits flush with hero bottom → slides in immediately from viewport edge */
.media-layer[data-state="below"]  {
  transform: translateY(calc(50vh + clamp(140px, 19vw, 300px)));
}
.media-layer[data-state="active"] { transform: none; }
/* shrinks + exits upward */
.media-layer[data-state="above"]  {
  transform: translateY(calc(-50vh - clamp(140px, 19vw, 300px))) scale(0.82);
}

/* Globe fills its layer */
.media-layer .spline-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.media-layer .spline-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  zoom: 0.8;
}

.media-layer .spline-cover {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 52px;
  background: #290505;
  pointer-events: none;
  z-index: 10;
}

/* Project images */
.scroll-img {
  display: block;
  max-width: 86%;
  max-height: 86%;
  width: auto;
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow:
    0 0 8px 2px rgba(255, 255, 255, 0.22),
    0 0 28px 6px rgba(255, 255, 255, 0.1),
    0 0 70px 14px rgba(255, 255, 255, 0.05);
}

/* Darshn placeholder */
.work-placeholder {
  width: 80%;
  height: 60%;
  background: #3d0808;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow:
    0 0 8px 2px rgba(255, 255, 255, 0.22),
    0 0 28px 6px rgba(255, 255, 255, 0.1),
    0 0 70px 14px rgba(255, 255, 255, 0.05);
}

/* Older work 2×2 grid */
.older-center-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 88%;
  height: 88%;
}

.older-center-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow:
    0 0 6px 1px rgba(255, 255, 255, 0.2),
    0 0 18px 4px rgba(255, 255, 255, 0.09),
    0 0 40px 8px rgba(255, 255, 255, 0.04);
}

/* ── Right column ────────────────────────────────────── */

.home-social {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  align-items: flex-start;
}

.home-social a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.home-month {
  grid-column: 3;
  grid-row: 2;
  font-family: 'NeueMontreal', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 2.6vw, 3.6rem);
  line-height: 1.05;
  white-space: nowrap;
  align-self: center;
}

/* ── Project text (right column, JS-driven) ──────────── */

.home-projects {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-height: 110px;
}

.proj-link {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.proj-desc {
  display: block;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.older-work-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-top: 0.4rem;
}

.older-label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-bottom: 0.1rem;
}

.older-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}


/* ── Scroll-reveal ───────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}


/* ── Shared page header ──────────────────────────────── */

.page-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 1.5rem;
}

.return-home {
  position: absolute;
  left: 2rem;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.page-title {
  font-family: 'NeueMontreal', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.05;
  text-align: center;
}


/* ── About page ──────────────────────────────────────── */

.about-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 7rem 15rem 15rem;
}

.about-text {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.about-text p {
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.75;
  color: #fff;
}

.about-img-wrap {
  flex: 1;
}

.about-img {
  width: 625px;
  height: 500px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
}


/* ── Lens / Film+Photo page ──────────────────────────── */

.lens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem 3rem 4rem;
}

.lens-item {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lens-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow:
    0 0 8px 2px rgba(255, 255, 255, 0.22),
    0 0 28px 6px rgba(255, 255, 255, 0.1),
    0 0 70px 14px rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: opacity 0.18s;
}

.lens-item img:hover {
  opacity: 0.88;
}

.lens-meta {
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.lens-location {
  display: block;
}

.lens-specs {
  display: block;
}


/* ── Lightbox ────────────────────────────────────────── */

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
  z-index: 1000;
}

#lightbox.open {
  opacity: 1;
  pointer-events: all;
}

#lightbox #lbImg {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow:
    0 0 8px 2px rgba(255, 255, 255, 0.22),
    0 0 28px 6px rgba(255, 255, 255, 0.1),
    0 0 70px 14px rgba(255, 255, 255, 0.05);
}

#lbClose {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #fff;
  background: none;
  border: none;
  font-family: 'GeistMono', 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
}


/* ── Home: landing absolute positioning ───────────────── */

#home-landing {
  position: absolute;
  inset: 0;
}

/* Globe directly in home-center (no media-stack) */
.home-center .spline-wrap {
  position: relative;
  width: clamp(280px, 38vw, 600px);
  height: clamp(280px, 38vw, 600px);
  overflow: hidden;
}
.home-center .spline-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  zoom: 0.8;
}
.home-center .spline-cover {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 52px;
  background: #290505;
  pointer-events: none;
  z-index: 10;
}

/* Scroll CTA */
.scroll-cta {
  grid-column: 3;
  grid-row: 3;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding-top: 20px;
  align-self: flex-start;
}


/* ── Compact state (globe + name top-left) ────────────── */

.compact-left {
  position: absolute;
  top: 25vh;
  left: 25vw;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.compact-globe {
  height: clamp(1.4rem, 2vw, 2.4rem);
  width: clamp(1.4rem, 2vw, 2.4rem);
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.compact-name {
  font-family: 'NeueMontreal', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2vw, 2.4rem);
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

/* All text: top-right, right-aligned */
.compact-right {
  position: absolute;
  top: 25vh;
  left: 75vw;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.compact-month {
  font-family: 'NeueMontreal', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2vw, 2.4rem);
  line-height: 1.05;
}

.compact-return {
  background: none;
  border: none;
  color: #fff;
  font-family: 'GeistMono', 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  text-align: right;
  margin-top: 4px;
}

.compact-socials-bottom {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 0 4rem;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.compact-socials-bottom a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}


/* ── Project rail: horizontal card strip ──────────────── */

.project-rail {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.project-track {
  position: absolute;
  top: 56%;
  left: 0;
  display: flex;
  gap: 3rem;
  align-items: center;
  will-change: transform;
}

.proj-card {
  flex-shrink: 0;
  width: clamp(200px, 26vw, 380px);
  height: auto;
  max-height: clamp(220px, 28vh, 380px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  box-shadow:
    0 0 6px 1px rgba(255, 255, 255, 0.08),
    0 0 20px 4px rgba(255, 255, 255, 0.04),
    0 0 50px 10px rgba(255, 255, 255, 0.015);
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

/* Lotus is portrait — give it a narrower width so it shows fully at natural aspect ratio */
.proj-card--lotus {
  width: clamp(160px, 18vw, 250px);
  max-height: none;
}

/* dim siblings when one is focused */
.project-track.has-focus .proj-card:not(.proj-card--focused) {
  opacity: 0.3;
}

.proj-card--focused {
  transform: scale(1.05) !important;
  transition: transform 0.35s ease, opacity 0.3s ease !important;
}

.proj-card-img {
  width: 100%;
  height: auto;
  display: block;
}

.proj-card--older {
  background: #1a0303;
}

.proj-card--older .older-center-grid {
  width: 100%;
  height: 100%;
}

.proj-card--older .older-center-img {
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Description panel: slides in to the right when card clicked */
.proj-desc-panel {
  position: absolute;
  left: 74%;
  top: 42%;
  width: 20%;
  max-width: 260px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.proj-desc-panel .proj-desc {
  font-size: 0.85rem;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: #fff;
}


/* ── Page headers (about + lens): more breathing room ─── */

.page-header {
  padding: 5rem 2rem 2rem;
}


/* ── Lens / Film+Photo: masonry, no borders ───────────── */

.lens-masonry {
  column-count: 3;
  column-gap: 1.2rem;
  padding: 2rem 3rem 4rem;
}

.lens-masonry .lens-item {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  display: block; /* override old flex */
}

.lens-masonry .lens-item img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: opacity 0.18s;
}

.lens-masonry .lens-item img:hover {
  opacity: 0.85;
}

/* Hide meta by default; shown in lightbox */
.lens-masonry .lens-meta {
  display: none;
}


/* ── Lightbox: with meta below image ─────────────────── */

.lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#lightbox #lbImg {
  max-width: 88vw;
  max-height: 80vh;
}

.lb-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

#lb-location,
#lb-specs {
  display: block;
}


/* ── Hover underline animation (site-wide) ───────────── */

.home-nav a,
.home-social a,
.proj-link,
.older-link,
.compact-return,
.compact-socials-bottom a {
  position: relative;
}

.home-nav a::after,
.home-social a::after,
.return-home::after,
.proj-link::after,
.older-link::after,
#lbClose::after,
.compact-return::after,
.compact-socials-bottom a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #fff;
  opacity: 1;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.home-nav a:hover::after,
.home-social a:hover::after,
.return-home:hover::after,
.proj-link:hover::after,
.older-link:hover::after,
#lbClose:hover::after,
.compact-return:hover::after,
.compact-socials-bottom a:hover::after {
  transform: scaleX(1);
}
