/* IMPORTS */
@import "fonts.css";
@import "reset.css";
@import "root.css";
@import "header.css";

/* GENERAL */
html {
  font-size: clamp(14px, 1.3vw, 20px);
}

body {
  background: var(--color-background);
  color: var(--color-black);
  font-family: "Averia Serif Libre", serif;
  font-weight: var(--font-light);
  padding: var(--spacing-4);
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

[aria-current]:not([aria-current="false"])::after {
  text-decoration: underline;
}

a {
  color: var(--color-2);
  &:visited {
    color: var(--color-gray-dark);
  }
  &:hover {
    color: var(--color-1);
  }
}

/* GRIDFLEX */
.grid {
  display: grid;
}

.columns {
  display: grid;
}

/* FIXME: overflow */
@media (max-width: 900px) {
  .col-4,
  .col-8 {
    grid-column: span 6;
  }
}

@media (min-width: 600px) {
  .columns {
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
  }
}

/* PROJECTS */

.project-title a {
  color: black;
  text-decoration: none;
  line-height: var(--leading-none);
}

.project-title a:hover {
  color: var(--color-white-off);
  transition: color var(--time-fast) ease-in-out;
}

.project-company {
  font-style: italic;
}

.pages-container__list {
  line-height: var(--leading-none);
}

.article__header {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: blur-contrast var(--time-slow);
  animation-timing-function: cubic-bezier(0.85, 0.09, 0.15, 0.91);
  & h1 {
    font-size: var(--font-size-monster);
  }
  & h2 {
    font-weight: var(--font-regular);
    font-size: var(--font-size-huge);
  }
  .meta {
    color: var(--color-gray-dark);
  }
}

.article__content {
  animation: blur-contrast var(--time-normal);
  animation-timing-function: cubic-bezier(0.36, 0, 0.64, 1);
}

@keyframes blur-contrast {
  0% {
    filter: blur(5px) contrast(1);
  }
  10% {
    filter: blur(20px) contrast(10);
  }
  80% {
    filter: blur(1px) contrast(10);
  }
  100% {
    filter: blur(0px) contrast(1);
  }
}

.content__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intro {
  font-size: 1.35rem;
  font-size: var(--font-size-large);
  line-height: var(--leading-normal);
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
}

.block-type-heading {
  font-weight: var(--font-light);
  h3 {
    line-height: var(--leading-tight);
  }
}

.credit {
  margin-top: 1rem;
  p {
    color: var(--color-gray-dark);
  }
}

@media (min-width: 600px) {
  main {
    padding-top: 15rem;
  }
  .button-svg {
    height: 12rem;
  }
  .site-header__wrapper nav {
    padding: 1rem;
  }
  .site-header__title {
    font-size: var(--font-size-monster);
  }
  .pages-container__list {
    gap: 2em;
    font-size: var(--font-size-huge);
  }
  .content__text {
    & .block-type-image,
    .block-type-gallery,
    .block-type-video {
      display: none;
    }
  }
  .projects__item,
  .projects__item-wrapper {
    display: inline-flex;
  }
  .projects__item-wrapper {
    position: relative;
    top: -0.5em;
  }
  .project-title a {
    font-size: var(--font-size-monster);
  }
  .projects__item-wrapper .projects__item-column:nth-child(2) {
    position: relative;
    top: 1em;
  }
  .projects__item-wrapper .projects__item-column:nth-child(3) {
    /* background-color: blue; */
    position: relative;
    top: 2em;
  }
  .intro {
    max-width: 70ch;
    margin: 0 auto;
  }
}

@media (max-width: 599px) {
  main {
    padding-top: 8rem;
  }
  .site-header__wrapper nav {
    padding: 0.75rem;
  }
  .site-header__title {
    font-size: 1.5rem;
  }
  .pages-container__list {
    gap: 0.75em;
    font-size: 1.3rem;
  }
  .projects__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .projects__item-wrapper {
    display: inherit;
    flex-direction: inherit;
    gap: inherit;
  }
  .project-title a {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
  }
  .content__media {
    display: none;
  }
  .project-year {
    opacity: 0.4;
  }
  .button-svg {
    height: 6rem;
  }
}

.pswp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 0.5em;
}

.pswp-gallery img {
  object-fit: cover;
  /* aspect-ratio: 1 / 1; */
}

.content__media .gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.render__container {
  max-width: 1650px;
  margin: 0 auto 4rem auto;
}

#render {
  position: absolute;
  right: 0rem;
  top: 0rem;
  background: var(--color-white-off);
  width: 100%;
  min-height: 100vh;
  display: none;
  visibility: hidden;
  opacity: 0;
  /* transform: translateY(100%);
    transition: transform var(--time-fast) ease-out,
    opacity var(--time-fast) ease-out; */
  transition-property: display opacity;
  transition-duration: 0.1s;
  transition-behavior: allow-discrete;
  padding: 1rem;
  z-index: var(--z-navigation);
}

#render.active {
  visibility: visible;
  display: block;
  opacity: 1;
  overflow-y: scroll;
  height: 100vh;

  @starting-style {
    opacity: 0;
  }
}

@media (max-width: 599px) {
  #render {
    padding: 0.75rem;
  }
}

.hide {
  display: none;
}

.loader {
  width: 100%;
  text-align: center;
  height: 100%;
  position: relative;
  transform: translateY(48%);
}

#splash {
  position: fixed;
  width: 100%;
  background: white;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: var(--z-loader);
}

.footnote a,
.footnotereverse a {
  transition: var(--color-1) var(--time-fast) var(--time-normal) linear,
    background-color var(--time-fast) var(--time-normal) linear,
    padding var(--time-fast) var(--time-normal) linear;
  color: var(--color-2);
  text-decoration: none;
  padding: 0 2px;
}

.footnote a {
  scroll-margin-top: 1rem;
}

.footnotereverse a {
  scroll-margin-top: 100px;
}

.highlight a {
  background-color: var(--color-2);
  color: var(--color-white-off);
  outline: 1px solid var(--color-2);
}

/* Lazysizes */
.blur-up {
  -webkit-filter: blur(5px);
  filter: blur(5px);
  transition: filter var(--time-normal), -webkit-filter var(--time-normal);
}

.blur-up.lazyloaded {
  -webkit-filter: blur(0);
  filter: blur(0);
}

/* ABOUT */

/* MAIN */

/* MENUBAR */
.site-header__title {
  color: var(--color-4);
  margin-left: 1rem;
  margin-top: 1rem;
  line-height: var(--leading-none);
  user-select: none;
}

.nav-group .active {
  font-weight: var(--font-bold);
}

.site-header__wrapper nav {
  margin-left: auto;
}

.button-svg {
  display: block;
}

#int__nav li,
#modal-close,
#menu-about {
  background-color: var(--color-white-off);
  transition: background-color var(--time-fast) ease-in-out;
}

#menu-about {
  fill: var(--color-3);
  &:hover {
    background-color: var(--color-gray-dark);
  }
}

/* #int__nav {
  -webkit-animation: 1s var(--ease-jump) 0s normal forwards 1 fadein;
  animation: 1s var(--ease-jump) 0s normal forwards 1 fadein;
} */

#int__nav {
  display: none;
}

@keyframes fadein {
  0% {
    opacity: 0;
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
  }
}

@-webkit-keyframes fadein {
  0% {
    opacity: 0;
  }
  66% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#modal-close {
  display: flex;
  margin-left: auto;
  fill: var(--color-2);
  &:hover {
    background-color: var(--color-background);
  }
}

button,
input[type="submit"],
input[type="reset"] {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  clip-path: rect(0px 0px 13rem calc(100% - 14rem));
  mix-blend-mode: multiply;
}

.no-scroll {
  overflow-y: hidden;
}

/* FOOTER */
footer {
  padding-top: 4em;
}

.footer-credits {
  display: inline-flex;
  height: 3rem;
}

.footer-author,
.footer-year,
.footer-description {
  opacity: 0.4;
}

.footer-author {
  align-self: end;
}

.footer-year {
  align-self: center;
}

.footer-links ul {
  display: inline-flex;
  height: 3rem;
}

.footer-links a {
  color: var(--color-black);
  text-decoration: none;
  font-weight: var(--font-regular);
}

.footer-links a:hover {
  color: var(--color-white-off);
}

.footer-link:nth-child(1) {
  align-self: end;
}
.footer-link:nth-child(2) {
  align-self: center;
}
.footer-link:nth-child(3) {
  align-self: start;
}

@media (max-width: 599px) {
  .footer__wrapper {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 600px) {
  .footer__wrapper {
    display: inline-flex;
  }
}

/* BLOCKS */
figcaption {
  text-align: center;
  color: var(--color-gray-dark);
  font-style: italic;
}

/* VIDEO */
.block-type-video {
  & video,
  iframe {
    height: auto;
    width: 100%;
  }
}

iframe,
video[data-ratio="landscape"] {
  aspect-ratio: 16 / 9;
}

video[data-ratio="portrait"] {
  aspect-ratio: 9 / 16;
}

video[data-ratio="square"] {
  aspect-ratio: 1 / 1;
}

/* ERROR */

.error-message {
  font-size: var(--font-size-huge);
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-1);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* MEDIA */
.pswp__custom-caption {
  /* background: var(--color-black); */
  font-size: 1rem;
  color: var(--color-white-off);
  width: calc(100% - 32px);
  max-width: 400px;
  padding: 2px 8px;
  border-radius: 0.25rem;
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  text-align: center;
  font-style: italic;
}
.pswp__custom-caption a {
  color: #fff;
  text-decoration: underline;
}
.hidden-caption-content {
  display: none;
}
