:root {
  --semi-transparent: .6;
  --border-radius: 0.25rem;
  --gutter: .9rem;
  --half-gutter: calc(var(--gutter)*.5);
  --quarter-gutter: calc(var(--gutter)*.25);
}

.box {
  padding: var(--half-gutter);
  background-color: #FFFFFF11;
  border-radius: var(--border-radius);
}

.spacer {
  flex-grow: 1;
}

body {
  display: flex;
  flex-direction: column;
  width: 100w;
  min-height: 100vh;
  position: relative;
  font-family: 'Chakra Petch', sans-serif;
  color: #FFFFFF;
  text-align: center;
  background-image: url(../img/background_small.jpg);
  background-size: cover;
}

#darkening {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #00000099;
}

header,
main,
footer {
  position: relative;
}

/* Header */
header {
  box-sizing: border-box;
  width: 100%;
  padding: var(--half-gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--quarter-gutter);
}

#header-title-and-links {
  display: flex;
  max-width: 100%;
  gap: inherit;
  align-items: stretch;
}

#header-title {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1,
h2 {
  font-size: 1em;
  margin: var(--quarter-gutter) 0;
}

h1 {
  font-weight: bold;
  text-transform: uppercase;
}

#header-links {
  display: flex;
  flex-wrap: wrap;
  flex-grow: 1;
  gap: 0.5em;
  justify-content: space-evenly;
  align-content: space-evenly;
}

.header-links__link {
  text-decoration: none;
  color: inherit;
  font-size: 0.75em;
}

.header-links__link>img {
  width: var(--gutter);
  margin-bottom: 0.25em;
  transition: all 0.2s;
}

.header-links__link:hover>img {
  scale: 1.15;
  transition: all 0.2s;
}

/* Buttons */
button {
  background-color: #FFFFFF44;
  border: 1px solid #FFFFFF;
  color: #FFFFFF;
  border-radius: 100vmax;
  padding: 0.4rem;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

button * {
  pointer-events: none;
}

button:hover {
  scale: 1.05;
  transition: all 0.2s;
}

button img {
  height: 1.2rem;
}

.button--off {
  background-color: #FFFFFF00;
  border: 1px solid #FFFFFF44;
  color: #FFFFFF44;
  filter: grayscale(1.0);
  transition: all 0.2s;
}

/* Filter */
#filter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  cursor: pointer;
}

#filter-header {
  display: flex;
  padding: 0 2rem;
  align-items: center;
}

#filter-header__expand {
  height: 1rem;
  transition: all 0.2s;
  margin-right: 0.5em;
}

.filter-header__expand--off {
  rotate: -90deg;
  transition: all 0.2s;
}

#filter-header__master-toggle {
  z-index: 1;
}

#filter-buttons {
  margin-top: var(--half-gutter);
  font-size: 0.9em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
  align-items: center;
  align-content: flex-start;
}

#filter-buttons.filter-buttons--hidden {
  display: none
}

/* Project */
#projects {
  margin: var(--half-gutter) var(--half-gutter);
  justify-content: space-evenly;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--half-gutter);
}

.project {
  box-sizing: border-box;
  flex-basis: 35rem;
  height: 25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
}

.project--hidden {
  display: none;
}

.project-main {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  transition: all 0.5s;
}

.project-main:hover .project-image {
  filter: blur(1.5px) brightness(0.1);
  transition: all 0.2s;
}

.project-details {
  opacity: 0.0;
  border: 1px solid #FFFFFF00;
  border-radius: var(--border-radius);
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--half-gutter);
  padding: var(--half-gutter);
  text-align: center;
  transition: all 0.2s;
}

.project-details__title {
  font-size: 1.2rem;
  font-weight: bold;
}

.project-main:hover .project-details {
  opacity: 1.0;
  border-color: #FFFFFF55;
  transition: opacity 0.2s;
}

.project-details-buttons {
  display: flex;
  justify-content: space-around;
}

.project-details-buttons a {
  text-decoration: none;
}

.project-footer {
  background-color: #00000055;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: .5em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em;
}

.project-footer__title {
  text-align: left;
  flex-grow: 1;
}

.project-technos {
  display: flex;
  gap: 0.2em;
}

.project-techno {
  height: 1.25em;
  position: relative;
}

.project-techno__tooltip {
  pointer-events: none;
  position: absolute;
  z-index: 1;
  height: 1em;
  background-color: #000000CC;
  padding: 0.25em;
  border-radius: var(--border-radius);
  top: 150%;
  right: 50%;
  opacity: 0;
  scale: 0.7;
  transition: all 0.2s;
}

.project-techno:hover .project-techno__tooltip {
  visibility: visible;
  opacity: 100;
  scale: 1.0;
  transition: all 0.1s;
}

.project-techno__icon {
  height: 100%;
  filter: grayscale();
  transition: all 0.2s;
}

.project-techno__icon--active {
  filter: grayscale(0.0);
  transition: all 0.2s;
}


/* Footer */
footer {
  margin-top: var(--gutter);
  box-sizing: border-box;
  width: 100%;
  padding: var(--gutter);
  font-size: 0.8rem;
  color: #CCCCCC;
  text-shadow: #000000 0 0 0.25em;
}

footer a {
  color: inherit;
}

@media (min-width: 600px) {
  :root {
    --gutter: 1.25rem;
  }

  #header-title {
    flex-direction: row;
    gap: 0.5em;
  }

  #header-title h1::before {
    content: "| ";
  }
}

@media (min-width: 1000px) {

  :root {
    --gutter: 1.5rem;
  }

  body {
    background-image: url(../img/background_medium.jpg);
  }

  header {
    flex-direction: row;
  }

  #header-title-and-links {
    flex-direction: row;
    max-width: fit-content;
  }

  #header-title {
    flex-direction: column;
  }

  #header-title h1::before {
    content: "";
  }

  #filter {
    margin-left: var(--gutter);
  }

  #filter-buttons {
    margin-left: 2em;
  }

}

@media (min-width: 1400px) {
  :root {
    --gutter: 2rem;
  }

  body {
    background-image: url(../img/background.jpg);
  }

  #header-title-and-links {
    flex-direction: row;
  }

}