:root {
  --bg-color: white;
  --bg-hover: #aacfb7;
}

* {
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--bg-color);
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: 84px 1fr 84px;
  grid-template-columns: 1fr;
  height: 100svh;
  max-width: 1400px;
  margin: 0 auto;
}

:focus {
  outline: 2px solid var(--bg-hover);
}

header {
  padding: 16px 24px;
  grid-area: header;
  height: fit-content;
}

main {
  grid-area: main;
  padding: 16px 24px;
}

footer {
  padding: 24px;
  grid-area: footer;
}

.main-grid {
  display: grid;
  align-items: center;
  justify-items: center;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  margin: auto;
  gap: 48px;
}

.project-grid {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: auto;
  gap: 56px;
  text-align: left;
  padding-top: 24px;
  padding-bottom: 64px;
}

#contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#contact fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#contact input {
  border: 1px solid black;
  border-radius: 8px;
  padding: 8px;
}

@media screen and (min-width: 768px) {
  header {
    padding: 24px 128px;
    grid-area: header;
  }

  footer {
    padding: 24px 128px;
    grid-area: footer;
  }

  .main-grid {
    display: grid;
    align-items: center;
    justify-items: center;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    padding: 128px;
    margin: auto;
    gap: 32px;
  }

  .project-grid {
    display: grid;
    align-items: start;
    justify-items: start;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 0.2fr 1fr;
    padding: 128px;
    margin: auto;
    gap: 32px;
    row-gap: 64px;
  }
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 24px;
  padding-bottom: 64px;
}

.about-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media screen and (min-width: 768px) {
  .about-grid {
    padding: 64px 128px;
    gap: 56px;
  }

  .about-entry {
    grid-template-columns: 220px 1fr;
    gap: 128px;
    align-items: start;
  }
}

.project-detail {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 24px;
  padding-bottom: 64px;
}

@media screen and (min-width: 768px) {
  .project-detail {
    padding: 64px 128px;
    gap: 64px;
  }
}

#home .main-grid {
  animation: fadein 1s linear 300ms 1 forwards;
  opacity: 0;
}

@keyframes fadein {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
