/* Universal border-box */
html {
  box-sizing: border-box;
  font-size: 18px;
  --screenshots-per-row: 2;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}

/* Basis & Grid op body */
body {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #f2e6d5;
  background-color: #672222;
  max-width: 88rem;
  margin: 0 auto;
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  gap: 1rem;
  padding: 1rem;
}

/* body:before {
  content: "";
  background-color: transparent;
  
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 182px;
  opacity: 0.1;
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  /* background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); */
/* } */

body h1 {
  font-size: 3rem;
}

/* body {
  background-image: url("images/67.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
} */

img.portret:hover {
  /* animation: tilt-shaking 0.1s infinite; */
  /* animation: horizontal-shaking 0.1s infinite; */
  animation: skew-x-shaking 5s infinite;
  animation: skew-y-shaking 5s infinite;
}

@keyframes skew-x-shaking {
  0% {
    transform: skewX(-15deg);
  }
  5% {
    transform: skewX(15deg);
  }
  10% {
    transform: skewX(-15deg);
  }
  15% {
    transform: skewX(15deg);
  }
  20% {
    transform: skewX(0deg);
  }
  100% {
    transform: skewX(0deg);
  }
}

@keyframes skew-y-shaking {
  0% {
    transform: skewY(-15deg);
  }
  5% {
    transform: skewY(15deg);
  }
  10% {
    transform: skewY(-15deg);
  }
  15% {
    transform: skewY(15deg);
  }
  20% {
    transform: skewY(0deg);
  }
  100% {
    transform: skewY(0deg);
  }
}

img {
  max-width: 100%;
  border-radius: 0.5rem;
}

a {
  color: #f2e6d5;
  text-decoration: none;
}

main a {
  color: #c49a6c;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

/* a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f3efe6;
  outline-offset: 3px;
} */

/* Header & Footer */
header {
  grid-area: header;
  border-radius: 0.5rem;
  background-color: #3b1717;
}

footer {
  grid-area: footer;
  /* padding: 1rem; */
  padding-top: 1rem;
  text-align: center;
}

main {
  grid-area: main;
  padding: 0.5rem;
}

section {
  border-bottom: 2px solid #c49a6c;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

section.contact {
  background-color: #3b1717;
  border-radius: 0.5rem;
  max-width: 34rem;
}

/* Menu */
nav.menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3b1717;
  border-radius: 0.5rem;
}

nav ul {
  margin: 0;
  padding: 0.75rem 1rem;
  list-style: none;
}

nav h1 {
  margin: 0;
  /* padding: 0.75rem 1rem; */
  padding-right: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  float: right;
  margin-top: 0;
}

nav ul li {
  display: inline-block;
  margin-right: 1rem;
}

nav a:hover {
  color: #a65e50;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

nav a.actief {
  color: #f2e6d5;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

header a {
  color: #d8c4aa;
  font-weight: 600;
}

header a:focus-visible {
  outline-color: #121826;
}

/* Tekst */
main h1,
main h2 {
  margin: 0.5rem;
}

main p,
main ul,
main ol {
  margin: 0.5rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr);
  grid-template-areas:
    "heading portrait"
    "copy portrait";
  gap: 0.25rem 2rem;
  align-items: start;
  margin: 0.5rem;
}

.hero h1 {
  grid-area: heading;
  margin-bottom: 0;
}

.hero p {
  grid-area: copy;
  margin-top: 0;
}

.hero figure {
  grid-area: portrait;
  margin: 0;
}

.projects {
  text-align: center;
}

.button {
  display: inline-block;
  background-color: #c49a6c;
  color: #f2e6d5;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  margin: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

main a.button {
  color: #121826;
  text-decoration: none;
}

form {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
  margin: 0.5rem;
}

label {
  display: grid;
  gap: 0.25rem;
  font-weight: 600;
}

input,
textarea {
  font: inherit;
  padding: 0.7rem;
  border: 0;
  border-radius: 0.5rem;
  background-color: #a65e50;
  color: #f2e6d5;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0.5rem;
}

.card,
.blok {
  background-color: #3b1717;
  border-radius: 0.5rem;
}

.card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* -----------------------Animation--------------------------------- */
main {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-in-up 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

nav ul li:hover,
.button:hover {
  animation: size-up 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes size-up {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Skip the animation and show the card immediately. */
  .card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.card h2,
.card p {
  margin: 0;
}

.blok {
  padding: 1rem 1.25rem;
  margin: 1rem 0.5rem;
}

.blok h2 {
  margin: 0 0 0.5rem;
}

.blok p,
.blok ul,
.blok ol {
  margin: 0.5rem 0;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: auto 0 0;
}

.tags li {
  border: 1px solid #f3efe6;
  border-radius: 99rem;
  padding: 0 0.75rem;
  font-size: 0.85rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.screenshot-grid > h2 {
  grid-column: 1 / -1;
}

.screenshot-grid > figure.screenshot:only-of-type {
  grid-column: 1 / -1;
}

figure.screenshot {
  min-width: 0;
  margin: 0;
}

figcaption {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
