@font-face {
    font-family: 'Nothing You Could Do';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/nothing-you-could-do.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --color-bg: #292929;;
    --color-bg-animation: #3d3d3d;
    --color-bg-loaded: #2b2b2b;
    --color-bg-lightbox: #111111;
    --color-fg: #fff;
    --color-fg-sidenote: #666666;
    --border-radius-small: 1vw;
    --border-radius-big: 4px;
    --color-video-indicator: #fff;
    --color-video-indicator-shadow: #000;
    --color-lightbox-shadow: rgba(0,0,0,1);
}

@media (prefers-color-scheme: light) {
	:root {
        --color-bg: #fff;;
        --color-bg-animation: #dfdfdf;
        --color-bg-loaded: #fafafa;
        --color-bg-lightbox: #ffffff;
        --color-fg: #656565;
        --color-fg-sidenote: #8c8c8c;
        --color-video-indicator: var(--color-fg-sidenote);
        --color-video-indicator-shadow: rgba(255, 255, 255, 0);
        --color-lightbox-shadow: rgba(0,0,0,0.3);
	}
}

@media (min-width: 914px) { 
    :root {
        --border-radius-small: 9px;
    }
}

html, body {
    color-scheme: light dark;
    margin: 0;
    background-color: var(--color-bg);
    font-family: "Nothing You Could Do", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--color-fg);
    text-align: center;
}

h1 {
    margin: 3rem 0 0.4rem 0;
    font-size: 3em;
}
#author {
    font-size: 1.2em;
    margin: 0.4rem 0 2rem 0;
}

.pswp--custom.pswp {
  --pswp-bg: var(--color-bg-lightbox);
  --pswp-icon-stroke-width: 0px;
}

.pswp--custom .pswp__button.pswp__hide-on-close,
.pswp--custom .pswp__hide-on-close .pswp__button {
    opacity: 0.3;
}
.pswp--custom .pswp__button:hover, .pswp--custom .pswp__button:active, .pswp--custom .pswp__button:focus {
    opacity: 1;
}
.pswp--custom .pswp__counter {
    font-size: 1.2em;
    color: var(--color-fg);
}
.pswp--custom .pswp__img,
.pswp--custom .pswp__item video {
    border-radius: var(--border-radius-big);
}
.pswp--custom .pswp__img:not(.pswp__img--placeholder),
.pswp--custom .pswp__item video {
    animation-duration: 2s;
    animation-name: animate-fadein-boxshadow;
    animation-delay: 0.5s;
    animation-fill-mode: backwards;

    box-shadow: 0px 0px 25px 0px var(--color-lightbox-shadow);
}

@keyframes animate-fadein-boxshadow {
    0% { box-shadow: 0px 0px 0px 0px var(--color-lightbox-shadow); }
    70% { box-shadow: 0px 0px 40px 0px var(--color-lightbox-shadow); }
    80% { box-shadow: 0px 0px 25px 0px var(--color-lightbox-shadow); }
    90% { box-shadow: 0px 0px 30px 0px var(--color-lightbox-shadow); }
    100% { box-shadow: 0px 0px 25px 0px var(--color-lightbox-shadow); }
}


.pswp--custom .pswp__icn {
    fill: var(--color-fg);
    color: var(--color-bg); 
}
 
.pswp--custom  .pswp__button--arrow--prev .pswp__icn {
    left: 0;
}
.pswp--custom  .pswp__button--arrow--next .pswp__icn {
    right: 0;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: 2em;
    padding-bottom: calc(2em + env(safe-area-inset-bottom));
    padding-top: env(safe-area-inset-top);
}

.gallery a {
    display: block;
    width: 28vw;
    height: 28vw;
    overflow: hidden;
    border-radius: var(--border-radius-small);
    margin: 2vw;
	background: linear-gradient(-45deg, var(--color-bg-animation), var(--color-bg), var(--color-bg-animation), var(--color-bg));
	background-size: 400% 400%;
	animation: gradient 12s ease infinite;
    transition: transform ease-out 0.4s;
    position: relative;
}
.gallery a.w2 {
    width: calc(28vw * 2 + 2vw * 2);
}
.gallery a.loaded {
    background: var(--color-bg-loaded);
}


@media (min-width: 914px) {
    .gallery a {
        width: 256px;
        height: 256px;
        margin: 18px;
    }
    .gallery a.w2 {
        width: calc(256px * 2 + 18px * 2);
    }
}

.gallery a:hover {
    transform:scale(1.04);
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity ease-in 0.5s;
}
.gallery img[data-loaded=true] {
    opacity: 1;
}

.gallery .play-button {
    position: absolute;
    left: 40%;
    right: 40%;
    top: 40%;
    bottom: 40%;
    width: 20%;
    height: 20%;
}
.gallery .play-button path {
    fill: var(--color-bg);
}


.pswp__caption {
    font-size: 1em;
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    color: var(--color-fg-sidenote);
    width: 94vw;
}

.loader {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader svg {
    max-width: 50px;
    width: 15vw;
}

.video-pos-indicator {
    height: var(--border-radius-big);
    left: 1px;
    border-radius: 0 0 var(--border-radius-big) var(--border-radius-big);
    overflow: hidden;
    position: absolute;
    z-index: 2;
}
.video-pos-indicator-inner {
    position: absolute;
    bottom: 0;
    height: 0.3vh;
    background-color: var(--color-video-indicator);
    box-shadow: 5px 5px 5px 3px var(--color-video-indicator-shadow);
    transition: width linear 0.4s;
}

@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}


