/* Homepage composition; shared navigation and project pages keep their styles. */
.home-page .home-hero--canvas {
  min-height: clamp(34rem, 80svh, 48rem);
  padding: clamp(8rem, 12vw, 10rem) 1.25rem 3rem;
  background: var(--color-surface);
}

.home-hero--canvas .home-hero-inner {
  width: min(100%, 72rem);
  text-align: center;
}

.home-hero-lockup {
  margin: 0;
  color: var(--color-ink);
}

.home-hero-name {
  display: block;
  font-size: clamp(4.5rem, 12vw, 9.4rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.home-hero-first-name {
  display: block;
  margin-bottom: 0.1em;
  animation: hero-type-reveal 950ms 100ms both cubic-bezier(0.16, 1, 0.3, 1);
}
.home-hero-surname {
  display: inline-block;
  animation: hero-type-reveal 1050ms 250ms both cubic-bezier(0.16, 1, 0.3, 1);
}

.home-hero-selection {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0.08em 0.065em 0.105em;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  vertical-align: top;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-hero-selection:focus-visible { outline: none; }
.home-hero-selection:focus-visible > span:first-child { color: var(--color-accent); }

.home-hero-selection-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  animation: hero-detail-reveal 550ms 700ms both ease-out;
}

.home-hero-selection-frame path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
}

.home-hero-selection-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: hero-detail-reveal 550ms 700ms both ease-out;
}
.home-hero-selection-handles i {
  position: absolute;
  width: clamp(6px, 0.65vw, 10px);
  aspect-ratio: 1;
  border: 1.5px solid var(--color-accent);
  background: var(--color-surface);
  transform: translate(-50%, -50%);
}
.home-hero-selection-handles i:nth-child(1) { left: 1px; top: 1px; }
.home-hero-selection-handles i:nth-child(2) { left: calc(100% - 1px); top: 1px; }
.home-hero-selection-handles i:nth-child(3) { left: calc(100% - 1px); top: calc(100% - 1px); }
.home-hero-selection-handles i:nth-child(4) { left: 1px; top: calc(100% - 1px); }

.home-hero-selection-cursor {
  position: absolute;
  left: calc(100% - 1px);
  top: calc(100% - 1px);
  width: clamp(1.5rem, 3.4vw, 2.6rem);
  height: auto;
  overflow: visible;
  pointer-events: none;
  transform-origin: 0 0;
  filter: drop-shadow(0 3px 2px rgba(18, 43, 36, 0.12));
  animation: hero-detail-reveal 600ms 850ms both ease-out;
}
.home-hero-selection-cursor path {
  fill: var(--color-accent);
  stroke: var(--color-surface);
  stroke-width: 2;
  stroke-linejoin: round;
}

.home-hero-role {
  display: block;
  margin-top: 0.8em;
  color: var(--color-accent);
  font-size: clamp(1.4rem, 3.1vw, 2.65rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.045em;
  animation: hero-type-reveal 900ms 500ms both cubic-bezier(0.16, 1, 0.3, 1);
}
.home-hero-plus { color: #78988d; font-weight: 400; }

.home-hero-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3rem, 5.5vw, 5rem);
  color: var(--color-accent);
  font-size: 0.78rem;
  animation: hero-detail-reveal 700ms 800ms both ease-out;
}
.home-hero-location { margin: 0; color: var(--color-muted); }
.home-hero-work-link {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 44px;
  border-bottom: 1px solid var(--color-accent);
  text-decoration: none;
}
.home-hero-work-link svg { transition: transform 200ms ease; }
.home-hero-work-link:hover svg { transform: translateX(4px); }

@keyframes hero-type-reveal {
  from { opacity: 0; clip-path: inset(100% -0.08em -0.08em); transform: translateY(0.35em); }
  to { opacity: 1; clip-path: inset(-0.08em); transform: translateY(0); }
}
@keyframes hero-detail-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home-projects-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.3rem 0;
  color: var(--color-accent);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-projects-link svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.home-projects-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.home-page .home-portfolio-wrap {
  padding-top: 0;
}

.home-featured {
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-line);
  scroll-margin-top: 7rem;
}

#featured-projects {
  scroll-margin-top: 7rem;
}

.home-featured .home-section-heading {
  align-items: center;
  margin-bottom: 0.65rem;
}

.home-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.home-section-heading h2 {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.home-section-heading > p {
  color: #555d57;
  font-size: 0.78rem;
  line-height: 1.5;
}

.portfolio-grid--featured {
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 1rem;
}

.portfolio-grid--featured .portfolio-tile {
  min-width: 0;
}

.portfolio-grid--featured .portfolio-tile__image {
  aspect-ratio: 4 / 3;
  border-radius: 0.55rem;
}

.portfolio-grid--featured .portfolio-tile__meta {
  margin-top: 0.8rem;
  color: var(--color-accent);
  font-size: 0.68rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.home-more-work {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-line);
}

/* Illustrated app covers keep the project names readable at card size. */
.portfolio-tile__image--your-space { background: #e0f0fc; }
.ys-thumb-art { display: block; width: 100%; height: 100%; }
.ys-thumb-mascot, .ys-thumb-calendar, .ys-thumb-check, .ys-thumb-shadow {
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), opacity 650ms ease;
}
.ys-thumb-mascot { transform-origin: 866px 677px; }
.ys-thumb-calendar { transform-origin: 326px 646px; }
.ys-thumb-check { transform-origin: 562px 521px; }
.ys-thumb-shadow { transform-origin: 888px 757px; }
.portfolio-tile--your-space:is(:hover, :focus-visible) .ys-thumb-mascot {
  transform: translateY(-12px) rotate(1deg);
  animation: ys-mascot-hello 750ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.portfolio-tile--your-space:is(:hover, :focus-visible) .ys-thumb-calendar { transform: translate(3px, -8px) rotate(1.5deg); }
.portfolio-tile--your-space:is(:hover, :focus-visible) .ys-thumb-check { transform: translateY(-7px) scale(1.08); }
.portfolio-tile--your-space:is(:hover, :focus-visible) .ys-thumb-shadow { transform: scaleX(0.9); opacity: 0.12; }
@keyframes ys-mascot-hello {
  0% { transform: translateY(0) rotate(0); }
  38% { transform: translateY(-20px) rotate(3deg); }
  68% { transform: translateY(-8px) rotate(-1.5deg); }
  100% { transform: translateY(-12px) rotate(1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ys-thumb-mascot, .ys-thumb-calendar, .ys-thumb-check, .ys-thumb-shadow { transition: none; }
  .portfolio-tile--your-space:is(:hover, :focus-visible) :is(.ys-thumb-mascot, .ys-thumb-calendar, .ys-thumb-check, .ys-thumb-shadow) { animation: none; transform: none; }
  .portfolio-tile--your-space:is(:hover, :focus-visible) .ys-thumb-shadow { opacity: 0.18; }
}

.portfolio-tile__image--cinepulse { background: #1f2724; }
.cp-thumb-art { display: block; width: 100%; height: 100%; }
.cp-thumb-film, .cp-thumb-archive, .cp-thumb-play, .cp-thumb-spark {
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cp-thumb-film { transform-origin: 818px 578px; }
.cp-thumb-archive { transform-origin: 956px 375px; }
.cp-thumb-play { transform-origin: 230px 634px; }
.cp-thumb-spark { transform-origin: 746px 342px; }
.portfolio-tile--cinepulse:hover .cp-thumb-film,
.portfolio-tile--cinepulse:focus-visible .cp-thumb-film { transform: translate(-8px, -9px) rotate(-1.5deg); }
.portfolio-tile--cinepulse:hover .cp-thumb-archive,
.portfolio-tile--cinepulse:focus-visible .cp-thumb-archive { transform: translate(7px, -8px) rotate(2deg); }
.portfolio-tile--cinepulse:hover .cp-thumb-play,
.portfolio-tile--cinepulse:focus-visible .cp-thumb-play { transform: translateY(-5px) scale(1.04); }
.portfolio-tile--cinepulse:hover .cp-thumb-spark,
.portfolio-tile--cinepulse:focus-visible .cp-thumb-spark { transform: scale(1.09); }
@media (prefers-reduced-motion: reduce) {
  .cp-thumb-film, .cp-thumb-archive, .cp-thumb-play, .cp-thumb-spark { transition: none; }
  .portfolio-tile--cinepulse:is(:hover, :focus-visible) :is(.cp-thumb-film, .cp-thumb-archive, .cp-thumb-play, .cp-thumb-spark) { transform: none; }
}

.portfolio-tile__image--frame { background: #eee8f5; }
.fs-thumb-art { display: block; width: 100%; height: 100%; }
.fs-thumb-board,
.fs-thumb-lens,
.fs-thumb-backplate,
.fs-thumb-focus,
.fs-thumb-cursor,
.fs-thumb-play { transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), opacity 400ms ease; }
.fs-thumb-board { transform-origin: 800px 580px; }
.fs-thumb-lens { transform-origin: 986px 310px; }
.fs-thumb-backplate { transform-origin: 892px 372px; }
.fs-thumb-cursor { transform-origin: 720px 665px; transform: rotate(-12deg); }
.fs-thumb-play { transform-origin: 341px 625px; }
.portfolio-tile--frame:hover .fs-thumb-board,
.portfolio-tile--frame:focus-visible .fs-thumb-board { transform: translate(-8px, -9px) rotate(-1.5deg); }
.portfolio-tile--frame:hover .fs-thumb-lens,
.portfolio-tile--frame:focus-visible .fs-thumb-lens { transform: translate(8px, -10px) scale(1.04); }
.portfolio-tile--frame:hover .fs-thumb-backplate,
.portfolio-tile--frame:focus-visible .fs-thumb-backplate { transform: rotate(2deg); }
.portfolio-tile--frame:hover .fs-thumb-cursor,
.portfolio-tile--frame:focus-visible .fs-thumb-cursor { transform: translate(-16px, -22px) rotate(-18deg); }
.portfolio-tile--frame:hover .fs-thumb-play,
.portfolio-tile--frame:focus-visible .fs-thumb-play { transform: scale(1.05); }
.portfolio-tile--frame:hover .fs-thumb-focus,
.portfolio-tile--frame:focus-visible .fs-thumb-focus { opacity: 0.65; }
@media (prefers-reduced-motion: reduce) {
  .fs-thumb-board, .fs-thumb-lens, .fs-thumb-backplate,
  .fs-thumb-focus, .fs-thumb-cursor, .fs-thumb-play { transition: none; }
  .portfolio-tile--frame:hover .fs-thumb-board,
  .portfolio-tile--frame:focus-visible .fs-thumb-board,
  .portfolio-tile--frame:hover .fs-thumb-lens,
  .portfolio-tile--frame:focus-visible .fs-thumb-lens,
  .portfolio-tile--frame:hover .fs-thumb-backplate,
  .portfolio-tile--frame:focus-visible .fs-thumb-backplate,
  .portfolio-tile--frame:hover .fs-thumb-play,
  .portfolio-tile--frame:focus-visible .fs-thumb-play { transform: none; }
  .portfolio-tile--frame:hover .fs-thumb-cursor,
  .portfolio-tile--frame:focus-visible .fs-thumb-cursor { transform: rotate(-12deg); }
}

@media (min-width: 1024px) {
  .home-more-work .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .home-more-work .portfolio-tile {
    min-width: 0;
  }

  .home-more-work .portfolio-tile:last-child:nth-child(3n + 1) {
    grid-column: 2;
  }
}

@media (min-width: 768px) {
  .portfolio-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .home-page .home-hero--canvas {
    min-height: min(72svh, 36rem);
    padding: 7.5rem 1.25rem 2.75rem;
  }
  .home-hero-name { font-size: clamp(2.6rem, 17vw, 6rem); }
  .home-hero-first-name { margin-bottom: 0.15em; }
  .home-hero-role {
    max-width: 18rem;
    margin: 1.15em auto 0;
    font-size: clamp(1.15rem, 5.5vw, 1.8rem);
    line-height: 1.15;
    text-wrap: balance;
  }
  .home-hero-details { margin-top: 3.5rem; gap: 1rem; font-size: 0.65rem; }
  .home-hero-work-link { gap: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-projects-link, .home-hero-work-link svg { transition: none; }
  .home-hero-first-name, .home-hero-surname, .home-hero-role,
  .home-hero-selection-frame, .home-hero-selection-handles,
  .home-hero-selection-cursor, .home-hero-details { animation: none; }
}
