/*Styles for all*/
body {
  margin: 0;
  background-color: #fcfcfc;
  color: #181818;
}
main {
  min-height: 80vh;
}
p {
  margin: 0;
  padding: 0;
}
img {
  max-height: 100%;
  max-width: 100%;
}

/*Styles for header*/
div.header {
  background-color: #365256;
  padding: 20px;
  margin-bottom: 10px;
}
div.title {
  text-align: center;
}
div.title h1 {
  color: white;
  font-family: Georgia, serif;
  font-weight: normal;
  font-size: 2rem;
  margin: 0;
  display: inline;
}
div.title a {
  text-decoration: none;
  display: inline-block;
}
div.navigation-header {
  padding-top: 20px;
  gap: 10px;
  display: flex;
  justify-content: center;
}
a.navigation {
  background-color: #365256;
  color: white;
  font-family: sans-serif;
  font-size: 1.3rem;
  padding: 20px;
  margin: 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
a.navigation.active {
  background-color: #2c484c;
}
a.navigation:hover {
  background-color: #2c484c;
  transition: background-color 0.3s ease;
}
a.navigation:active {
  background-color: #223e42;
  transition: background-color 0.3s ease;
}

/*Styles for footer*/
div.footer {
  background-color: #365256;
  margin-top: 10px;
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}
div.footer p {
  color: white;
  margin: 0;
  font-size: 1rem;
}
div.navigation-footer {
  margin-left: auto;
  gap: 10px;
  display: flex;
  margin-left: auto;
}

/*Styles for content*/
div.container {
  margin: auto;
  max-width: 720px;
  padding: 20px;
}
h2 {
  font-size: 1.5rem;
  padding: 0;
  margin: 0;
  color: #181818;
  padding-bottom: 2px;
  border-bottom: 2px solid #c0c0c0;
  font-family: Georgia, serif;
}
div.container p {
  font-size: 1.3rem;
  padding: 0 10px 0 10px;
  margin: 1rem 0 1rem 0;
}
div.container li::marker {
  color: #c0c0c0;
}
div.container li {
  font-family: serif;
  font-size: 1.3em;
  padding: 0 10px 0 10px;
  margin: 1rem 0 1rem 0;
}
div.container-flex {
  margin: auto;
  max-width: 720px;
  padding: 20px 10px 20px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
div.container-flex p {
  font-size: 1.2rem;
  padding: 0;
}
div.container-flex img {
  max-width: 300px;
  height: auto;
  object-fit: contain;
  align-self: center;
  border-radius: 10px;
}
a.button {
  background-color: #365256;
  color: white;
  font-family: sans-serif;
  font-size: 1.3rem;
  text-align: center;
  padding: 20px 60px;
  margin: 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
a.button:hover {
  background-color: #2c484c;
  transition: background-color 0.3s ease;
}
a.button:active {
  background-color: #223e42;
  transition: background-color 0.3s ease;
}
a.link {
  color: #181818;
}

/*Styles for slider*/
div.slider-wrapper {
  margin: auto;
  max-width: 720px;
  padding: 20px 10px 0 10px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
div.slider {
  width: 100%;
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}
a.slide {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  container-type: inline-size;
}
a.slide.active {
  opacity: 1;
}
a.slide:not(.active) {
  pointer-events: none;
}
a.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
a.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(24, 24, 24, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

span.slide-text {
  position: relative;
  color: white;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  text-align: center;
  margin: 20px;
}

@container (min-width: 400px) {
  span.slide-text {
    font-size: 1.6rem;
  }
}

@container (min-width: 500px) {
  span.slide-text {
    font-size: 1.8rem;
  }
}

a.slide:hover::after {
  opacity: 1;
}

a.slide:hover span.slide-text {
  opacity: 1;
}

a.slide:active::after {
  background-color: rgba(24, 24, 24, 0.7);
  transition: opacity 0.3s ease;
}
div.slider-buttons {
  display: flex;
  max-width: 700px;
  width: 100%;
  padding: 0;
  margin: auto;
  gap: 20px;
}
button.slider-mobile {
  flex: 1;
  background-color: #365256;
  color: white;
  font-family: sans-serif;
  font-size: 1.3rem;
  padding: 20px 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
button.slider-wide {
  background-color: #365256;
  color: white;
  font-family: sans-serif;
  font-size: 1.3rem;
  padding: 20px 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: none;
}

/*Styles for portfolio*/
div.container-portfolio {
  margin: auto;
  max-width: 1080px;
  padding: 20px 30px;
  display: grid;
  grid-template-columns: repeat(1fr);
  gap: 20px;
}
a.project {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
}
a.project img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
a.project::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(24, 24, 24, 0.6);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

span.project-text {
  position: relative;
  color: white;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  text-align: center;
  margin: 20px;
}

@container (min-width: 380px) {
  span.project-text {
    font-size: 1.6rem;
  }
}

@container (min-width: 460px) {
  span.project-text {
    font-size: 1.8rem;
  }
}

a.project:hover::after {
  opacity: 1;
}

a.project:hover span.project-text {
  opacity: 1;
}

a.project:active::after {
  background-color: rgba(24, 24, 24, 0.7);
  transition: opacity 0.3s ease;
}

/*Styles for projects*/
div.container-wide {
  margin: auto;
  max-width: 1080px;
  padding: 20px;
}
div.container-project {
  margin: auto;
  max-width: 1060px;
  padding: 20px 10px 20px 10px;
  display: grid;
  gap: 20px;
  justify-items: center;
}

div.container-project-text {
  margin: auto;
  max-width: 1060px;
  padding: 20px 10px 20px 10px;
  display: grid;
  gap: 20px;
  justify-items: left;
  font-size: 1.3rem;
}

div.container-video {
  margin: auto;
  max-width: 1060px;
  aspect-ratio: 16 / 9;
  padding: 20px 10px 20px 10px;
  display: grid;
  gap: 20px;
  justify-items: center;
}
div.container-project-2-1fr {
  margin: auto;
  max-width: 1060px;
  padding: 20px 10px 20px 10px;
  display: grid;
  gap: 20px;
  align-items: center;
  justify-items: center;
}

div.container-project-2-1fr > p {
  font-size: 1.3rem;
  justify-self: start;
}

div.container-project-3-1fr {
  margin: auto;
  max-width: 1060px;
  padding: 20px 10px 20px 10px;
  display: grid;
  gap: 20px;
  justify-items: center;
}

div.container-project-3-1fr > p {
  font-size: 1.3rem;
  justify-self: start;
}

/*Styles for contact*/
p.contact-text {
  margin-bottom: 40px;
  font-size: 1.2em;
}
form,
input,
textarea,
button,
label {
  font-family: "Arial", sans-serif;
}
input,
textarea {
  font-size: 0.9em;
}
label {
  font-size: 1.2em;
}
form {
  margin-top: 50px;
  padding: 0 10px 0 10px;
}
input[type="text"],
input[type="email"] {
  width: 100%;
  max-width: 350px;
  padding: 10px;
  margin: 10px 0 30px 0;
  display: block;
  border: 1px solid #c0c0c0;
  border-radius: 5px;
  box-sizing: border-box;
}
textarea[name="message"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0 30px 0;
  display: block;
  border: 1px solid #c0c0c0;
  border-radius: 5px;
  box-sizing: border-box;
  height: 300px;
}
button[type="submit"] {
  background-color: #365256;
  color: white;
  font-family: sans-serif;
  font-size: 1.3rem;
  padding: 20px 60px;
  margin-bottom: 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
button:hover {
  background-color: #2c484c;
  transition: background-color 0.3s ease;
}
button:active {
  background-color: #223e42;
  transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
  div.header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  div.title {
    padding-left: 20px;
  }
  div.navigation-header {
    margin-left: auto;
    padding: 0 20px 0 0;
    align-items: center;
  }
  div.container-flex p {
    max-width: calc(70% - 10px);
  }
  div.container-flex img {
    max-width: calc(30% - 10px);
  }
  div.slider-wrapper {
    flex-direction: row;
  }
  div.slider-buttons {
    display: none;
  }
  button.slider-wide {
    display: flex;
  }
  div.container-portfolio {
    grid-template-columns: repeat(2, 1fr);
  }
  div.container-project-2-1fr {
    grid-template-columns: repeat(2, 1fr);
  }
  div.container-project-3-1fr {
    grid-template-columns: repeat(3, 1fr);
  }
  div.footer {
    grid-template-columns: auto 1fr;
  }
  div.footer p {
    padding-left: 20px;
  }
  div.navigation-footer {
    padding-right: 20px;
  }
}
