@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400&family=Montserrat:wght@400;500;600&display=swap");

:root {
  --text-dark: #171717;
  --text-light: #525252;
  --extra-light: #a3a3a3;
  --white: #ffffff;
  --max-width: 1200px;
  --header-font: "Merriweather", serif;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
}

img {
  display: flex;
  width: 100%;
}

a {
  text-decoration: none;
  transition: 0.3s;
}

.section__container {
  max-width: var(--max-width);
  margin: auto;
  padding: 5rem 1rem;
}

.section__header {
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 400;
  font-family: var(--header-font);
  color: var(--text-dark);
  text-align: center;
}

.section__description {
  color: var(--text-light);
  line-height: 1.75rem;
  text-align: center;
}

/* HEADER */

.header {
  min-height: 600px;
  background-image: radial-gradient(
      rgba(255, 255, 255, 0),
      rgba(0, 0, 0, 0.9)
    ),
    url("image/DSC_0641.JPG");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

nav {
  position: fixed;
  isolation: isolate;
  top: 0;
  width: 100%;
  max-width: var(--max-width);
  margin: auto;
  z-index: 9;
}

.nav__header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--text-dark);
}

.nav__logo img {
  max-width: 70px;
}

.nav__menu__btn {
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

.nav__links {
  list-style: none;
  position: absolute;
  width: 100%;
  padding: 2rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
  background-color: var(--text-dark);
  transform: translateY(-100%);
  transition: 0.5s;
  z-index: -1;
}

.nav__links.open {
  transform: translateY(0);
}

.nav__links .nav__logo {
  display: none;
}

.nav__links a {
  padding-bottom: 5px;
  font-weight: 500;
  color: var(--white);
  border-bottom: 2px solid transparent;
}

.nav__links a:hover {
  border-color: var(--white);
}

/* ABOUT */

.about__container .section__description {
  max-width: 900px;
  margin-inline: auto;
}

/* EXPERIENCE */

.service {
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.9),
      rgba(0, 0, 0, 0.9)
    ),
    url("assets/service.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.service__container .section__header {
  color: var(--white);
}

.service__container .section__description {
  max-width: 600px;
  margin-inline: auto;
  color: var(--extra-light);
}

.service__grid {
  margin-top: 4rem;
  display: grid;
  gap: 2rem;
}

.service__card {
  text-align: center;
}

.service__card h4 {
  position: relative;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  font-size: 1.75rem;
  font-weight: 400;
  font-family: var(--header-font);
  color: var(--white);
}

.service__card h4::after {
  position: absolute;
  content: "~";
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
}

.service__card p {
  color: var(--extra-light);
  line-height: 1.75rem;
}

/* GALLERY */

.gallery__grid {
  margin-block: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  
}

.gallery__grid img {
  transition: 0.3s;
  border-radius: 4px;
}

.gallery__grid:hover img:not(:hover) {
  opacity: 0.5;
}

/* FOOTER */

.footer__bar {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--extra-light);
  background-color: var(--text-dark);
  text-align: center;
}


/* TABLET */

@media (width > 540px) {

  .service__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

}


/* DESKTOP */

@media (width > 768px) {

  .header {
    min-height: 650px;
  }

  nav {
    padding: 2rem 1rem;
    position: static;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav__header {
    display: none;
  }

  .nav__links {
    padding: 0;
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: space-between;
    background-color: transparent;
  }

  .nav__links .nav__logo {
    display: block;
  }

  .nav__links .nav__logo img {
    max-width: 150px;
  }

  .service__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }

}

.instagram__container {
  overflow: hidden;
}

.instagram__flex {
  margin-top: 2rem;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: scroll 45s linear infinite;
}

.instagram__flex img {
  width: 135px;
  height: 135px;
  object-fit: cover;
  border-radius: 3px;
  filter: brightness(70%);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  transition: 0.3s;
}

.instagram__flex img:hover {
  filter: brightness(100%);
}

.gallery__grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: 0.3s;
  border-radius: 4px;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 4px;
}

.project-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: 0.4s;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  opacity: 0;
  transition: 0.4s;
}

.project-overlay h3 {
  font-family: var(--header-font);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.project-overlay p {
  line-height: 1.5rem;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover img {
  transform: scale(1.05);
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 0.5rem));
  }
}

@media (width > 1024px) {

  .header {
    min-height: 700px;
  }

}