362362 z-index : 2 ;
363363}
364364
365+ .crumple-video {
366+ position : absolute;
367+ top : 0 ;
368+ left : 0 ;
369+ width : 100% ;
370+ height : 100% ;
371+ object-fit : cover;
372+ opacity : 0 ;
373+ z-index : 0 ;
374+ clip-path : polygon (0 100% , 0 100% , 0 100% , 0 100% , 0 100% , 0 100% );
375+ }
376+
377+ .crumple-video--writings {
378+ z-index : 1 ;
379+ }
380+
381+ .crumple-video--alhambra {
382+ z-index : 1 ;
383+ }
384+
385+ .crumple-video--playlists {
386+ z-index : 1 ;
387+ }
388+
389+ .crumple-video--instagram {
390+ z-index : 1 ;
391+ }
392+
393+ .crumple-video--github {
394+ z-index : 1 ;
395+ }
396+
365397@-webkit-keyframes circle-one {
366398 0% {
367399 -webkit-clip-path : circle (12.5vh at -12.5vh 12.5vh );
509541 z-index : 2 ;
510542 }
511543
512- body : has (.footer__link--writings : hover ) .crumple : after {
513- background-color : # 020121 ;
514- -webkit-animation : e 1s 0s linear reverse forwards; /* Changed .25s to 0s */
544+ body : has (.footer__link--writings : hover ) .crumple-video--writings {
545+ opacity : 1 ;
546+ -webkit-animation : e 1s 0s linear reverse forwards;
515547 animation : e 1s 0s linear reverse forwards;
516548 }
517549
518- body : has (.footer__link--github : hover ) .crumple : after {
550+ /* Videos for home page only */
551+ body : not (# trash ): not (# essays ): has (.footer__link--github : hover ) .crumple-video--github {
552+ opacity : 1 ;
553+ -webkit-animation : b 1s .25s linear reverse forwards;
554+ animation : b 1s .25s linear reverse forwards;
555+ }
556+
557+ body : not (# trash ): not (# essays ): has (.footer__link--playlists : hover ) .crumple-video--playlists {
558+ opacity : 1 ;
559+ -webkit-animation : c 1s .25s linear reverse forwards;
560+ animation : c 1s .25s linear reverse forwards;
561+ }
562+
563+ body : not (# trash ): not (# essays ): has (.footer__link--instagram : hover ) .crumple-video--instagram {
564+ opacity : 1 ;
565+ -webkit-animation : f 1s .25s linear reverse forwards;
566+ animation : f 1s .25s linear reverse forwards;
567+ }
568+
569+ body : not (# trash ): not (# essays ): has (.footer__link--alhambra : hover ) .crumple-video--alhambra {
570+ opacity : 1 ;
571+ -webkit-animation : d 1s .25s linear reverse forwards;
572+ animation : d 1s .25s linear reverse forwards;
573+ }
574+
575+ /* Colors for other pages (trash, writings) */
576+ body # trash : has (.footer__link--github : hover ) .crumple : after ,
577+ body # essays : has (.footer__link--github : hover ) .crumple : after {
519578 background-color : # 012118 ;
520579 -webkit-animation : b 1s .25s linear reverse forwards;
521580 animation : b 1s .25s linear reverse forwards;
522581 }
523582
524- body : has (.footer__link--playlists : hover ) .crumple : after {
583+ body # trash : has (.footer__link--playlists : hover ) .crumple : after ,
584+ body # essays : has (.footer__link--playlists : hover ) .crumple : after {
525585 background-color : # 210120 ;
526586 -webkit-animation : c 1s .25s linear reverse forwards;
527587 animation : c 1s .25s linear reverse forwards;
528588 }
529589
530- body : has (.footer__link--instagram : hover ) .crumple : after {
590+ body # trash : has (.footer__link--instagram : hover ) .crumple : after ,
591+ body # essays : has (.footer__link--instagram : hover ) .crumple : after {
531592 background-color : # 210120 ;
532593 -webkit-animation : f 1s .25s linear reverse forwards;
533594 animation : f 1s .25s linear reverse forwards;
534595 }
535596
536- body : has (.footer__link--alhambra : hover ) .crumple : after {
597+ body # trash : has (.footer__link--alhambra : hover ) .crumple : after ,
598+ body # essays : has (.footer__link--alhambra : hover ) .crumple : after {
537599 background-color : # 020121 ;
538600 -webkit-animation : d 1s .25s linear reverse forwards;
539601 animation : d 1s .25s linear reverse forwards;
540602 }
603+
604+ body # trash : has (.footer__link--home : hover ) .crumple : after ,
605+ body # essays : has (.footer__link--home : hover ) .crumple : after {
606+ background-color : # 020121 ;
607+ -webkit-animation : a 1s .25s linear reverse forwards;
608+ animation : a 1s .25s linear reverse forwards;
609+ }
610+
611+ /* Z-index for non-home pages */
612+ body # trash : has (.footer > a : hover ) .crumple ,
613+ body # essays : has (.footer > a : hover ) .crumple {
614+ z-index : 2 ;
615+ }
541616}
542617
543618@-webkit-keyframes rectangle-reveal {
@@ -589,54 +664,79 @@ body:has(.footer__link--home:hover) .crumple:after {
589664 }
590665
591666 body : has (.footer__link--writings : active ) .crumple {
592- background : # 020121 ;
667+ background : transparent ;
593668 z-index : 0 ;
594669 }
595670
596- body : has (.footer__link--writings : active ) .crumple : after {
671+ body : has (.footer__link--writings : active ) .crumple-video--writings {
672+ opacity : 1 ;
597673 -webkit-animation : e 1s .25s linear forwards;
598674 animation : e 1s .25s linear forwards;
599675 }
600676
677+ body : has (.footer__link--writings : active ) .crumple : after {
678+ background-image : none;
679+ }
680+
601681 body : has (.footer__link--github : active ) .crumple {
602- background : # 012118 ;
682+ background : transparent ;
603683 z-index : 0 ;
604684 }
605685
606- body : has (.footer__link--github : active ) .crumple : after {
686+ body : has (.footer__link--github : active ) .crumple-video--github {
687+ opacity : 1 ;
607688 -webkit-animation : b 1s .25s linear forwards;
608689 animation : b 1s .25s linear forwards;
609690 }
610691
692+ body : has (.footer__link--github : active ) .crumple : after {
693+ background-image : none;
694+ }
695+
611696 body : has (.footer__link--playlists : active ) .crumple {
612- background : # 210120 ;
697+ background : transparent ;
613698 z-index : 0 ;
614699 }
615700
616- body : has (.footer__link--playlists : active ) .crumple : after {
701+ body : has (.footer__link--playlists : active ) .crumple-video--playlists {
702+ opacity : 1 ;
617703 -webkit-animation : c 1s .25s linear forwards;
618704 animation : c 1s .25s linear forwards;
619705 }
620706
707+ body : has (.footer__link--playlists : active ) .crumple : after {
708+ background-image : none;
709+ }
710+
621711 body : has (.footer__link--instagram : active ) .crumple {
622- background : # 210120 ;
712+ background : transparent ;
623713 z-index : 0 ;
624714 }
625715
626- body : has (.footer__link--instagram : active ) .crumple : after {
716+ body : has (.footer__link--instagram : active ) .crumple-video--instagram {
717+ opacity : 1 ;
627718 -webkit-animation : f 1s .25s linear forwards;
628719 animation : f 1s .25s linear forwards;
629720 }
630721
722+ body : has (.footer__link--instagram : active ) .crumple : after {
723+ background-image : none;
724+ }
725+
631726 body : has (.footer__link--alhambra : active ) .crumple {
632- background : # 020121 ;
727+ background : transparent ;
633728 z-index : 0 ;
634729 }
635730
636- body : has (.footer__link--alhambra : active ) .crumple : after {
731+ body : has (.footer__link--alhambra : active ) .crumple-video--alhambra {
732+ opacity : 1 ;
637733 -webkit-animation : d 1s .25s linear forwards;
638734 animation : d 1s .25s linear forwards;
639735 }
736+
737+ body : has (.footer__link--alhambra : active ) .crumple : after {
738+ background-image : none;
739+ }
640740}
641741
642742@media (hover : none) and (pointer : coarse) {
@@ -651,52 +751,77 @@ body:has(.footer__link--home:hover) .crumple:after {
651751 }
652752
653753 body : has (.footer__link--writings .mobile-trigger ) .crumple {
654- background : # 020121 ;
754+ background : transparent ;
655755 z-index : 0 ;
656756 }
657757
658- body : has (.footer__link--writings .mobile-trigger ) .crumple : after {
758+ body : has (.footer__link--writings .mobile-trigger ) .crumple-video--writings {
759+ opacity : 1 ;
659760 -webkit-animation : e 1s .25s linear forwards;
660761 animation : e 1s .25s linear forwards;
661762 }
662763
764+ body : has (.footer__link--writings .mobile-trigger ) .crumple : after {
765+ background-image : none;
766+ }
767+
663768 body : has (.footer__link--github .mobile-trigger ) .crumple {
664- background : # 012118 ;
769+ background : transparent ;
665770 z-index : 0 ;
666771 }
667772
668- body : has (.footer__link--github .mobile-trigger ) .crumple : after {
773+ body : has (.footer__link--github .mobile-trigger ) .crumple-video--github {
774+ opacity : 1 ;
669775 -webkit-animation : b 1s .25s linear forwards;
670776 animation : b 1s .25s linear forwards;
671777 }
672778
779+ body : has (.footer__link--github .mobile-trigger ) .crumple : after {
780+ background-image : none;
781+ }
782+
673783 body : has (.footer__link--playlists .mobile-trigger ) .crumple {
674- background : # 210120 ;
784+ background : transparent ;
675785 z-index : 0 ;
676786 }
677787
678- body : has (.footer__link--playlists .mobile-trigger ) .crumple : after {
788+ body : has (.footer__link--playlists .mobile-trigger ) .crumple-video--playlists {
789+ opacity : 1 ;
679790 -webkit-animation : c 1s .25s linear forwards;
680791 animation : c 1s .25s linear forwards;
681792 }
682793
794+ body : has (.footer__link--playlists .mobile-trigger ) .crumple : after {
795+ background-image : none;
796+ }
797+
683798 body : has (.footer__link--instagram .mobile-trigger ) .crumple {
684- background : # 210120 ;
799+ background : transparent ;
685800 z-index : 0 ;
686801 }
687802
688- body : has (.footer__link--instagram .mobile-trigger ) .crumple : after {
803+ body : has (.footer__link--instagram .mobile-trigger ) .crumple-video--instagram {
804+ opacity : 1 ;
689805 -webkit-animation : f 1s .25s linear forwards;
690806 animation : f 1s .25s linear forwards;
691807 }
692808
809+ body : has (.footer__link--instagram .mobile-trigger ) .crumple : after {
810+ background-image : none;
811+ }
812+
693813 body : has (.footer__link--alhambra .mobile-trigger ) .crumple {
694- background : # 020121 ;
814+ background : transparent ;
695815 z-index : 0 ;
696816 }
697817
698- body : has (.footer__link--alhambra .mobile-trigger ) .crumple : after {
818+ body : has (.footer__link--alhambra .mobile-trigger ) .crumple-video--alhambra {
819+ opacity : 1 ;
699820 -webkit-animation : d 1s .25s linear forwards;
700821 animation : d 1s .25s linear forwards;
701822 }
823+
824+ body : has (.footer__link--alhambra .mobile-trigger ) .crumple : after {
825+ background-image : none;
826+ }
702827}
0 commit comments