*,
*::before *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: black;
  color: white;
  font-family: "Inter";
  font-weight: 300;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 300;
  margin: 0;
  transition: filter 0.5s ease;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 3rem;
  margin: 0;
  margin-right: 2rem;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: white;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

nav a:hover,
nav a:focus {
  color: lightblue;
  outline: none;
}

/* Main section: */

h2 {
  font-size: 3rem;
  font-weight: 800;
  padding-bottom: 0;
  margin-bottom: 0;
}

.portfolio-side:hover h2 {
  background-color: black;
  padding: 1rem;
}

#portfolio-section {
  display: flex;
  justify-content: center;
  margin: 1rem;
}

.portfolio-side {
  position: relative;
  width: 500px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

#coding-projects::before {
  background-image: url("/images/portfolio/coding-image.jpg");
}

#art-and-web-design::before {
  background-image: url("/images/portfolio/art-image.jpg");
}

.portfolio-side:hover::before {
  opacity: 1;
}

.portfolio-side h2 {
  position: relative;
  z-index: 1;
}

/* Footer: */

footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #222;
}

footer a {
  color: #777;
  text-decoration: underline;
}

footer a:hover,
footer a:focus {
  color: lightblue;
  outline: none;
}

/* Small screens: */
@media (max-width: 700px) {
  nav ul {
    display: none;
  }
}
