:root {
  --background: #0b0b0b;
  --surface: #111111;
  --text: #f2f0eb;
  --muted: #858585;
  --border: rgba(255, 255, 255, 0.14);
  --serif: "Playfair Display", serif;
  --sans: "DM Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* =========================
   CURSOR
========================= */

.cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-follower {
  position: fixed;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    background 0.3s ease;
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;

  padding: 30px 4vw;

  display: flex;
  justify-content: space-between;
  align-items: center;

  z-index: 100;

  mix-blend-mode: difference;
}

.logo {
  font-size: 12px;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  gap: 35px;
}

.nav-links a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;

  opacity: 0.75;

  transition: opacity 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
}

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

.hero {
  height: 100vh;
  min-height: 700px;

  position: relative;

  display: flex;
  align-items: flex-end;

  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transform: scale(1.05);

  animation: heroZoom 12s ease-out forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.15) 65%,
    rgba(0, 0, 0, 0.3)
  );
}

.hero-content {
  position: relative;

  width: 100%;

  padding: 0 4vw 7vh;
}

.hero-small {
  display: block;

  font-size: 11px;
  letter-spacing: 0.2em;

  margin-bottom: 25px;
}

.hero h1 {
  font-size: clamp(70px, 10vw, 170px);

  line-height: 0.85;

  font-weight: 400;

  letter-spacing: -0.06em;

  max-width: 1000px;
}

.hero h1 span {
  display: block;

  font-family: var(--serif);
  font-style: italic;

  font-weight: 400;
}

.hero-bottom {
  margin-top: 80px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-bottom p {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-link {
  font-size: 10px;

  letter-spacing: 0.15em;

  display: flex;
  gap: 20px;
  align-items: center;
}

.scroll-link span {
  font-size: 20px;

  animation: scrollArrow 1.5s infinite;
}

@keyframes scrollArrow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(7px);
  }
}

/* =========================
   GENERAL
========================= */

.section {
  padding: 150px 4vw;
}

.section-label {
  display: flex;

  gap: 30px;

  padding-bottom: 25px;

  border-bottom: 1px solid var(--border);

  font-size: 10px;

  letter-spacing: 0.18em;

  text-transform: uppercase;

  color: var(--muted);
}

.section-label span:first-child {
  color: var(--text);
}

/* =========================
   ABOUT
========================= */

.about-content {
  padding-top: 90px;

  display: grid;

  grid-template-columns: 2fr 1fr;

  gap: 10vw;
}

.about-title {
  font-size: clamp(40px, 5vw, 75px);

  line-height: 1.05;

  font-weight: 300;

  letter-spacing: -0.04em;
}

.about-title em {
  font-family: var(--serif);

  font-style: italic;
}

.about-description {
  padding-top: 10px;
}

.about-description p {
  font-size: 15px;

  line-height: 1.8;

  color: #aaa;

  margin-bottom: 25px;
}

/* =========================
   SHOWREEL
========================= */

.showreel {
  background: #101010;
}

.showreel-header {
  padding: 80px 0 60px;

  display: flex;

  justify-content: space-between;

  align-items: flex-end;
}

.showreel-header h2,
.projects-intro h2 {
  font-size: clamp(60px, 9vw, 140px);

  line-height: 0.8;

  letter-spacing: -0.06em;

  font-weight: 300;
}

.showreel-header h2 em,
.projects-intro h2 em {
  font-family: var(--serif);

  font-style: italic;
}

.showreel-header p,
.projects-intro p {
  max-width: 300px;

  font-size: 13px;

  line-height: 1.7;

  color: var(--muted);
}

.showreel-container {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #050505;
}

.showreel-video {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 1s ease;
}

.showreel-container:hover .showreel-video {
  transform: scale(1.02);
}

.video-control {
  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  width: 90px;
  height: 90px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.7);

  background: rgba(0, 0, 0, 0.25);

  color: white;

  font-size: 10px;

  letter-spacing: 0.15em;

  cursor: pointer;

  backdrop-filter: blur(5px);

  transition: all 0.3s ease;
}

.video-control:hover {
  background: white;

  color: black;

  transform: translate(-50%, -50%) scale(1.08);
}

.video-corner {
  position: absolute;

  font-size: 9px;

  letter-spacing: 0.2em;

  color: white;
}

.top-left {
  top: 25px;
  left: 25px;
}

.bottom-right {
  bottom: 25px;
  right: 25px;
}

/* =========================
   PROJECTS
========================= */

.projects-intro {
  padding: 80px 0;

  display: flex;

  justify-content: space-between;

  align-items: flex-end;
}

.project-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;
}

.project {
  min-width: 0;
}

.project-video {
  position: relative;

  width: 100%;

  aspect-ratio: 4 / 5;

  overflow: hidden;

  background: #151515;
}

.project-video video {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.8s ease,
    filter 0.8s ease;
}

.project:hover .project-video video {
  transform: scale(1.04);

  filter: brightness(0.65);
}

.project-number {
  position: absolute;

  top: 20px;
  left: 20px;

  font-size: 10px;

  letter-spacing: 0.15em;
}

.project-play {
  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%) scale(0.8);

  opacity: 0;

  font-size: 10px;

  letter-spacing: 0.2em;

  border: 1px solid white;

  width: 70px;
  height: 70px;

  border-radius: 50%;

  display: flex;

  justify-content: center;
  align-items: center;

  transition: all 0.4s ease;
}

.project:hover .project-play {
  opacity: 1;

  transform: translate(-50%, -50%) scale(1);
}

.project-info {
  padding-top: 25px;
}

.project-title-row {
  display: flex;

  justify-content: space-between;

  align-items: center;
}

.project-title-row h3 {
  font-size: 14px;

  font-weight: 500;

  letter-spacing: 0.05em;
}

.project-title-row span {
  font-size: 10px;

  color: var(--muted);
}

.project-meta {
  margin-top: 8px;

  font-size: 9px;

  letter-spacing: 0.16em;

  color: var(--muted);
}

.project-info p {
  margin-top: 22px;

  color: #999;

  font-size: 13px;

  line-height: 1.7;
}

.project-info strong {
  font-size: 9px;

  color: white;

  letter-spacing: 0.15em;

  font-weight: 500;
}

/* =========================
   CONTACT
========================= */

.contact {
  min-height: 80vh;

  display: flex;

  flex-direction: column;
}

.contact-content {
  flex: 1;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;
}

.contact-content h2 {
  font-size: clamp(60px, 10vw, 160px);

  line-height: 0.85;

  letter-spacing: -0.07em;

  font-weight: 300;
}

.contact-content h2 em {
  display: block;

  font-family: var(--serif);

  font-style: italic;
}

.contact-link {
  margin-top: 60px;

  font-size: 11px;

  letter-spacing: 0.2em;

  border-bottom: 1px solid white;

  padding-bottom: 10px;

  transition: opacity 0.3s ease;
}

.contact-link:hover {
  opacity: 0.5;
}

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

footer {
  border-top: 1px solid var(--border);

  padding: 30px 4vw;

  display: flex;

  justify-content: space-between;

  font-size: 9px;

  letter-spacing: 0.15em;

  color: var(--muted);
}

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

.reveal {
  opacity: 0;

  transform: translateY(40px);

  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;

  transform: translateY(0);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    padding-bottom: 50px;
  }

  .hero h1 {
    font-size: clamp(60px, 15vw, 110px);
  }

  .hero-bottom {
    margin-top: 50px;
  }

  .section {
    padding: 100px 5vw;
  }

  .about-content {
    grid-template-columns: 1fr;

    gap: 50px;
  }

  .about-title {
    font-size: clamp(40px, 10vw, 65px);
  }

  .showreel-header,
  .projects-intro {
    flex-direction: column;

    align-items: flex-start;

    gap: 40px;
  }

  .showreel-header h2,
  .projects-intro h2 {
    font-size: clamp(60px, 15vw, 110px);
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-video {
    aspect-ratio: 16 / 10;
  }

  .contact-content h2 {
    font-size: 18vw;
  }

  footer {
    flex-direction: column;

    gap: 15px;
  }
}

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

.video-modal {
  position: fixed;

  inset: 0;

  z-index: 9990;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 40px;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 0.45s ease,
    visibility 0.45s ease;
}

.video-modal.active {
  opacity: 1;

  visibility: visible;

  pointer-events: auto;
}

/* DARK BACKGROUND */

.video-modal-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.94);

  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);
}

/* VIDEO CONTAINER */

.video-modal-content {
  position: relative;

  z-index: 2;

  width: min(1200px, 92vw);

  max-height: 90vh;

  transform: translateY(30px) scale(0.96);

  opacity: 0;

  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
}

.video-modal.active .video-modal-content {
  transform: translateY(0) scale(1);

  opacity: 1;
}

/* VIDEO */

.video-modal-content video {
  display: block;

  width: 100%;

  max-height: 85vh;

  object-fit: contain;

  background: #000;

  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

/* CLOSE BUTTON */

.video-modal-close {
  position: absolute;

  top: -55px;

  right: 0;

  width: 40px;
  height: 40px;

  border: 1px solid rgba(255, 255, 255, 0.35);

  border-radius: 50%;

  background: rgba(0, 0, 0, 0.5);

  color: white;

  font-size: 26px;

  font-weight: 300;

  line-height: 1;

  cursor: pointer;

  display: flex;

  align-items: center;
  justify-content: center;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.video-modal-close:hover {
  background: white;

  color: black;

  transform: rotate(90deg);
}

/* MOBILE */

@media (max-width: 700px) {
  .video-modal {
    padding: 20px;
  }

  .video-modal-content {
    width: 100%;
  }

  .video-modal-close {
    top: -50px;
    right: 0;
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
  }
}

/* =========================================
   VIDEO MODAL SIDE IMAGES
========================================= */

.modal-side-image {
  position: absolute;

  top: 50%;

  width: 16vw;
  max-width: 260px;

  height: 62vh;

  overflow: hidden;

  z-index: 2;

  opacity: 0;

  pointer-events: none;

  transform: translateY(-50%) scale(0.92);

  transition:
    opacity 0.8s ease,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* LEFT */

.modal-left-image {
  left: 2.5vw;

  transform: translateY(-50%) translateX(-50px) scale(0.92);
}

/* RIGHT */

.modal-right-image {
  right: 2.5vw;

  transform: translateY(-50%) translateX(50px) scale(0.92);
}

/* IMAGE */

.modal-side-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;

  filter: brightness(0.55) contrast(1.05) saturate(0.8);

  opacity: 1;

  transform: scale(1);

  transition:
    opacity 0.7s ease,
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   WHEN MODAL IS OPEN
========================================= */

.video-modal.active.project-1-active .modal-side-image {
  opacity: 0.8;
}

/* LEFT ENTER */

.video-modal.active.project-1-active .modal-left-image {
  transform: translateY(-50%) translateX(0) scale(1);
}

/* RIGHT ENTER */

.video-modal.active.project-1-active .modal-right-image {
  transform: translateY(-50%) translateX(0) scale(1);
}

/* =========================================
   IMAGE CHANGE
========================================= */

.modal-side-image.change img {
  opacity: 0;

  transform: scale(1.08);
}

/* =========================================
   VIDEO ABOVE IMAGES
========================================= */

.video-modal-content {
  position: relative;

  z-index: 5;
}

/* =========================================
   MOBILE
========================================= */

/* =========================================
   MOBILE VIDEO MODAL
   SIDE IMAGES -> TOP / BOTTOM
========================================= */

@media (max-width: 650px) {
  .modal-side-image {
    display: block;

    position: absolute;

    left: 50%;
    right: auto;

    width: 42vw;
    max-width: 180px;

    height: 18vh;
    max-height: 150px;

    z-index: 2;

    opacity: 0;

    overflow: hidden;

    transform: translateX(-50%) scale(0.92);

    transition:
      opacity 0.8s ease,
      transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* =========================
       TOP IMAGE
    ========================= */

  .modal-left-image {
    top: 3vh;
    bottom: auto;

    transform: translateX(-50%) translateY(-40px) scale(0.92);
  }

  /* =========================
       BOTTOM IMAGE
    ========================= */

  .modal-right-image {
    top: auto;
    bottom: 3vh;

    transform: translateX(-50%) translateY(40px) scale(0.92);
  }

  /* =========================
       ACTIVE
    ========================= */

  .video-modal.active.project-1-active .modal-side-image {
    opacity: 0.8;
  }

  /* TOP ENTER */

  .video-modal.active.project-1-active .modal-left-image {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  /* BOTTOM ENTER */

  .video-modal.active.project-1-active .modal-right-image {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  /* =========================
       IMAGE
    ========================= */

  .modal-side-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    filter: brightness(0.55) contrast(1.05) saturate(0.8);

    transition:
      opacity 0.7s ease,
      transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* =========================
       IMAGE CHANGE
    ========================= */

  .modal-side-image.change img {
    opacity: 0;

    transform: scale(1.08);
  }

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

  .video-modal-content {
    width: 92vw;

    max-width: none;

    z-index: 5;
  }

  .video-modal-content video {
    width: 100%;

    max-height: 55vh;

    object-fit: contain;
  }
}

/* =========================
   SHOWREEL CONTROLS
========================= */

.video-controls {
  display: flex;
  align-items: center;
  gap: 18px;

  width: 100%;
  margin-top: 16px;
}

.video-control,
.video-mute {
  padding: 0;
  border: none;
  background: none;

  color: inherit;

  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;

  cursor: pointer;
}

.video-progress,
.video-volume {
  appearance: none;
  -webkit-appearance: none;

  height: 2px;

  background: rgba(255, 255, 255, 0.25);

  cursor: pointer;
}

/* Main progress */

.video-progress {
  flex: 1;
}

/* Volume */

.video-volume {
  width: 90px;
}

/* Slider thumb */

.video-progress::-webkit-slider-thumb,
.video-volume::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;

  width: 8px;
  height: 8px;

  border-radius: 50%;
  background: currentColor;

  cursor: pointer;
}

.video-progress::-moz-range-thumb,
.video-volume::-moz-range-thumb {
  width: 8px;
  height: 8px;

  border: none;
  border-radius: 50%;

  background: currentColor;

  cursor: pointer;
}

/* Time */

.video-time {
  min-width: 75px;

  font-size: 10px;
  letter-spacing: 0.08em;

  white-space: nowrap;
}

.video-modal-content {
  position: relative;
  width: min(900px, 75vw);
  aspect-ratio: 16 / 9;
  z-index: 10;
}

.video-modal-content iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  background: #000;
}
@media (max-width: 768px) {
  .video-modal-content {
    width: 92vw;
    aspect-ratio: 16 / 9;
  }
}

#modalYoutube {
    display: none;
}