
/* Keep direct-entry pages hidden until positioned */
html.direct-project-entry body {
  visibility: hidden !important;
}

/* Reveal after the gallery position has been established */
html.direct-entry-ready body {
  visibility: visible !important;
}

.home.direct-positioning,
.home.direct-positioning * {
  transition: none !important;
  animation: none !important;
}

/* =========================================
   HOME PAGE â€” MAIN SETTINGS
========================================= */

.home {
  --artwork-ratio: 1.755;
  --star-x: 49.94%;
  --star-y: 50.4%;
  --star-size: 34%;
  --portal-zoom: 24;

  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #7B87F9;
  overflow: clip;
}


/* =========================================
   NAME
========================================= */

.home__name {
  position: absolute;
  left: 22%;
  top: 30%;
  z-index: 5;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  color: #F0E3EC;
  line-height: 0.82;
  pointer-events: none;

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

.home__name-first {
  font-family: "Jack", sans-serif;
  font-size: clamp(80px, 10vw, 165px);
  font-weight: 400;
  letter-spacing: -0.06em;
  margin: 0;
}

.home__name-last {
  font-family: "Gotham", sans-serif;
  font-size: clamp(52px, 6.5vw, 100px);
  font-weight: 700;
  letter-spacing: -0.055em;
  margin: 0;
  padding: 0;

  transform: scaleX(1.05);
  transform-origin: left center;
}


/* =========================================
   INTRO
========================================= */

.home__intro {
  position: absolute;
  left: 75%;
  top: 75%;
  z-index: 5;

  width: clamp(360px, 34vw, 540px);

  color: #F0E3EC;
  text-align: left;
  pointer-events: none;

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

.home__intro h2 {
  width: 100%;

  font-family: "Gotham", sans-serif;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.9;

  margin: 0 0 16px;
}

.home__intro p {
  width: 100%;

  font-family: "Gotham", sans-serif;
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 400;
  line-height: 1.5;

  margin: 0;
}


/* Scroll-driven text movement */

.home__name,
.home__intro {
  translate: 0 var(--scroll-y, 0px);
  filter: opacity(var(--scroll-opacity, 1));
  will-change: translate, filter;
}


/* =========================================
   SCROLL JOURNEY
========================================= */

.home__star-scroll-journey {
  position: relative;
  width: 100%;
  height: 280vh;
}

.home__star-portal {
  position: sticky;
  top: 0;

  width: 100%;
  height: 100vh;
  height: 100svh;

  overflow: hidden;
}


/* =========================================
   ARTWORK CANVAS
========================================= */

.home__full-screen-artwork {
  position: absolute;

  width: max(100vw, 175.5svh);
  aspect-ratio: 1920 / 1094;
  height: auto;

  left: 50%;
  top: 50%;

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

  overflow: hidden;
  isolation: isolate;
}


/* =========================================
   FLOWING SHAPES
========================================= */

.home__flow > div {
  position: absolute;
  overflow: visible;
  will-change: transform;
}

.home__flow img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home__flow-03 {
  top: 8.4%;
  right: -10.9%;
  width: 59.6%;
  height: 54%;
  animation: drift-01 13s ease-in-out infinite alternate;
}

.home__flow-01 {
  top: -14.6%;
  left: 47.7%;
  width: 41.6%;
  height: 76%;
  animation: drift-02 16s ease-in-out infinite alternate;
}

.home__flow-02 {
  top: -17.3%;
  right: -2.9%;
  width: 53.6%;
  height: 73%;
  animation: drift-03 14s ease-in-out infinite alternate;
}

.home__flow-04 {
  top: -19.8%;
  right: -23%;
  width: 65.7%;
  height: 74.5%;
  animation: drift-04 18s ease-in-out infinite alternate;
}

.home__flow-07 {
  bottom: 18.1%;
  left: -5.8%;
  width: 61.1%;
  height: 43.1%;
  animation: drift-05 15s ease-in-out infinite alternate;
}

.home__flow-05 {
  bottom: -11.9%;
  left: 9.8%;
  width: 43.6%;
  height: 66.2%;
  animation: drift-06 12s ease-in-out infinite alternate;
}

.home__flow-06 {
  bottom: -10.8%;
  left: -4.8%;
  width: 57.4%;
  height: 62.7%;
  animation: drift-07 17s ease-in-out infinite alternate;
}

.home__flow-08 {
  bottom: -0.8%;
  left: -10.4%;
  width: 55%;
  height: 54.1%;
  animation: drift-08 14s ease-in-out infinite alternate;
}


/* =========================================
   LIQUID FLOW ANIMATIONS
========================================= */

@keyframes drift-01 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-3%, 2%, 0) rotate(-1.5deg) scale(1.025, 1.015); }
  100% { transform: translate3d(2%, -3%, 0) rotate(1deg) scale(0.98, 1.04); }
}

@keyframes drift-02 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3%, -2%, 0) rotate(1.5deg) scale(1.03, 0.98); }
  100% { transform: translate3d(-2%, 3%, 0) rotate(-1deg) scale(0.98, 1.03); }
}

@keyframes drift-03 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-3%, -2%, 0) rotate(-1.5deg) scale(0.97, 1.04); }
  100% { transform: translate3d(2%, 2%, 0) rotate(1.5deg) scale(1.04, 0.98); }
}

@keyframes drift-04 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(2%, 3%, 0) rotate(1.5deg) scale(1.03, 1.02); }
  100% { transform: translate3d(-3%, -2%, 0) rotate(-1.5deg) scale(0.98, 1.04); }
}

@keyframes drift-05 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3%, -3%, 0) rotate(1.5deg) scale(1.04, 0.97); }
  100% { transform: translate3d(-2%, 2%, 0) rotate(-1deg) scale(0.98, 1.04); }
}

@keyframes drift-06 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-3%, -2%, 0) rotate(-1.5deg) scale(0.97, 1.04); }
  100% { transform: translate3d(2%, 3%, 0) rotate(1.5deg) scale(1.04, 0.98); }
}

@keyframes drift-07 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) rotate(1.5deg) scale(1.03, 1.04); }
  100% { transform: translate3d(-3%, -3%, 0) rotate(-1.5deg) scale(0.97, 1.02); }
}

@keyframes drift-08 {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(-2%, 3%, 0) rotate(-1deg) scale(1.04, 0.98); }
  100% { transform: translate3d(3%, -2%, 0) rotate(1.5deg) scale(0.98, 1.04); }
}


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

.home__projects {
  position: absolute;
  inset: 0;
  z-index: 4;

  width: 100%;
  height: 100%;

  background: #1B125F;

  opacity: 0;
  pointer-events: none;

  will-change: opacity;
}

.home__projects-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.home.projects-active .home__projects,
.home.projects-active .home__projects-content {
  pointer-events: auto;
}


/* =========================================
   ORANGE ARTWORK
========================================= */

.home__orange {
  position: absolute;
  inset: 0;
  z-index: 3;

  width: 100%;
  height: 100%;

  pointer-events: none;
  will-change: opacity;
}

.home__static-home {
  position: absolute;
  left: -5%;
  top: -12%;

  width: 110%;
  height: 125%;

  overflow: visible;
}

.home__static-home > img {
  position: absolute;
  inset: 0;

  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;
}


/* =========================================
   BLUE STAR
========================================= */

.home__blue-star {
  position: absolute;
  left: var(--star-x);
  top: var(--star-y);

  width: var(--star-size);
  aspect-ratio: 1;

  z-index: 2;

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

  overflow: visible;
  will-change: transform, opacity;

  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;

  cursor: grab;
}

.home__blue-star:active {
  cursor: grabbing;
}

.home__blue-star img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;

  pointer-events: none;
  -webkit-user-drag: none;
}


/* =========================================
   DESKTOP PROJECT CAROUSEL
========================================= */

.projects-carousel {
  position: absolute;
  top: 5%;
  left: 0;

  display: flex;
  align-items: center;

  width: 100%;
  height: 70%;

  overflow: hidden;
  pointer-events: auto;
}

.projects-carousel__track {
  display: flex;
  align-items: center;
  width: max-content;

  animation: projects-marquee 55s linear infinite;
  will-change: transform;
}

.projects-carousel__group {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
}


/* =========================================
   PROJECT CARDS
========================================= */

.project-card {
  position: relative;
  display: block;
  flex: 0 0 auto;

  width: clamp(320px, 42vw, 720px);
  aspect-ratio: 1.4 / 1;

  margin-right: -105px;

  overflow: hidden;
  border-radius: 7px;

  text-decoration: none;
  color: #FFFFFF;
  background: #5145A6;

  transform: scale(0.95) rotate(-3deg);
  transform-origin: center center;

  z-index: 1;

  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.18);

transition:
  transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
  box-shadow 0.3s ease;
}

.project-card:nth-child(2) {
  transform: translateY(24px) scale(0.88) rotate(3deg);
}

.project-card:nth-child(3) {
  transform: translateY(-18px) scale(0.86) rotate(-4deg);
}

.project-card:nth-child(4) {
  transform: translateY(16px) scale(0.9) rotate(2deg);
}

.project-card:nth-child(5) {
  transform: translateY(-24px) scale(0.85) rotate(-3deg);
}

.project-card:nth-child(6) {
  transform: translateY(20px) scale(0.88) rotate(4deg);
}

.project-card img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: cover;

  filter: grayscale(100%) brightness(0.65);

  transition:
    filter 0.3s ease;
}

/* =========================================
   PROJECT CARD HOVER
========================================= */

@media (hover: hover) and (pointer: fine) {

  .projects-carousel .project-card:hover {
    transform: translateY(0) scale(1.12) rotate(0deg) !important;
    z-index: 30;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  }

  .projects-carousel .project-card:hover img {
    filter: grayscale(0%) brightness(1);
  }

  .projects-carousel .project-card:hover span {
    opacity: 1;
    transform: translateY(0);
  }

  .projects-carousel .project-card:hover::after {
    opacity: 1;
  }

}

.project-card span {
  position: absolute;
  left: 20px;
  bottom: 18px;

  z-index: 2;

  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: #FFFFFF;

  opacity: 0;
  transform: translateY(8px);

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.project-card:hover span {
  opacity: 1;
  transform: translateY(0);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    transparent 45%,
    rgba(15, 10, 55, 0.65)
  );

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
}

.project-card:hover::after {
  opacity: 1;
}

.project-card:focus-visible {
  outline: 3px solid #F94E08;
  outline-offset: 4px;
}


/* =========================================
   INFINITE CAROUSEL
========================================= */

@keyframes projects-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}



/* =========================================
   PROJECTS HEADING + NAVIGATION
========================================= */

.projects-intro {
  position: absolute;
  left: 1%;
  bottom: 6%;
  z-index: 5;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 98%;

  color: #FFFFFF;
}

.projects-intro h1 {
  margin: 0;
  font-family: "Jack", sans-serif;
  font-size: clamp(46px, 7.2vw, 114px);
  line-height: 0.82;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.projects-intro h1 span {
  color: #F94E08;
}

.projects-nav--desktop {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.5rem);
}

.projects-nav--desktop a,
.projects-nav--mobile a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: #FFFFFF;
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;

  transition: color 0.3s ease;
}

.projects-nav--desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: #F94E08;

  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.projects-nav--desktop a span,
.projects-nav--mobile a span {
  display: inline-block;
  transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .projects-nav--desktop a:hover,
  .projects-nav--mobile a:hover {
    color: #F94E08;
  }

  .projects-nav--desktop a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .projects-nav--desktop a:hover span,
  .projects-nav--mobile a:hover span {
    transform: translate(2px, -2px);
  }
}

/* =========================================
   MOBILE MENU â€” BASE
========================================= */

/* Hidden on desktop */
.projects-menu-toggle,
.projects-nav--mobile {
  display: none;
}


/* =========================================
   TABLET
========================================= */

@media (min-width: 701px) and (max-width: 768px) {

  .projects-intro {
    left: 3%;
    bottom: 8%;
    width: 94%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .projects-intro h1 {
    font-size: clamp(46px, 10.5vw, 76px);
  }

  .projects-nav--desktop {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
}


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

@media (max-width: 768px) {

  /* Hide desktop navigation */
  .projects-nav--desktop {
    display: none;
  }

  /* Fixed circular hamburger */
  .projects-menu-toggle {
    display: none;
    position: fixed;
    right: 22px;
    bottom: 22px;

    width: 58px;
    height: 58px;
    padding: 0;

    border: none;
    border-radius: 50%;
    background: #F94E08;

    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;

    cursor: pointer;
    z-index: 10002;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);

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

  /* Show only while Projects is active */
  .home.projects-active ~ .projects-menu-toggle {
    display: flex;
  }

  .projects-menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;

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

  .projects-menu-toggle:active {
    transform: scale(0.92);
  }

  /* Fullscreen mobile overlay */
  .projects-nav--mobile {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 10001;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 35px;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    padding: 30px;
    box-sizing: border-box;

    background: #1B125F;

    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;

    transition:
      transform 0.55s cubic-bezier(0.77, 0, 0.175, 1),
      visibility 0.55s;
  }

  .projects-nav--mobile.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .projects-nav--mobile a {
    font-size: clamp(28px, 8vw, 44px);
    font-weight: 700;
    color: #FFFFFF;
  }

  .projects-nav--mobile a:hover {
    color: #F94E08;
  }

  /* Hamburger transforms into X */
  .projects-menu-toggle.is-active {
    background: #FFFFFF;
  }

  .projects-menu-toggle.is-active span {
    background: #F94E08;
  }

  .projects-menu-toggle.is-active span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }

  .projects-menu-toggle.is-active span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }
}






@media (min-width: 701px) and (max-width: 768px) {

  .home__star-scroll-journey {
    height: 240vh;
  }

  .projects-carousel {
    top: 7%;
    height: 48%;
  }

  .projects-carousel__group {
    gap: 14px;
    padding-right: 14px;
  }

  .project-card {
    width: 78vw;
    margin-right: -46px;
  }

  .project-card:hover {
    transform: translateY(0) scale(1.15) rotate(0deg);
  }

}


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

@media (max-width: 700px) {

  /* Homepage and scroll */

  .home {
    overflow: clip;

    --star-size: 150vw;
    --star-x: 50%;
    --star-y: 50%;
  }

  .home,
  .home__star-scroll-journey,
  .home__star-portal,
  .home__full-screen-artwork,
  .home__blue-star {
    touch-action: pan-y;
  }

  .home__star-scroll-journey {
    position: relative;
    height: 120svh;
    overflow: visible;
  }

  .home__star-portal {
    position: sticky;
    top: 0;

    height: 100svh;
    overflow: hidden;

    touch-action: pan-y;
  }

  .home__full-screen-artwork {
    width: max(100vw, 175.5svh);
  }


  /* Star interaction */

  .home__blue-star {
    pointer-events: none;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }

  .home__blue-star img {
    pointer-events: none;
    -webkit-user-drag: none;
  }


  /* Name */

  .home__name {
    left: 49.5%;
    top: 43%;

    width: 80vw;
    max-width: 340px;

    align-items: center;
    text-align: center;

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

  .home__name-first {
    font-size: clamp(54px, 14vw, 82px);
  }

  .home__name-last {
    font-size: clamp(32px, 8vw, 48px);

    transform: none;
    letter-spacing: -0.055em;
  }


  /* Intro */

  .home__intro {
    left: 49.5%;
    top: 53.5%;

    width: 72vw;
    max-width: 300px;

    text-align: center;

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

  .home__intro h2 {
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.05;

    margin-bottom: 8px;
    text-align: center;
  }

  .home__intro p {
    font-size: clamp(12px, 3.2vw, 15px);
    line-height: 1.35;

    text-align: center;
  }


  /* Orange artwork */

  .home__static-home {
    transform: scale(1.2);
    transform-origin: center;
  }


  /* Projects overlay */

  .home__projects {
    position: absolute;

    top: 0;
    left: 50%;
    right: auto;
    bottom: auto;

    width: 100vw;
    height: 100%;

    transform: translateX(-50%);

    z-index: 4;
    box-sizing: border-box;

    background: #1B125F;

    overflow-x: hidden;
    overflow-y: auto;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;

    pointer-events: none;
  }

  .home.projects-active .home__projects {
    pointer-events: auto;
  }


  /* Projects content */

  .home__projects-content {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    height: auto;
    min-height: 100%;

    padding: 38px 6vw 55px;

    box-sizing: border-box;

    overflow: visible;
    pointer-events: none;
  }

  .home.projects-active .home__projects-content {
    pointer-events: auto;
  }


  /* Projects heading */

  .projects-intro {
    position: relative;

    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    inset: auto;

    order: -1;

    display: block;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;

    margin: 0 0 26px;
    padding: 0;

    box-sizing: border-box;

    z-index: 5;

    color: #FFFFFF;
  }

  .projects-intro h1 {
    display: block;
    width: 100%;
    max-width: 100%;

    margin: 0;

    font-family: "Jack", sans-serif;
    font-size: clamp(38px, 10.5vw, 64px);
    line-height: 0.85;
    letter-spacing: 0.01em;
    font-weight: 700;

    white-space: nowrap;
    box-sizing: border-box;
  }


  /* Project list */

  .projects-carousel {
    position: relative;

    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    inset: auto;

    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;

    flex: 0 0 auto;

    overflow: visible;
    box-sizing: border-box;

    pointer-events: auto;
  }

  .projects-carousel__track {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;

    animation: none !important;
    transform: none !important;

    box-sizing: border-box;
  }

  .projects-carousel__group {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;

    gap: 22px;
    padding: 0;

    box-sizing: border-box;
  }


  /* Hide duplicated desktop cards */

  .projects-carousel__group[aria-hidden="true"] {
    display: none !important;
  }


  /* Project cards */

  .project-card {
    position: relative;

    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    height: auto;
    aspect-ratio: 4 / 3;

    flex: 0 0 auto;

    margin: 0;
    padding: 0;

    overflow: hidden;
    box-sizing: border-box;

    border-radius: 8px;

    background: #5145A6;

    transform: none !important;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);

    z-index: 1;
  }

  .project-card:nth-child(n) {
    transform: none !important;
  }

  .project-card img {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    filter: none;
    transform: none;
  }


  /* Project card labels */

.project-card span {
  position: absolute;

  left: 16px;
  top: 14px;
  bottom: auto;

  z-index: 2;

  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: #FFFFFF;

  opacity: 1;
  transform: none;
}

  .project-card::after {
    opacity: 1;
  }


  /* Disable desktop hover effects */

  .project-card:hover {
    transform: none !important;
    z-index: 1;
  }

  .project-card:hover img {
    transform: none;
    filter: none;
  }


  /* Project interaction control */

  .home__projects,
  .home__projects * {
    pointer-events: none !important;
  }

  .home.projects-active .home__projects,
  .home.projects-active .home__projects * {
    pointer-events: auto !important;
  }
}


/* =========================================
   HOMEPAGE TEXT â€” ENTRANCE ANIMATIONS
========================================= */

.home__name,
.home__intro {
  opacity: 0;
}

.home.is-loaded .home__name {
  animation: name-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.home.is-loaded .home__intro {
  animation: intro-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards;
}

@keyframes name-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -42%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes intro-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -42%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}


/* =========================================
   ACCESSIBILITY â€” REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  .projects-carousel__track {
    animation: none !important;
    transform: none !important;
  }

  .project-card,
  .project-card img,
  .project-card span,
  .project-card::after {
    transition: none !important;
  }

  .project-card,
  .project-card:hover {
    transform: none !important;
  }

  .home__flow > div {
    animation: none !important;
  }

  .home__name,
  .home__intro {
    animation: none !important;
    opacity: 1;
    transform: translate(-50%, -50%);
    will-change: auto;
  }
}


/* =========================================
   FINAL INTERACTION SETTINGS
========================================= */

.home__orange {
  pointer-events: none;
}

.home__blue-star {
  pointer-events: none !important;
  touch-action: pan-y;
}

.home__blue-star img {
  pointer-events: none;
  -webkit-user-drag: none;
}


/* =========================================
   PORTFOLIO LOADING SCREEN
========================================= */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;

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

  background: #7B87F9;

  transform: translateY(0);

  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.page-loader__name {
  font-family: "Jack", sans-serif;
  font-size: clamp(64px, 12vw, 110px);
  color: #F0E3EC;
  line-height: 0.85;
}

.page-loader__line {
  display: block;
  width: 100px;
  height: 2px;

  background: rgba(240, 227, 236, 0.25);

  overflow: hidden;
  position: relative;
}

.page-loader__line::after {
  content: "";
  position: absolute;
  inset: 0;

  background: #F0E3EC;

  transform: translateX(-100%);
  animation: loader-progress 1.2s ease-in-out infinite;
}

.page-loader__text {
  font-family: "Gotham", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #F0E3EC;
}

/* Slide welcome screen off to the right */

body.page-ready .page-loader {
  transform: translateY(100%);
  pointer-events: none;
}

@keyframes loader-progress {
  to {
    transform: translateX(100%);
  }
}


/* Mobile loader sizing */

@media (max-width: 700px) {

  .page-loader__name {
    font-size: 12vw;
    white-space: nowrap;
    width: 100%;
    text-align: center;
    letter-spacing: 0.05em;
    transform: scaleX(0.85);
    transform-origin: center;
  }

  .page-loader__content {
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
    overflow: hidden;
  }
}

/* =========================================
   SKIP WELCOME SCREEN WHEN RETURNING
========================================= */

html.skip-welcome .page-loader {
  display: none !important;
}

/* =====================================
   DIRECT PROJECT ENTRY
===================================== */

html.direct-project-entry .home__flow,
html.direct-project-entry .home__orange,
html.direct-project-entry .home__blue-star {
  display: none !important;
}

html.direct-project-entry .home__projects {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: none !important;
}

html.direct-project-entry .home__projects-content {
  opacity: 1 !important;
  visibility: visible !important;
}

/* =========================================
   SMALL PHONE — HOME TEXT FIT
========================================= */

@media screen and (max-width: 400px) {

  .home__name {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .home__name-first {
    font-size: clamp(3rem, 14vw, 4rem);
    line-height: 0.8;
  }

  .home__name-last {
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 0.85;
    margin-top: 0.15rem;
  }

  .home__intro {
    width: 82%;
    max-width: 300px;
    margin-inline: auto;
  }

  .home__intro h2 {
    font-size: clamp(0.85rem, 3.8vw, 1.1rem);
    line-height: 1.15;
    margin-bottom: 0.4rem;
  }

  .home__intro p {
    font-size: clamp(0.7rem, 3vw, 0.85rem);
    line-height: 1.35;
  }

}

@media screen and (max-width: 400px) {

  .home__name-first {
    font-size: 11vw !important;
  }

  .home__name-last {
    font-size: 8vw !important;
  }

  .home__intro h2 {
    font-size: 4vw !important;
  }

  .home__intro p {
    font-size: 3vw !important;
  }

}