* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --magenta: 147, 14, 78;
  --lightgrey: 223, 223, 223;
  --almostblack: 29, 29, 29;
}

body {
  min-height: 100vh;

  font-family: "Inter", Helvetica, sans-serif;
  text-align: center;
  color: var(--almostblack);

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5vh;
}

.container {
  padding: 0 2rem;
  margin: auto;
  max-width: 54.5rem;

  transition: all linear 0.25s;
}

a,
a:active,
a:visited {
  text-decoration: none;
  color: rgb(var(--almostblack));
}

.small-text {
  font-size: 0.9rem;
  color: rgba(var(--almostblack), 0.6);
}

/* --- Custom animations --- */

@keyframes bounce {
  50% {
    transform: translateY(-5%);
  }
}

/* --- Header --- */
header,
header div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

header {
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

header img {
  width: 30px;
}

header a:hover {
  color: rgb(var(--magenta));
  font-weight: 700;
}

/* --- Footer --- */
footer,
footer div {
  display: flex;
  align-items: center;
}

footer {
  padding: 2rem;
  justify-content: space-between;
  gap: 2rem;
}

footer div {
  gap: 0.5rem;
}

/* --- Home > Hero Section --- */
.hero {
  text-align: left;

  display: flex;
  flex-wrap: wrap;
  gap: 3rem 5rem;
  align-items: flex-end;
  justify-content: center;
}

.hero-image {
  position: relative;
}

.hero-image img:last-child {
  position: absolute;
  right: -3.5rem;
  top: 3rem;
  filter: drop-shadow(0 0.2rem 0.1rem rgba(var(--almostblack), 0.5));
  animation: bounce 1.5s infinite;
}

.hero-text {
  line-height: 2rem;
}

.hero-text h2 {
  margin-bottom: 1rem;
}

.hero-text p:last-of-type {
  margin-bottom: 2rem;
}

.hero-text span {
  color: rgb(var(--lightgrey));
  cursor: pointer;

  transition: padding ease-out 80ms;
}
.hero-text span:hover {
  color: white;
  background-color: rgb(var(--magenta));
  padding: 0.2rem 0rem;
}

/* --- Home > Tools section --- */

.feature-bar,
.feature-bar > div {
  display: flex;
  flex-wrap: wrap;
}

.feature-bar {
  margin: 5rem 0;
  justify-content: space-between;
  align-items: center;
  gap: 2rem 3rem;
}

.feature-bar > div {
  gap: 1.5rem 2rem;
}

.feature-bar p::before {
  display: inline-block;
  margin-right: 0.5rem;
  content: "";
  width: 1rem;
  height: 1rem;
}
.feature-bar p:nth-of-type(1)::before {
  background: url("assets/icon-figma.png") no-repeat 0 0;
  background-size: contain;
}
.feature-bar p:nth-of-type(2)::before {
  background: url("assets/icon-html.png") no-repeat 0 0;
  background-size: contain;
}

.feature-bar p:nth-of-type(3)::before {
  background: url("assets/icon-css.png") no-repeat 0 0;
  background-size: contain;
}
.feature-bar p:nth-of-type(4)::before {
  background: url("assets/icon-js.png") no-repeat 0 0;
  background-size: contain;
}
.feature-bar p:nth-of-type(5)::before {
  background: url("assets/icon-python.png") no-repeat 0 0;
  background-size: contain;
}
.feature-bar p:nth-of-type(6)::before {
  background: url("assets/icon-postgresql.png") no-repeat 0 0;
  background-size: contain;
}

/* --- Home > Projects section --- */

.projects {
  margin-bottom: 2.5rem;
}

.projects h2 {
  margin-bottom: 1.5rem;
}

.projects > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.projects > div > div {
  flex: 1 1 0;
  min-width: 14rem;

  position: relative;
}

.projects > div > div > p {
  margin-bottom: 1rem;
}

.project-card {
  border-radius: 0.5rem;
  color: white;
  transition: transform ease-in-out 100ms;
}

.project-card:hover {
  transform: translateY(-0.3rem);
  box-shadow: 0 0.3rem 0.3rem rgba(var(--almostblack), 0.3);
}

.project-card img {
  height: auto;
  width: 100%;
  object-fit: cover;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.project-card p {
  padding: 1rem;
}

.projects > div > div:nth-of-type(1) .project-card {
  background-color: rgb(81, 100, 84);
}

.projects > div > div:nth-of-type(2) .project-card {
  background-color: rgb(118, 170, 178);
}

.projects > div > div:nth-of-type(3) .project-card {
  background-color: rgb(234, 120, 105);
}

/* --- About > Artifacts section --- */

.container > .small-text {
  margin-top: 1rem;
}

.container-artifacts {
  margin: 2rem 0 3rem;
  padding: 1rem;

  background-color: rgba(var(--almostblack), 0.05);
  border-radius: 0.7rem;

  display: flex;
  justify-content: center;
  cursor: pointer;
}

.container-artifacts p {
  font-size: 0.7rem;
  margin-top: 0.4rem;
}

h2 span {
  font-weight: normal;
}

.container-artifacts > div:first-child,
.container-artifacts > div:last-child {
  display: flex;
}

.artifact-2,
.artifact-4 {
  align-self: self-start;
}
.artifact-3,
.artifact-1,
.artifact-5 {
  align-self: self-end;
}

.artifact-1,
.artifact-2,
.artifact-4,
.artifact-5 {
  width: 50%;
}

.artifact-1 {
  animation: bounce 2.5s infinite;
  transform: rotate(5deg);
}
.artifact-2 {
  animation: bounce 2.3s infinite;
}
.artifact-4 {
  animation: bounce 2.5s infinite;
}
.artifact-5 {
  animation: bounce 2.3s infinite;
  transform: rotate(-5deg);
}
.artifact-1 img:hover,
.artifact-2 img:hover,
.artifact-4 img:hover,
.artifact-5 img:hover {
  transform: scale(250%);
}
/* --- About > Map section --- */
.map {
  margin-top: 2rem;
  border-radius: 0.7rem;
}
/* --- Play > Projects section --- */

.projects > p {
  margin-bottom: 3rem;
  line-height: 1.5rem;
}

.play .project-card p {
  font-weight: 700;
}

.play > div > div:nth-of-type(1) > .project-card {
  background-color: rgb(241, 241, 241);
  color: rgb(var(--almostblack));
}
.play > div > div:nth-of-type(2) > .project-card {
  background-color: rgb(176, 195, 175);
}
.play > div > div:nth-of-type(3) > .project-card {
  background-color: rgb(70, 56, 46);
}

.play > div > div:not(:first-of-type) a,
.play > div > div:not(:first-of-type) a:active,
.play > div > div:not(:first-of-type) a:visited {
  color: white;
}
/* -- Adjustments for smaller screens -- */

@media (max-width: 430px) {
  html {
    font-size: 12px;
  }

  .hero-image img:last-child {
    width: 9rem;
    right: -1.5rem;
    top: 5rem;
  }
}
@media (max-width: 985px) {
  .container {
    max-width: 30.625rem;
  }

  .feature-bar {
    margin: 0 0 2.5rem 0;
  }

  .projects h2 {
    text-align: left;
  }
  .projects p {
    text-align: left;
  }

  .container-artifacts > div:first-child,
  .container-artifacts > div:last-child {
    flex-direction: column;
  }
  .artifact-1,
  .artifact-2,
  .artifact-4,
  .artifact-5 {
    width: 100%;
    height: 50%;
  }
}
