.motion-toggle[hidden], .work-picker[hidden], .project[hidden] { display: none; }

.hero-photo { isolation: isolate; }
.hero-photo .image-label { z-index: 2; }
.hero-light {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 48%), rgb(255 227 157 / .23), transparent 52%),
    linear-gradient(112deg, transparent 26%, rgb(249 221 149 / .17) 49%, transparent 72%);
  background-size: auto, 215% 100%;
}
.motion-toggle {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  min-height: 44px;
  padding: .4rem .82rem;
  border: 1px solid var(--light-muted);
  border-radius: 100px;
  background: var(--forest-deep);
  color: var(--light-text);
  font-size: .81rem;
  font-weight: 650;
}
.motion-toggle[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.motion-toggle-icon { width: .64rem; height: .68rem; border-inline: .15rem solid currentColor; }
.motion-toggle[aria-pressed="true"] .motion-toggle-icon {
  width: 0;
  border-width: .34rem 0 .34rem .56rem;
  border-style: solid;
  border-color: transparent transparent transparent currentColor;
}

.is-interactive { display: grid; gap: clamp(1.3rem, 3vw, 3rem); }
.is-interactive .project-grid { display: block; min-width: 0; }
.is-interactive .project .project-photo { width: 100%; min-height: 0; aspect-ratio: 1.64; }
.is-interactive .project figcaption { padding-top: .85rem; }
.is-interactive .project figcaption h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.work-picker { min-width: 0; align-self: start; }
.work-picker-label { color: var(--light-muted); margin-bottom: .55rem; font-size: .9rem; }
.work-options { display: grid; }
.work-option {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 64px;
  padding: .48rem .7rem;
  border: 0;
  border-top: 1px solid rgb(255 255 255 / .26);
  background: transparent;
  color: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}
.work-option:last-child { border-bottom: 1px solid rgb(255 255 255 / .26); }
.work-option img { width: 3.1rem; height: 3.1rem; object-fit: cover; }
.work-option strong, .work-option small { display: block; }
.work-option small { color: var(--light-muted); font-size: .82rem; }
.work-option[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.work-option[aria-pressed="true"] small { color: inherit; }
.work-option[aria-pressed="false"]:hover { background: var(--forest); }
.work-option:focus-visible { outline-color: var(--light-text); outline-offset: -3px; }
.work-option[aria-pressed="true"]:focus-visible { outline-color: var(--accent-ink); }

@media (min-width: 800px) {
  .is-interactive { grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr); }
  .work-option { grid-template-columns: 3.9rem minmax(0, 1fr); padding: .72rem; }
  .work-option img { width: 3.9rem; height: 3.9rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-on.motion-intro .hero h1 span { animation: hero-type-in 720ms cubic-bezier(.18,.75,.22,1) both; }
  .motion-on.motion-intro .hero h1 span:nth-child(2) { animation-delay: 120ms; }
  .motion-on.motion-intro .hero-details { animation: content-in 650ms 155ms cubic-bezier(.18,.75,.22,1) both; }
  .motion-on.motion-intro .hero-photo { animation: hero-frame-in 1s 140ms cubic-bezier(.2,.68,.22,1) both; }
  .motion-on .hero-photo img { transform: translate3d(var(--hero-shift-x, 0), var(--hero-shift-y, 0), 0) scale(1.13); transition: transform 220ms ease-out; }
  .motion-on .hero-light { display: block; animation: dappled-light 12s ease-in-out infinite alternate; }
  .motion-on .motion-arrival { animation: content-in 620ms cubic-bezier(.18,.75,.22,1) both; }
  .motion-on .project-enter .project-photo { animation: project-in 530ms cubic-bezier(.18,.75,.22,1) both; }
  .motion-on .project-enter figcaption { animation: content-in 430ms cubic-bezier(.18,.75,.22,1) both; }
  .motion-on .button, .motion-on .work-option { transition: transform 180ms ease-out, background-color 180ms ease-out; }
  .motion-on .button:active { transform: translateY(2px) scale(.98); }
  @media (hover: hover) {
    .motion-on .button:hover { transform: translateY(-3px); }
  }
}

@keyframes hero-type-in {
  from { opacity: .18; clip-path: inset(95% -8% -36% -8%); transform: translateY(.3em); }
  to { opacity: 1; clip-path: inset(-20% -8% -36% -8%); transform: translateY(0); }
}
@keyframes hero-frame-in {
  from { opacity: .5; clip-path: inset(11% 8% 0); }
  to { opacity: 1; clip-path: inset(0); }
}
@keyframes content-in {
  from { opacity: .38; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dappled-light {
  from { opacity: .25; background-position: center, 0 50%; }
  to { opacity: .88; background-position: center, 100% 50%; }
}
@keyframes project-in {
  from { opacity: .45; clip-path: inset(0 6% 0 0); }
  to { opacity: 1; clip-path: inset(0); }
}
