/* ==========================================================================
   Homepage
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero — full-width wordmark with the Spline scene layered on top (z-index 2)
   -------------------------------------------------------------------------- */
.hero {
  padding: 0 var(--gutter);
}

.hero-frame {
  position: relative;
  padding-top: 9.4vw; /* clears the fixed nav; 135px at 1440 */
}

.hero-wordmark {
  width: 100%;
  height: auto;
  display: block;
}

/* The live scene's canvas doesn't fill its hero box — it letterboxes to a
   fixed aspect ratio (1300x580 at 1440) and sits flush with the bottom,
   leaving empty space above it under the nav. Stretching it to inset:0
   like a first pass does pushes the object up and skews its framing. */
.spline-scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 1300 / 580.29;
  z-index: 2;
}

.spline-scene spline-viewer {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   Small-type strip under the hero
   -------------------------------------------------------------------------- */
.hero-meta {
  padding-top: 45px;
}

/* --------------------------------------------------------------------------
   Intro statement — 4vw, constrained to 54% of the content width
   -------------------------------------------------------------------------- */
.intro {
  padding: 90px var(--gutter) 0;
}

.intro .label {
  display: block;
  margin-bottom: 20px;
}

.intro h1 {
  font-size: 4vw;
  font-weight: 400;
  line-height: 1;
  max-width: 54%;
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   Project list
   -------------------------------------------------------------------------- */
.project-list {
  padding: 90px var(--gutter) 0;
}

.project-list > .label {
  display: block;
  margin-bottom: 20px;
}

.project-block {
  position: relative;
}

.project-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--grid-gap);
  align-items: end;
  /* lands each block at ~149px tall, matching the live site */
  padding: 52px 0 60px;
}

.project-name {
  font-size: 6vw;
  font-weight: 400;
  line-height: 36px; /* fixed on the live site — glyphs overhang by design */
  color: var(--fg);
  transform: translate3d(-70px, 0, 0);
  filter: blur(0px);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.3s cubic-bezier(0.608, 0.007, 0.25, 1);
}

.project-block.in-view .project-name { transform: translate3d(0, 0, 0); }
.project-name-link:hover .project-name { filter: blur(5px); }

.project-tags {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: -0.1px;
  color: var(--fg);
}

.numbering {
  font-family: var(--font-mono);
  font-size: 3vw;
  line-height: 20px;
  text-align: right;
  color: var(--fg);
}

.separator {
  height: 1px;
  background: var(--hairline);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-block.in-view .separator {
  opacity: 1;
  transform: scaleX(1);
}

/* Hover thumbnail — 360x360, pinned to the start of column 2 */
.project-thumb {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 360px;
  height: 360px;
  border-radius: 20px;
  object-fit: cover;
  z-index: 5;
  opacity: 0;
  transform: translate3d(0, 240px, 0) rotate(0deg);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

/* Alternate the tilt direction row to row so thumbnails don't all lean
   the same way. */
.project-block.tilt-left .project-thumb { --tilt: -4deg; }
.project-block.tilt-right .project-thumb { --tilt: 4deg; }

.project-block:hover .project-thumb {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(var(--tilt, 0deg));
}

.project-name-link { display: inline-block; }

/* --------------------------------------------------------------------------
   Footer strip
   -------------------------------------------------------------------------- */
.site-footer { padding-top: 0; }

@media (max-width: 767px) {
  .hero-frame { padding-top: 110px; }
  .intro { padding-top: 56px; }
  .intro h1 { font-size: 30px; max-width: 100%; }
  .project-list { padding-top: 56px; }
  .project-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 24px 0 22px;
  }
  .project-name { font-size: 44px; line-height: 1; transform: none; }
  .numbering { font-size: 20px; }
  .project-tags { grid-column: 1 / -1; }
  .project-thumb { display: none; }
  .hero-meta { padding-top: 32px; }
}
