body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #222;
}

canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.8s ease forwards;

}
/* Top navigation */
.top-nav {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 45px;
  font-size: 18px;
  font-weight: 300;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  padding: 14px 40px;
  border-radius: 50px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.1);
  max-width: 90%;
  z-index: 1000;
}

.container {
  min-height: calc(100vh - 120px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container {
    margin-top: 80px;
  }
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1100px;
  width: 100%;
  justify-items: center;
}

.grid > div {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s ease forwards;
}

.grid > div:nth-child(2) {
  animation-delay: 0.15s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

h1 {
  font-size: 28px;
  font-weight: 300;
  margin: 0 0 20px 0;
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: #222;
}

h1 span {
  color: #444;
  font-weight: 400;
}

/* Grayscale links */
p a {
  color: #444;
  font-weight: 400;
  text-decoration: none;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(0,0,0,0.10) 40%
  );
  padding: 1px 1px;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease;
}

p a:hover {
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(0,0,0,0.18) 45%
  );
  color: #000;
}

/* Subtext */
.subtext {
  font-size: 14px;
  color: #777;
}

.subtext span {
  color: #555;
}

/* Grayscale button */
.btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 14px;
  border-radius: 999px;
  background: #333;
  color: #fff;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn:hover {
  background: #000;
}

/* Image box grayscale */
.image-box {
  width: 280px;
  height: 380px;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(135deg, #f2f2f2, #ffffff);
  box-shadow: 0 20px 45px rgba(0,0,0,0.20);
}

.image-box img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

/* Notion style grayscale */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --text-color: #333;
  --text-light: #777;
  --heading-weight: 300;
  --normal-weight: 300;
  --line-height: 1.6;
}

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  font-weight: var(--normal-weight);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  letter-spacing: -0.1px;
}


/* Work page */

.work-container {
  max-width: 1000px;
  margin: 120px auto 60px auto;
  padding: 0 20px;
}

.work-grid {
  display: block;
  max-width: 900px;
  margin: 0 auto;
}

.work-title {
  margin-bottom: 50px;
}

.past-work-title {
  margin-top: 80px;
  margin-bottom: 50px;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 800px;
}

.work-item h2 {
  margin: 0 0 10px 0;
  font-weight: 400;
  color: #222;
}

.highlight-red {
  color: #555;
}

.work-item p a {
  color: #555;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.25);
  padding-bottom: 1px;
  transition: 0.25s ease;
  background: none;
}

.work-item p a:hover {
  color: #000;
  border-bottom-color: rgba(0,0,0,0.45);
}

.work-item {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.6s ease forwards;
}

.work-item:nth-child(1) { animation-delay: 0.1s; }
.work-item:nth-child(2) { animation-delay: 0.2s; }
.work-item:nth-child(3) { animation-delay: 0.3s; }

/* Films */

.film-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;

  z-index: -1;
  filter: brightness(0.65) blur(1px);

  opacity: 0;
  animation: videoFadeIn 6s ease-in forwards;

}

/* Slow fade-in animation */
@keyframes videoFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.03);
  }
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
}
.films-container {
  max-width: 1100px;
  margin: 120px auto 60px auto;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.6s ease forwards;
}


.film-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {

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

@media (max-width: 600px) {
  .film-grid {
    grid-template-columns: 1fr;
  }
}

/* Full-width film section */
.film-section {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto 60px auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* Two-column grid of film cards */
.film-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

/* Film card with image + text side-by-side */
.film-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  transition: transform 0.25s ease;
   opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.6s ease forwards;
}

.film-card:nth-child(1), .film-card:nth-child(2) { animation-delay: 0.5s; }
.film-card:nth-child(3), .film-card:nth-child(4) { animation-delay: 1s; }
.film-card:nth-child(5), .film-card:nth-child(6) { animation-delay: 1.5s; }

.film-card:hover {
  transform: translateY(-4px);
}

/* Thumbnail */
.film-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.film-card:hover .film-thumb img {
  transform: scale(1.03);
  filter: brightness(0.95);
}

/* Info */
.film-info h3 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 10px;
  color: #222;
}

.film-info p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.film-info a {
  color: #444;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.3);
  font-size: 15px;
}

.film-info a:hover {
  color: #000;
  border-bottom-color: rgba(0,0,0,0.5);
}

.film-bg {
  position: fixed;
  inset: 0;
  background-image: url('https://f005.backblazeb2.com/file/rajatkosh/bg.jpg'); /* your bg */
  background-size: fit-cover;
  background-position: bottom;
  opacity: 0; /* starts invisible */
  transform: scale(1.1); /* slight zoom-out later */
  transition: opacity 0.25s linear, transform 0.25s linear;
  z-index: -2;
  pointer-events: none;
}

.film-fog {
  pointer-events: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60vh;

  background: linear-gradient(
    to top,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.03) 40%,
    rgba(255,255,255,0) 100%
  );

  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.3s linear, transform 0.3s linear;

  z-index: -1;
}

.film-vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;

  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,0.15) 95%
  );

  transition: opacity 0.3s linear;
}
/* Mobile: stack image + text */
@media (max-width: 900px) {
  .film-grid {
    grid-template-columns: 1fr;
  }

  .film-card {
    grid-template-columns: 1fr;
  }

  .film-thumb img {
    margin-bottom: 14px;
  }
}
/* Gallery page */

.gallery-container {
  max-width: 1100px;
  margin: 120px auto 60px auto;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.8s ease forwards;
}


.gallery-fullwidth {
  width: 100%;
  position: relative;
  padding: 40px 20px;
  background: transparent;
  box-sizing: border-box;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.8s ease forwards;
}
.gallery-grid {
  max-width: 1600px;
  margin: 0 auto;
  column-count: 4;
  column-gap: 28px;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.8s ease forwards;
}

/* responsive column counts */
@media (max-width: 1400px) {
  .gallery-grid { column-count: 3; }
}
@media (max-width: 900px) {
  .gallery-grid { column-count: 2; }
}

@media (max-width: 600px) {
  .gallery-grid {
    column-count: 3;     /* three tiny columns */
    column-gap: 12px;    /* tighter spacing */
    padding: 0 10px;     /* small side padding */
  }

  .gallery-item {
    margin-bottom: 12px;
    border-radius: 10px; /* slightly smaller radius */
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
  }

  .gallery-item img {
    border-radius: 10px;
  }
}
/* Masonry items */
.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: 14px;
  overflow: hidden;
  background: #f2f2f2;
  box-shadow: 0 18px 45px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-6px) scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

/* subtle portrait variation classes (if you keep them) */
.portrait-short img { aspect-ratio: 2 / 3; }
.portrait-mid img   { aspect-ratio: 3 / 4; }
.portrait-tall img  { aspect-ratio: 4 / 5; }

/* Fade masks (fixed overlays) — same as before, but ensure pointer-events none */
.gallery-fade-left,
.gallery-fade-right {
  position: fixed;
  top: 0;
  height: 100vh;
  width: 40px;
  pointer-events: none;
  z-index: 5;
}

/* left */
.gallery-fade-left {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.85) 40%,
    rgba(255,255,255,0) 100%
  );
}

/* right */
.gallery-fade-right {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.85) 40%,
    rgba(255,255,255,0) 100%
  );
}

/* responsive tweaks for masks */
@media (max-width: 900px) {
  .gallery-fade-left, .gallery-fade-right { width: 20px; }
}
@media (max-width: 600px) {
  .gallery-fade-left, .gallery-fade-right { display: none; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(6px);
}



.lightbox.open {
  display: flex;
}

.lightbox img {
  width: auto;
  max-width: 90%;
  max-height: 90svh; /* <<< KEY FIX */
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  filter: brightness(0.98) contrast(1.05);
}

@media (max-width: 600px) {
  .lightbox img {
    max-height: 85svh;
    max-width: 95%;
  }
}

body.lightbox-open {
  overflow: hidden;
}

/* Navigation arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 18px 18px;
  font-size: 32px;
  color: white;
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 5%;
  cursor: pointer;
  z-index: 2100;
  transition: background 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0,0,0,0.6);
}

/* Position */
.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 26px;
    padding: 14px 14px;
    background: rgba(0,0,0,0.45);
  }
}
/* Background removal for consistency */
.gallery-body {
  background: #ffffff;
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-title h1 {
    font-size: 30px;
  }
}

@media (max-width: 600px) {
  .gallery-item.large {
    grid-column: span 1;
    grid-row: span 1;
  }
}


@media (min-width: 1200px) {
  body {
    font-size: 20px;
  }

  h1 {
    font-size: 42px;
  }

  p {
    font-size: 22px;
    line-height: 1.75;
  }

  .subtext {
    font-size: 18px;
  }

  .image-box {
    width: 340px;
    height: 470px;
  }

  .container {
    padding: 80px;
  }

  .grid {
    gap: 60px;
    max-width: 1200px;
  }
}
