/* ===================================================================
   Caleb Kim — portfolio remake
   Dark neo-grotesque theme, faithful to the original Cargo build.
   =================================================================== */

:root {
  --bg: #1e1e1e;
  --swatch-1: rgba(255, 255, 255, 0.85);
  --swatch-2: rgba(255, 255, 255, 0.75);
  --swatch-3: rgba(255, 255, 255, 0.60);
  --swatch-4: rgba(255, 255, 255, 0.40);
  --swatch-5: rgba(255, 255, 255, 0.25);

  /* Diatype ≈ Archivo (grotesque) ; Diatype Condensed ≈ Archivo Narrow */
  --font-display: "Archivo", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo Narrow", "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--swatch-1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

hr {
  background: var(--swatch-2);
  border: 0;
  height: 1px;
  margin: 1.6rem 0;
}

/* ===================== HERO ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* Full-bleed video that covers the viewport regardless of aspect ratio */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Inlined blurred first frame of the showreel: paints immediately,
     before poster.jpg / the video itself arrive over the network */
  background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD//gAQTGF2YzYyLjI4LjEwMgD/2wBDAAgUFBcUFxsbGxsbGyAeICEhISAgICAhISEkJCQqKiokJCQhISQkKCgqKi4vLisrKisvLzIyMjw8OTlGRkhWVmf/xABmAAADAQEBAAAAAAAAAAAAAAAFBAYDAgcBAAMBAQAAAAAAAAAAAAAAAAAFAwIBEAABAwQCAwEBAAAAAAAAAAABAgADITEREgRxE9GxUTMRAQEBAQEBAAAAAAAAAAAAAAABAgMhEv/AABEIABIAIAMBIgACEQADEQD/2gAMAwEAAhEDEQA/APL5Kk+nxGK1DtTBU4AwxiI0ySalQQ1U6SshyY1LJIsM/HRcXiqm/NUXeKoVRkhB2eaOTLACE0yajD79RS+KAXYKUDzDos6LsJL/AGHRa7IOBoKu3g0VXdBp/9k=");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.hero__bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,0.15), rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.55));
}

.hero__content { padding: 2rem; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--swatch-1);
}

.hero__sub {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  margin: 1.4rem 0 0;
  color: var(--swatch-2);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 2.4rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--swatch-2);
  text-decoration: none;
  padding-bottom: 0.35em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: color 180ms ease, border-color 180ms ease;
}
.hero__cta:hover {
  color: var(--swatch-1);
  border-bottom-color: var(--swatch-1);
}
.hero__cta-arrow {
  font-size: 1.05em;
  line-height: 1;
  transition: transform 220ms ease;
}
.hero__cta:hover .hero__cta-arrow { transform: translateX(4px); }


/* ===================== TOP NAV ===================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
  background: rgba(30, 30, 30, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Transparent variant that floats over the hero video */
.site-nav--overlay {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-nav .brand {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--swatch-1);
  white-space: nowrap;
}

.site-nav .tabs {
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
}
.site-nav .tabs a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--swatch-1);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.site-nav .tabs a:hover { color: var(--swatch-1); }
.site-nav .tabs a.active {
  color: var(--swatch-1);
  border-bottom-color: var(--swatch-1);
}

/* ===================== PAGE SCAFFOLD ===================== */

.page-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--swatch-1);
  margin: 0 0 2.5rem;
}

/* Centered text pages: About, Contact */
.prose {
  min-height: calc(100vh - 4rem);
  padding: 3.5rem clamp(1.25rem, 5vw, 4rem) 6rem;
}
.prose__inner {
  max-width: 720px;
  margin: 0 auto;
}
.prose .bio {
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  line-height: 1.8;
  margin-bottom: 1.4rem;
}
.prose .also {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--swatch-3);
}
.prose .also a { color: var(--swatch-1); }

/* Directing (portfolio) — signature green gradient */
.directing {
  background-color: #292e22;
  background-image: linear-gradient(180deg, #2c3b30 0%, #2f422c 45%, #112715 100%);
  min-height: calc(100vh - 4rem);
  padding: 3.5rem clamp(1.25rem, 4vw, 4rem) 6rem;
}
.directing__inner {
  max-width: 1400px;
  margin: 0 auto;
}
.directing .page-title { margin-bottom: 2.5rem; }

/* Portrait (About page) */
.portrait { margin: 0 0 2rem; }
.portrait img {
  width: 100%;
  height: auto;
}

.bio {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--swatch-1);
  margin: 0 0 1rem;
}

.contacts-label {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--swatch-2);
  margin: 0 0 0.5rem;
}

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.9;
}
.contacts a {
  color: var(--swatch-1);
  text-decoration: none;
}
.contacts a:hover { text-decoration: underline; }
.ne { display: inline-block; margin-right: 0.15em; color: var(--swatch-2); }

.contacts--lg {
  margin-top: 2rem;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.7;
}
.contacts--lg a { text-decoration: none; }

/* --- Right film grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 1.6rem;
  align-items: start;
}

.film { margin: 0; display: block; text-decoration: none; color: inherit; }
.film--wide { grid-column: 1 / -1; }

.film__media {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  aspect-ratio: 16 / 9;
}
.film--wide .film__media { aspect-ratio: 21 / 9; }

.film__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 300ms ease;
  cursor: pointer;
}
.film:hover .film__media img { transform: scale(1.04); }
.film:active .film__media img { opacity: 0.7; }

.film .caption {
  display: block;
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.89);
  margin-top: 0.5em;
}
.film:hover .caption { text-decoration: underline; }

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

@media (max-width: 900px) {
  .grid { gap: 2rem; }
  .bio, .contacts { font-size: 1.25rem; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .film__media { aspect-ratio: 16 / 9; }
  .film--wide .film__media { aspect-ratio: 16 / 9; }
}

/* ===================== LIGHTBOX ===================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lightbox__cap {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--swatch-1);
}
@media (max-width: 560px) {
  .lightbox { padding: 1rem; }
}
