/* ═══════════════════════════════════════════
   NIKHIL MEHTA — PORTFOLIO
   Aesthetic: Dark Cinematic Editorial
═══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --black:    #000000;
  --dark:     #141414;
  --mid:      #2a2a2a;
  --dim:      #505050;
  --muted:    #808080;
  --light:    #c0c0c0;
  --white:    #ffffff;
  --accent:   #ffb92a;

  --font-display: 'Neue Montreal', sans-serif;
  --font-mono:    'Neue Montreal Mono', 'Neue Montreal', monospace;

  --nav-h: 80px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }

/* ── Film Grain ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: 0.035;
  z-index: 9999;
}

/* ═══════════════════════════════════════════
   SIZZLE REEL OVERLAY
═══════════════════════════════════════════ */
.sizzle-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sizzle-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.sizzle-ui {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  text-align: center;
}

.sizzle-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 10rem);
  letter-spacing: 0.25em;
  color: var(--white);
  opacity: 0;
  transform: translateY(20px);
  animation: sizzleFadeIn 1.2s 0.5s var(--ease-out) forwards;
  text-shadow: 0 0 80px rgba(0,0,0,0.8);
}

.sizzle-progress-wrap {
  width: min(320px, 80vw);
  height: 1px;
  background: rgba(255,255,255,0.2);
}
.sizzle-progress-bar {
  height: 1px;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

.sizzle-scroll-hint {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  animation: sizzleFadeIn 0.6s 1.8s ease forwards;
}

.sizzle-fade {
  position: absolute;
  inset: 0;
  background: var(--black);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 1s ease;
}
.sizzle-fade.fading { opacity: 1; }

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

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--nav-h);
  background: var(--black);
  border-bottom: 1px solid var(--mid);
  transition: border-color 0.4s;
}
.nav.scrolled {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 8px 0;
}
.nav-logo-img {
  height: 56px;
  width: 56px;
  object-fit: contain;
  mix-blend-mode: lighten;
  transition: opacity 0.2s;
}
.nav-logo:hover .nav-logo-img { opacity: 0.75; }

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}

.nav-link.active {
  color: var(--white);
}
.nav-link.active::after {
  width: 100%;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { width: 100%; }

.nav-replay {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  border: 1px solid var(--mid);
  padding: 8px 18px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-replay:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-in-out);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 1.2rem;
  color: var(--muted);
  transition: color 0.2s;
}
.mobile-close:hover { color: var(--white); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.mobile-nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 4rem);
  letter-spacing: 0.05em;
  color: var(--dim);
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--white); }

.mobile-footer {
  position: absolute;
  bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--dim);
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════ */
.main-content {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.main-content.visible { opacity: 1; }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  padding: 28px 48px 48px;
  margin-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mid);
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 4.5rem);
  letter-spacing: 0.18em;
  color: var(--white);
  display: flex;
  gap: 0.4em;
}
.hero-name-last { color: var(--accent); }

.hero-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Video Grid ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.vg-item {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: var(--dark);
  cursor: pointer;
  display: block;
}

.vg-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Thumbnail — visible by default */
.vg-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), opacity 0.4s ease;
  z-index: 1;
}

.vg-thumb--heart {
  object-position: center 30%;
}

.vg-thumb--unfinished {
  object-position: center 20%;
}

/* Video — hidden by default, fades in on hover */
.vg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.7s var(--ease-out);
  z-index: 2;
}

/* On hover: scale thumb slightly, fade video in over it */
.vg-item:hover .vg-thumb {
  transform: scale(1.06);
  opacity: 0;
}
.vg-item:hover .vg-video {
  opacity: 1;
  transform: scale(1.06);
  filter: brightness(1.1);
}

.vg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 3;
}
.vg-item:hover .vg-overlay {
  opacity: 1;
  transform: translateY(0);
}

.vg-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vg-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--white);
}

/* ── Reveal Animations ── */
.reveal, .reveal-delay {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay.in-view { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 40px 48px 48px;
  border-top: 1px solid var(--mid);
  margin-top: 48px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--white);
}

.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer-info {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.2s;
  align-self: flex-start;
}
.footer-info:hover { color: var(--white); }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .hero { padding: 20px 24px 28px; gap: 16px; }
  .hero-role { display: none; }

  .video-grid {
    display: flex;
    flex-direction: column;
    padding: 0 8px 8px;
    gap: 8px;
  }
  .vg-item {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .hero { padding: 16px 16px 24px; }
}