/* ============================================================
   JAVIER OCHOA — PORTFOLIO
   Dark editorial. Black base + cream text.
   ============================================================ */

:root {
  --black:   #0d0d0d;
  --white:   #f4f1ec;
  --red:     #f4f1ec;
  --dim:     rgba(244, 241, 236, 0.50);
  --border:  rgba(244, 241, 236, 0.09);
  --dark:    #161616;
  --serif:   'Playfair Display', Georgia, serif;
  --sans:    'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:   64px;
  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  animation: pageIn 0.55s var(--ease) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

img    { display: block; max-width: 100%; }
a      { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }


/* ============================================================
   SCROLL PROGRESS
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--red);
  width: 0%;
  z-index: 200;
  pointer-events: none;
  transition: width 0.08s linear;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(13, 13, 13, 0.92);
  border-color: var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.65; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--red);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover        { opacity: 1; }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active        { opacity: 1; }


/* ============================================================
   HOME — VIDEO REEL (vertical snap, TikTok-style)
   ============================================================ */

.reel-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reel-container::-webkit-scrollbar { display: none; }

.reel-section {
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
  background: #0f0f0f;
  flex-shrink: 0;
}

.reel-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.reel-video-wrap iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  display: block;
}

.reel-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right,  rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.05) 55%),
    linear-gradient(to bottom, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0)    30%,
                               rgba(0,0,0,0)   65%, rgba(0,0,0,0.65) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 60px;
}

.reel-hero-text { max-width: 680px; }

.hero-eyebrow {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 30px; height: 1px;
  background: var(--red);
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(4rem, 10.5vw, 9.5rem);
  font-weight: 900;
  line-height: 0.875;
  letter-spacing: -0.028em;
  color: var(--white);
  margin-bottom: 28px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}
.hero-line {
  flex-shrink: 0;
  width: 44px; height: 1px;
  background: rgba(244, 241, 236, 0.45);
}
.hero-title {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.8);
}

.hero-location {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.35);
  margin-left: 62px;
}

.reel-film-info {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.film-index {
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1px rgba(244, 241, 236, 0.2);
  color: transparent;
  user-select: none;
}

.film-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 10px;
}
.film-name {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.film-genre {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

.scroll-hint {
  position: absolute;
  bottom: 44px; right: 52px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.45;
}
.scroll-hint-text {
  font-size: 0.52rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-hint-line {
  width: 1px; height: 52px;
  background: linear-gradient(to bottom, var(--white), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 0; }
  45%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  55%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}


/* ============================================================
   HOME — BIO SECTION
   ============================================================ */

.bio-section {
  padding: 128px 60px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 100px;
  max-width: 1440px;
  margin: 0 auto;
}

.bio-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bio-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--dark);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.bio-photo::before {
  content: 'PHOTO';
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: rgba(244, 241, 236, 0.18);
  position: absolute;
}

.bio-photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.bio-id { display: flex; flex-direction: column; gap: 4px; }
.bio-id-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
}
.bio-id-place {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.bio-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
  padding: 32px 0;
}

.section-tag {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.35);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 22px; height: 1px;
  background: var(--red);
}

.bio-heading {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.018em;
}
.bio-heading em { font-style: italic; color: var(--red); }

.bio-body {
  font-size: 1.05rem;
  line-height: 1.88;
  color: var(--dim);
  max-width: 560px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--red);
  width: fit-content;
  transition: color 0.2s, gap 0.25s var(--ease);
}
.text-link::after { content: '→'; }
.text-link:hover  { color: var(--red); gap: 16px; }


/* ============================================================
   HOME — CONTACT SECTION
   ============================================================ */

.divider {
  height: 1px;
  background: var(--border);
  margin: 0 60px;
}

.contact-section {
  padding: 128px 60px;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
}

.contact-heading {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7.5vw, 7rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.contact-heading .outline {
  display: block;
  -webkit-text-stroke: 1.5px var(--white);
  color: transparent;
}
.contact-heading .fill { display: block; color: var(--white); }

.contact-list { display: flex; flex-direction: column; gap: 44px; }

.contact-row { display: flex; flex-direction: column; gap: 7px; }
.contact-lbl {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.3);
}
.contact-val {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  transition: color 0.2s;
}
.contact-val:hover { color: var(--red); }

.contact-social { display: flex; gap: 48px; }


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  padding: 28px 60px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(244, 241, 236, 0.25);
}
.footer-sig {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(244, 241, 236, 0.2);
  letter-spacing: 0.04em;
}


/* ============================================================
   WORK PAGE — HEADER
   ============================================================ */

.work-page-header {
  padding-top: var(--nav-h);
  border-bottom: 1px solid var(--border);
}

.work-title-wrap {
  padding: 56px 60px 0;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}

.work-big-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.045em;
  -webkit-text-stroke: 1.5px rgba(244, 241, 236, 0.8);
  color: transparent;
}

.work-subtitle {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--dim);
  margin-top: 12px;
}
.work-big-title .w-fill {
  color: var(--white);
  -webkit-text-stroke: 0;
}

.work-meta-block {
  text-align: right;
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.work-meta-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
}
.work-meta-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.3);
}


/* ============================================================
   WORK PAGE — GRID
   ============================================================ */

.work-grid {
  padding: 72px 60px 120px;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 36px 24px;
}

.vcard:nth-child(1) { grid-column: span 7; }
.vcard:nth-child(2) { grid-column: span 5; }
.vcard:nth-child(3) { grid-column: span 4; }
.vcard:nth-child(4) { grid-column: span 4; }
.vcard:nth-child(5) { grid-column: span 4; }

.vcard {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.vcard-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--dark);
  margin-bottom: 18px;
}
.vcard:nth-child(2) .vcard-thumb { aspect-ratio: 4/3; }
.vcard:nth-child(5) .vcard-thumb { aspect-ratio: 1/1; }

.vcard-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s var(--ease);
}
.vcard:hover .vcard-thumb img { transform: scale(1.045); }

.vcard-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.vcard:hover .vcard-overlay { background: rgba(244, 241, 236, 0.08); }

.play-btn {
  width: 58px; height: 58px;
  border: 1.5px solid rgba(244, 241, 236, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.vcard:hover .play-btn { opacity: 1; transform: scale(1); }
.play-btn svg { margin-left: 4px; }

.vcard-num {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 7px;
}

.vcard-title {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.7vw, 1.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 9px;
  transition: color 0.2s;
}
.vcard:hover .vcard-title { color: var(--red); }

.vcard-meta {
  display: flex;
  gap: 14px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.3);
  margin-bottom: 12px;
}
.vcard-meta .type { color: rgba(244, 241, 236, 0.48); }

.vcard-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(244, 241, 236, 0.42);
}


/* ============================================================
   VIDEO MODAL
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s;
}
.modal.open { opacity: 1; visibility: visible; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  cursor: pointer;
}

.modal-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1080px, calc((100vh - 160px) * 16 / 9));
  transform: translateY(20px);
  transition: transform 0.38s var(--ease);
}
.modal.open .modal-inner { transform: translateY(0); }

.modal-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 10px 22px;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}
.modal-close:hover { opacity: 1; border-color: var(--red); color: var(--red); }

.modal-video {
  position: relative;
  aspect-ratio: 16/9;
  background: #111;
}
.modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.modal-caption {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.modal-cap-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}
.modal-cap-meta {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  white-space: nowrap;
}


/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .nav { padding: 0 32px; }

  .reel-overlay { padding: 40px 36px; }
  .scroll-hint  { right: 32px; bottom: 32px; }

  .bio-section {
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 80px 36px;
  }
  .bio-left {
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
  }
  .bio-photo { width: 150px; aspect-ratio: 1/1; }

  .divider { margin: 0 36px; }

  .contact-section {
    grid-template-columns: 1fr;
    padding: 80px 36px;
    gap: 52px;
  }
  .footer { padding: 24px 36px; }

  .work-title-wrap { padding: 40px 36px 0; }
  .work-grid {
    padding: 52px 36px 80px;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
  .vcard:nth-child(n) { grid-column: span 1; }
  .vcard:nth-child(1) { grid-column: span 2; }
  .vcard:nth-child(1) .vcard-thumb { aspect-ratio: 16/7; }
  .vcard:nth-child(2) .vcard-thumb { aspect-ratio: 16/9; }
  .vcard:nth-child(5) .vcard-thumb { aspect-ratio: 16/9; }
}

@media (max-width: 640px) {
  .nav { padding: 0 20px; }
  .nav-logo { font-size: 0.9rem; }
  .nav-links { gap: 22px; }

  .reel-overlay { padding: 32px 24px; }
  .hero-name    { font-size: 3rem; }
  .scroll-hint  { display: none; }

  .bio-section {
    padding: 64px 24px;
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .bio-left { flex-direction: column; }
  .bio-photo { width: 140px; aspect-ratio: 3/4; }

  .divider { margin: 0 24px; }

  .contact-section { padding: 64px 24px; }
  .contact-social  { gap: 28px; }

  .footer {
    padding: 20px 24px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .work-title-wrap {
    padding: 24px 24px 0;
    grid-template-columns: 1fr;
  }
  .work-meta-block { display: none; }
  .work-grid {
    padding: 36px 24px 64px;
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .vcard:nth-child(n) { grid-column: span 1; }
  .vcard:nth-child(1) .vcard-thumb { aspect-ratio: 16/9; }

  .modal { padding: 16px; }
  .modal-caption { flex-direction: column; gap: 6px; }
}
