h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ── Cancel the global .main padding-top on home ── */
.main {
  padding-top: 0;
}

/* ── Header: transparent over hero, switches opaque on scroll ── */
.header {
  background: transparent;
  color: var(--color-background);
  border-bottom-color: transparent;
  transition: background .4s ease, color .4s ease, border-bottom-color .4s ease;
}
.header a,
.header .logo {
  color: var(--color-background);
  transition: color .4s ease;
}
.header--opaque {
  background: var(--color-background);
  color: var(--color-black);
  border-bottom-color: var(--color-light);
}
.header--opaque a,
.header--opaque .logo {
  color: var(--color-black);
}

/* ── Fixed intro wrapper (hero + text) fades on scroll ── */
.home-fixed-intro {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
  will-change: opacity;
  pointer-events: auto;
}

/* ── Hero: layered back / title / front ── */
.hero {
  flex: 0 0 74vh;
  width: 100%;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.hero-back,
.hero-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-back { z-index: 1; }
.hero-front { z-index: 3; }

/* Title layers: behind (z:2) and in-front-of-image (z:4) */
.hero-title,
.hero-title-front {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}
.hero-title       { z-index: 2; } /* behind hero-front */
.hero-title-front { z-index: 4; } /* in front of hero-front */

.hero-word {
  position: absolute;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--color-black); /* highlight / link colour */
  display: block;
  font-size: clamp(8rem, 12vw, 11rem);
}

/* Tight stagger — words cluster together, subtle left-right offset */
.hero-word--0 { top: 18%; left: 8%;  }
.hero-word--1 { top: 31%; left: 14%; }
.hero-word--2 { top: 44%; left: 5%;  }
.hero-word--3 { top: 57%; left: 16%; }

/* ── Intro text strip (below hero, description only) ── */
.home-intro {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1em;
  flex: 1 1 0;
  padding: 1.5rem var(--padding) 1.75rem;
  border-top: 1px solid rgba(255,255,255,.15);
  background: var(--color-background);
  box-sizing: border-box;
}

.home-description {
  flex: 0 0 28rem;
  font-size: .82rem;
  line-height: 1.65;
  color: var(--color-black);
}

.home-description-dot {
  display: block;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #c0392b;
  margin-bottom: .75rem;
}

/* ── Spacer: creates scroll room equal to the fixed intro height ── */
.home-intro-spacer {
  display: block;
}

/* ── Projects section: full viewport width so no gap at edges ── */
.home-projects {
  position: relative;
  z-index: 20;
  background: var(--color-background);
  padding-top: 4rem;
  /* extend to viewport edges to cover fixed intro on all sides */
  width: 100vw;
  margin-left: calc(-1 * var(--padding));
  padding-left: var(--padding);
  padding-right: var(--padding);
  box-sizing: border-box;
  /* always tall enough to fill the viewport below the fixed header */
  min-height: calc(100vh - 3.5rem);
}

/* ── Selected Work heading ── */
.hp-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  margin-bottom: 0;
  position: relative;
}

.hp-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-black);
  transform: scaleX(0);
  transform-origin: left;
}

@keyframes hp-border-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hp-header.is-visible::after {
  animation: hp-border-in 4.0s cubic-bezier(.5,1,.3,1) forwards;
}

.hp-header-label {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  font-family: var(--font-family-sans);
  color: var(--color-black);
}

.hp-header-meta {
  font-family: var(--font-family-mono);
  font-size: .55rem;
  letter-spacing: .1em;
  color: var(--color-grey);
  margin-bottom: .35rem;
}

/* ── Filter tags bar ── */
.hp-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--color-light);
}

/* ── Card grid ── */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.hp-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  text-decoration: none;
  color: inherit;
}

.hp-card-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--color-light);
}

.hp-card-image img,
.hp-card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

/*!* Blue tint overlay using the site's highlight colour rgb(20,20,210) *!*/
/*.hp-card-image::after {*/
/*  content: '';*/
/*  position: absolute;*/
/*  inset: 0;*/
/*  background: rgba(20, 20, 210, 0.28);*/
/*  pointer-events: none;*/
/*  transition: opacity .35s ease;*/
/*}*/

.hp-card:hover .hp-card-image img,
.hp-card:hover .hp-card-image video {
  transform: scale(1.04);
}
.hp-card:hover .hp-card-image::after {
  opacity: .08;
}

.hp-card-meta {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin-top: 0.8rem;
}

.hp-num {
  font-family: var(--font-family-mono);
  font-size: .6rem;
  letter-spacing: .14em;
  color: var(--color-grey);
  flex-shrink: 0;
}

.hp-title {
  font-size: .9rem;
  font-weight: 500;
  flex: 1;
}

.hp-year {
  font-family: var(--font-family-mono);
  font-size: .6rem;
  letter-spacing: .06em;
  color: var(--color-grey);
  flex-shrink: 0;
}

.hp-desc {
  font-size: .72rem;
  line-height: 1.55;
  color: var(--color-grey);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Mobile ── */
@media screen and (max-width: 60rem) {
  /* Mandatory snap — scroll always lands on a defined position */
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 3.5rem; /* offset for the fixed header */
  }

  .hero {
    flex: 0 0 58vh;
  }

  .home-intro {
    justify-content: flex-start;
    align-items: flex-end;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-description {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  /* Tighter vertical spacing between hero words */
  .hero-word    { font-size: clamp(2.5rem, 10vw, 5rem); }
  .hero-word--0 { top: 24%; }
  .hero-word--2 { top: 38%; }
  .hero-word--3 { top: 45%; }

  /* Snap point for the projects section — filter is reachable before cards snap */
  .home-projects {
    scroll-snap-align: start;
  }

  /* Full-height scroll-snap cards — each fills viewport below the header */
  .hp-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hp-card {
    height: calc(100vh - 3.5rem);
    height: calc(100svh - 3.5rem); /* 100svh = visible area excl. browser chrome */
    scroll-snap-align: start;
    scroll-snap-stop: always;      /* must stop here — no skipping */
    border-bottom: 1px solid var(--color-light);
    padding-bottom: 1.25rem;
    box-sizing: border-box;
  }

  .hp-card-image {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: unset;
  }

  /* More room for description text below the image on mobile */
  .hp-desc {
    font-size: .85rem;
    line-height: 1.65;
    -webkit-line-clamp: 10;
    margin-bottom: 1rem;
  }
}
