/* CSS Portfolio */
/* STYLING SCROLLBAR */
::-webkit-scrollbar {
  width: 15px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    360deg,
    rgba(246, 166, 178, 1) 0%,
    rgba(76, 200, 255, 1) 100%
  );
  border-radius: 100px;
  border: 2px solid #f1f1f1;
}

/* Hover effect */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    360deg,
    rgba(246, 140, 160, 1) 0%,
    rgba(60, 180, 255, 1) 100%
  );
}

/* HEADER */
header {
  width: 100%;
  height: 100px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
}

/* STYLING NAVBAR */
nav.portfolio-navbar {
  width: 100%;
  height: 100%;
  background-color: var(--navbar-bg-color);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 25px;
  transition: clip-path 1s ease-in-out;
  clip-path: inset(0 0 -20px 0);
}

nav.portfolio-navbar.hide {
  clip-path: inset(0 0 0 100%);
}

.portfolio-navbar.hidden {
  clip-path: inset(0 0 100% 0);
}

nav.portfolio-navbar a,
nav.mobile-navbar a {
  text-decoration: none;
  color: var(--primary-font-color);
}

a.navbar-logo,
a.navbar-logo-mobile {
  font-family: var(--primary-font);
  font-size: 1.5rem;
  font-weight: 700;
  width: 150px;
  text-align: center;
  position: absolute;
  left: 25px;
}

nav.portfolio-navbar ul,
nav.mobile-navbar ul {
  font-family: var(--secondary-font);
  font-size: 1.125rem;
  font-weight: 500;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 50%;
}

a.navbar-portfolio-link {
  position: relative;
}

button.navbar-toggle {
  display: none;
}

/* NAVBAR EFFECTS */
a.navbar-portfolio-link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-font-color);
  transition: all 0.25s ease-in-out;
  transform: translateX(-50%);
}

a.navbar-portfolio-link:hover::after {
  width: 100%;
}

/* STYLING MOBILE NAVBAR */
nav.mobile-navbar {
  width: 60%;
  height: 100vh;
  background-color: var(--navbar-bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  right: 0;
  z-index: 4;
  box-shadow: -4px 0px 4px 0px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease-in-out;
  transform: translateX(100%);
}

nav.mobile-navbar div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px;
}

a.navbar-logo-mobile {
  position: static;
  width: auto;
}

button.close-mobile-navbar {
  border: none;
  background: transparent;
}

nav.mobile-navbar i.fa-arrow-left {
  font-size: 1.5rem;
}

nav.mobile-navbar ul {
  flex-direction: column;
  width: 100%;
  height: calc(100% - 64px);
  align-items: end;
  justify-content: start;
  gap: 30px;
  padding: 20px;
}

div.nav-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 3;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

/* STYLING HERO HOME */
div#home {
  width: 100%;
  height: 100vh;
  background-color: #ffe4e6;
  background: linear-gradient(
    360deg,
    rgba(255, 228, 230, 1) 0%,
    rgba(208, 240, 253, 1) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

div#home h1 {
  font-family: var(--primary-font);
  font-size: 4.375rem;
  font-weight: 800;
  color: var(--primary-font-color);
  text-align: center;
  padding: 0 10px;
  position: relative;
}

/* H1 EFFECT */
h1.hover-underline::after,
h1.hover-underline::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: rgba(246, 166, 178, 1);
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease-out;
}

h1.hover-underline::before {
  top: -5px;
  transform-origin: left;
  background: rgba(76, 200, 255, 1);
}

h1.hover-underline:hover::after,
h1.hover-underline:hover::before {
  transform: scaleX(1);
}

div#home h2 {
  font-family: var(--secondary-font);
  font-size: 2rem;
  font-weight: 600;
  color: var(--secondary-font-color);
  text-align: center;
  padding: 0 10px;
}

div#home a {
  width: 300px;
  height: 40px;
  background-color: var(--home-button-color);
  border: none;
  border-radius: 20px;
  font-family: var(--primary-font);
  font-size: 1.125rem;
  font-weight: 800;
  color: white;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease-in-out;
  text-decoration: none;
  text-align: center;
  line-height: 2.4rem;
}

div#home a:hover {
  transform: scale(1.1);
}

/* ABOUT SECTION */
section#about,
section#skills,
section#progetti,
section#contatti {
  width: 100%;
  height: 80vh;
  min-height: 80vh;
  background-color: var(--about-bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
}

div.about-container,
div.skills-container,
div.progetti-container,
div.contatti-container {
  width: 70%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5%;
  height: 100%;
}

div.about-description {
  padding: 20px;
}

div.about-description h2,
div.skills-container h2,
div.progetti-container h2,
div.contatti-container h2 {
  font-family: var(--primary-font);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-font-color);
  text-align: left;
  margin-bottom: 40px;
}

div.about-description p,
div.skills-container p {
  font-family: var(--secondary-font);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--secondary-font-color);
  text-align: justify;
  line-height: 1.8;
}

div.about-container img,
div.contatti-info img.my-photo {
  width: 350px;
  height: 350px;
  border: 10px solid transparent;
  border-radius: 50%;
  background: linear-gradient(
      to right,
      var(--about-bg-color),
      var(--about-bg-color)
    ),
    linear-gradient(
      to bottom,
      var(--about-icon-border-first-color),
      var(--about-icon-border-second-color)
    );
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.6s;
}

/* ABOUT SECTION EFFECTS */
@keyframes flip-coin {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

div.about-container img:hover {
  animation: flip-coin 1s linear 1;
  transform-style: preserve-3d;
}

/* SKILLS SECTION */
section#skills {
  background-color: var(--skills-bg-color);
}

div.skills-container {
  flex-direction: column;
  gap: 30px;
}

div.skills-container h2 {
  text-align: center;
  margin-bottom: 0;
}

div.skills-cards-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px;
}

div.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 180px;
  height: 220px;
  border: 3px solid white;
  border-radius: 16px;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: url("../img/cursor/pointer-cursor.svg") 12 12, auto;
}

div.skill-card:nth-child(odd) {
  background-color: var(--home-bg-second-color);
  transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

div.skill-card:nth-child(even) {
  background-color: var(--home-bg-first-color);
  transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

/* SKILLS SECTION EFFECTS */

div.skill-card:nth-child(odd):hover,
div.skill-card:nth-child(even):hover {
  transform: scale(1.1);
}

div.skill-card:before {
  content: "";
  position: absolute;
  top: 100%;
  right: 100%;
  width: 0;
  height: 0;
  transition: 0.3s;
  border-radius: 16px;
}

div.skill-card:nth-child(odd):before {
  background-color: var(--skills-cards-odd-hover);
}

div.skill-card:nth-child(even):before {
  background-color: var(--skills-cards-even-hover);
}

div.skill-card:hover:before {
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
}

div.skill-card img {
  width: 70%;
  height: 55%;
  filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.2));
  z-index: 2;
  transition: transform 0.3s ease-in-out;
}

div.skill-card:hover img {
  transform: rotateY(360deg);
}

div.skill-card h3 {
  font-family: var(--secondary-font);
  font-size: 2.25rem;
  font-weight: 600;
  color: white;
  text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

div.skills-container p {
  text-align: center;
}

/* PROGETTI SECTION */
section#progetti {
  background-color: var(--progetti-bg-color);
}

div.progetti-container {
  flex-direction: column;
  width: 100%;
}

div.progetti-cards-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 700px;
  padding: 10px calc(50% - 250px);
  overflow-x: auto;
  line-height: 1;
  cursor: url("../img/cursor/move-cursor.svg") 12 12, auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
div.progetti-cards-container::-webkit-scrollbar,
div.about-description p::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
div.progetti-cards-container,
div.about-description p {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

div.progetto-card {
  width: 500px;
  min-width: 500px;
  height: 600px;
  background-color: var(--progetti-cards-color);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 20px;
  border-radius: 16px;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
  padding: 30px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s ease;
  margin: 0 10px;
}

/* PROGETTO CARD EFFECT ON HOVER */
div.progetto-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    0deg,
    transparent,
    transparent 30%,
    rgb(255, 255, 255)
  );
  transform: rotate(-45deg);
  transition: all 0.5s ease;
  opacity: 0;
}

div.progetto-card:hover {
  transform: scale(1.03);
}

div.progetto-card:hover::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

div.progetto-card h3 {
  font-family: var(--secondary-font);
  font-size: 1.125rem;
  font-weight: 600;
  color: black;
}

div.progetto-card a {
  width: 100%;
  height: 50%;
  align-self: center;
  margin: 10px 0;
}

div.progetto-card img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

div.progetto-card p {
  font-family: var(--secondary-font);
  font-size: 0.875rem;
  color: var(--secondary-font-color);
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 20px;
}

div.tags-container {
  display: flex;
  gap: 20px;
}

div.tags-container div {
  width: 15%;
  padding: 7px 0;
  text-align: center;
  border: 2px solid var(--about-icon-border-first-color);
  border-radius: 8px;
  font-family: var(--secondary-font);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--about-icon-border-first-color);
}

/* CONTATTI SECTION */
section#contatti {
  background-color: var(--progetti-cards-color);
  height: calc(100vh - 40px);
}

div.contatti-container {
  flex-direction: column;
}

div.contatti-content {
  display: flex;
  flex-direction: row;
  height: auto;
  width: 100%;
}

div.contatti-info {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 50%;
  gap: 30px;
  padding: 10px;
}

div.contatti-info img.my-photo {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 4px solid transparent;
  line-height: 1;
  cursor: url("../img/cursor/heart-cursor.svg") 12 12, auto;
}

div.contatti-info div {
  text-align: center;
  font-family: var(--secondary-font);
  line-height: 2rem;
}

div.contatti-info div h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary-font-color);
}

div.contatti-info div q {
  font-size: 1rem;
  color: var(--secondary-font-color);
}

div.logo-contatti-container {
  width: 100%;
  word-spacing: 20px;
}

div.logo-contatti-container img {
  width: 50px;
  height: auto;
  border-radius: 50%;
  transition: transform 0.2s ease-in-out;
}

form.contatti-form {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  padding: 10px;
  gap: 10%;
  font-family: var(--secondary-font);
  color: var(--primary-font-color);
}

form.contatti-form input::placeholder,
form.contatti-form textarea::placeholder {
  font-family: var(--secondary-font);
  color: var(--secondary-font-color);
  font-size: 1rem;
}

form.contatti-form h3 {
  font-size: 1.875rem;
  font-weight: 600;
  align-self: center;
  margin-bottom: 10px;
  padding: 10px;
}

form.contatti-form div {
  width: 100%;
  margin-bottom: 20px;
}

form.contatti-form label {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 10px;
}

form.contatti-form input,
form.contatti-form textarea {
  width: 100%;
  height: 50px;
  border: 1px solid var(--secondary-font-color);
  border-radius: 8px;
  padding: 10px;
}

form.contatti-form textarea {
  height: 210px;
  min-height: 210px;
  max-height: 210px;
  max-width: 100%;
}
form.contatti-form textarea::-webkit-scrollbar {
  width: 10px;
}

form.contatti-form textarea::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(150, 144, 144, 0.5);
  border-radius: 100px;
}

form.contatti-form textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(
    360deg,
    rgba(246, 166, 178, 1) 0%,
    rgba(76, 200, 255, 1) 100%
  );
  border-radius: 100px;
}

form.contatti-form button {
  align-self: center;
  background-color: var(--about-icon-border-first-color);
  color: white;
  width: 50%;
  height: 40px;
  border-radius: 20px;
  border: none;
  font-family: var(--primary-font);
  font-size: 1.125rem;
  font-weight: 800;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease-in-out;
}

form.contatti-form button:hover,
div.logo-contatti-container img:hover {
  transform: scale(1.1);
}

div.portfolio-copyright {
  background-color: var(--navbar-bg-color);
  width: 100%;
  height: 40px;
  position: relative;
  text-align: center;
  line-height: 3.5;
  color: #777777;
  font-family: var(--secondary-font);
  font-size: 0.75rem;
  box-shadow: 0px -4px 4px 0px rgba(0, 0, 0, 0.05);
}

/* MESSAGE SENT */
div.message-sent {
  width: 200px;
  height: 30px;
  background: rgb(94, 208, 94);
  border-radius: 16px;
  position: fixed;
  bottom: 100px;
  z-index: 1;
  text-align: center;
  color: white;
  font-family: var(--secondary-font);
  font-size: 1rem;
  line-height: 1.7rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

div.message-sent i.fa-circle-check {
  position: absolute;
  right: 10px;
  top: 8px;
}

div.message-sent.showMessage {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

/* GO UP BUTTON */
a.go-up-btn {
  background: linear-gradient(
    360deg,
    rgba(246, 166, 178, 1) 0%,
    rgba(76, 200, 255, 1) 100%
  );
  width: 70px;
  height: 70px;
  position: fixed;
  z-index: 2;
  bottom: 30px;
  right: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

a.go-up-btn i {
  font-size: 2rem;
}

@keyframes pop {
  50% {
    transform: scale(1.2);
  }
}

a.go-up-btn:hover {
  animation: pop 0.3s linear 1;
}

/* MEDIA QUERY */
@media screen and (min-width: 2300px) {
  /* ABOUT SECTION */
  div.about-container {
    width: 40%;
  }

  /* SKILLS SECTION */
  div.skills-cards-container {
    margin: 50px 0;
  }

  /* CONTATTI SECTION */
  div.contatti-container {
    width: 40%;
  }

  div.contatti-info img.my-photo {
    width: 350px;
    height: 350px;
  }

  /* MESSAGE SENT */
  div.message-sent {
    width: 300px;
    height: 35px;
    line-height: 2rem;
    font-size: 1.25rem;
  }
}

@media screen and (min-width: 1440px) {
  /* NAVBAR */
  nav.portfolio-navbar {
    justify-content: center;
  }

  nav.portfolio-navbar ul {
    width: 30%;
    justify-content: space-between;
  }
}

@media screen and (max-width: 1100px) {
  /* ABOUT SECTION */
  div.about-container {
    flex-direction: column;
  }

  div.about-description h2,
  div.about-description p {
    text-align: center;
  }

  /* SKILLS SECTION */
  div.skill-card {
    width: 150px;
    height: 185px;
  }

  div.skill-card h3 {
    font-size: 2rem;
  }

  div.skills-cards-container {
    gap: 20px;
  }

  /* CONTATTI SECTION */
  div.contatti-container {
    width: 90%;
  }

  div.contatti-info {
    width: 30%;
  }

  div.contatti-info img.my-photo {
    width: 200px;
    height: 200px;
  }

  div.contatti-info div {
    line-height: 1.5;
  }

  div.contatti-info div h3 {
    font-size: 1rem;
  }

  div.contatti-info div p {
    font-size: 0.75rem;
  }

  div.contatti-info img {
    width: 40px;
  }

  form.contatti-form {
    width: 70%;
    padding: 20px;
  }
}

@media screen and (max-width: 768px) {
  /* NAVBAR */
  header {
    height: 70px;
  }

  nav.portfolio-navbar {
    transition: clip-path 0.3s ease-in-out;
  }

  a.navbar-logo {
    left: 40px;
    width: auto;
  }

  nav.portfolio-navbar ul {
    display: none;
  }

  button.navbar-toggle {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-font-color);
    position: absolute;
    right: 40px;
    border: none;
    background-color: transparent;
  }

  /* HOME */
  div#home {
    height: 100vh;
  }

  div#home h1 {
    font-size: 3.125rem;
  }

  div#home h2 {
    font-size: 1.25rem;
  }

  div#home button {
    width: 200px;
    height: 30px;
    font-size: 0.75rem;
  }

  /* ABOUT SECTION */
  section#about,
  section#skills,
  section#progetti,
  section#contatti {
    height: auto;
    padding: 20px;
  }

  div.about-container {
    gap: 0%;
    width: 90%;
  }

  div.about-description {
    padding: 0;
    margin-bottom: 20px;
  }

  div.about-description h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  div.about-description p {
    font-size: 1rem;
    line-height: 1.5;
  }

  div.about-container img {
    width: 250px;
    height: 250px;
  }

  /* SKILLS SECTION */
  div.skills-container {
    width: 80%;
  }

  div.skills-cards-container {
    padding: 0;
    margin-bottom: 10px;
  }

  div.skill-card {
    width: 100px;
    height: 130px;
  }

  div.skill-card h3 {
    font-size: 1.55rem;
  }

  div.skills-container h2,
  div.progetti-container h2 {
    margin-bottom: 0;
    font-size: 2rem;
  }

  div.skills-container p {
    display: none;
  }

  /* PROGETTI SECTION */
  div.progetti-container {
    gap: 10px;
  }

  div.progetti-cards-container {
    height: 600px;
  }

  div.progetto-card {
    min-width: 90%;
    height: auto;
    padding: 10px;
    gap: 5px;
  }

  div.progetto-card a {
    height: auto;
  }

  div.progetto-card h3 {
    font-size: 1rem;
  }

  div.progetto-card p {
    margin-bottom: 0;
    font-size: 0.75rem;
  }

  div.tags-container {
    display: none;
  }

  /* CONTATTI SECTION */
  div.contatti-container h2 {
    margin-bottom: 0;
  }

  div.contatti-content {
    flex-direction: column;
    align-items: center;
  }

  div.contatti-info {
    width: 100%;
  }

  div.contatti-info img.my-photo {
    display: none;
  }

  form.contatti-form {
    width: 100%;
    padding: 0 10px 20px;
  }

  form.contatti-form h3 {
    font-size: 1rem;
  }

  form.contatti-form label {
    font-size: 0.75rem;
    margin-bottom: 5px;
  }

  form.contatti-form input {
    height: 30px;
  }

  form.contatti-form input::placeholder,
  form.contatti-form textarea::placeholder {
    font-family: var(--secondary-font);
    color: var(--secondary-font-color);
    font-size: 0.75rem;
  }

  form.contatti-form textarea {
    min-height: 100px;
    max-height: 100px;
  }

  /* GO UP BTN */
  a.go-up-btn {
    width: 40px;
    height: 40px;
  }

  a.go-up-btn i {
    font-size: 1.5rem;
  }

  /* NAVBAR MOBILE */
  div.nav-mobile-overlay.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  nav.mobile-navbar.show {
    transform: translateX(0);
  }

  /* MESSAGE SENT */
  div.message-sent {
    bottom: 45px;
  }
}

/* MEDIA QUERY HORIZONTAL SCREENS*/
@media screen and (max-height: 500px) {
  nav.portfolio-navbar {
    height: 50px;
  }

  section#about,
  section#skills,
  section#progetti,
  section#contatti {
    height: auto;
    padding: 20px;
  }
}

@media screen and (max-height: 1000px) {
  section#about,
  section#skills,
  section#progetti,
  section#contatti {
    height: auto;
    padding: 40px;
  }
}
