* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: "Quantico", sans-serif;
  height: 100%;
  margin: 0;
  background-image: url("assets/img/herbarium-vhs.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: scroll;
}

.hero {
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: top;
  position: center;
  margin: 0px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.neon-text {
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 5px #fff, 0 0 10px rgb(36, 94, 174),
    0 0 20px rgb(46, 180, 166), 0 0 40px rgb(16, 46, 146);
  -webkit-animation: flicker 1.8s infinite alternate;
  animation: flicker 1.8s infinite alternate;
}

@keyframes flicker {
  0%,
  18%,
  22%,
  25%,
  53%,
  57%,
  100% {
    opacity: 1;
  }

  20%,
  24%,
  55% {
    opacity: 0.5;
  }
}

.mobile-navbar {
  position: sticky;
  top: 0;
  background: rgba(79, 79, 79, 0.8);
  padding: 0.5rem;
  z-index: 999;
}

.mobile-menu {
  display: flex;
  justify-content: space-around;
  list-style: none;
}

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem;
  text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.tv-container {
  position: flex;
  height: 100vh;
}

.tv-button {
  position: absolute;
  color: #fff;
  padding: 1rem 2rem;
  transform: skew(-10deg);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  z-index: 3;
  pointer-events: auto;
}

#btn-contacts {
  text-shadow: 0 0 5px #fff, 0 0 10px rgb(36, 94, 174),
    0 0 20px rgb(46, 180, 166), 0 0 40px rgb(16, 46, 146);
  transition: all 0.3s ease-in-out;
  -webkit-animation: flicker 2.2s infinite alternate;
  animation: flicker 2.2s infinite alternate;
}

#btn-portfolio {
  text-shadow: 0 0 5px #fff, 0 0 10px rgb(36, 94, 174),
    0 0 20px rgb(46, 180, 166), 0 0 40px rgb(16, 46, 146);
  transition: all 0.3s ease-in-out;
  -webkit-animation: flicker 2.8s infinite alternate;
  animation: flicker 3s infinite alternate;
}

/* posizione per ogni bottone home */
#btn-portfolio {
  top: 38%;
  left: 56%;
  text-shadow: 0 0 5px #00aaff, 0 0 10px #00aaff, 0 0 20px #00aaff,
    0 0 40px #00aaff;
}

#btn-contacts {
  top: 72%;
  left: 68%;
  text-shadow: 0 0 5px #00ffd5, 0 0 10px #00ffd5, 0 0 20px #00ffd5,
    0 0 40px #00ffd5;
}

/* nasconde il menu mobile */
@media (min-width: 768px) {
  .mobile-navbar {
    display: none;
  }
}

@media (max-width: 768px) {
  #btn-contacts,
  #btn-portfolio {
    display: none;
  }
}

/* portfolio style */
body.portfolio-page {
  margin: 0;
  height: 100vh;
  overflow: scroll;
  background-image: url("assets/img/vhs.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 2;
}

main.main-portfolio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 2rem;
}

main .neon-text-portfolio {
  grid-column: 1/2;
  right: 20%;
}

main .about-me {
  grid-column: 1/3;
  padding: 10px;
}

main .profile-img {
  grid-column: 2/4;
  padding: 10px;
  grid-row: 1;
}

main .skills-section {
  grid-column: 4/4;
  grid-row: 4;
  padding: 10px;
  bottom: 20%;
}

.text-box {
  color: #ede6eb;
  display: inline-block;
  max-width: 90%;
  font-size: 16px;
  padding: 1rem;
  background-color: rgba(164, 104, 191, 0.5);
  border: solid 1px red;
  border-radius: 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 0 5px #bb5e97;
  box-shadow: 0 0 10px #7b528e;
}

.content {
  display: block;
  width: 100%;
}

.neon-text-portfolio {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 5px #f5ebc5, 0 0 10px rgb(97, 34, 118),
    0 0 20px rgb(183, 57, 143), 0 0 40px rgb(16, 46, 146);
  -webkit-animation: flicker 2.5s infinite alternate;
  animation: flicker 2.5s infinite alternate;
}

.skills-section {
  text-align: right;
  padding: 3rem 3rem;
  color: white;
}

.skills-hamburger {
  position: relative;
  display: grid;
  grid-column: 3/4;
  grid-row: 4;
  padding: 10px;
  bottom: 20%;
  justify-content: center;
  max-height: 90px;
  width: 300px;
  font-size: 2rem;
  color: white;
  text-align: end;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 0 5px #00ffcc;
  text-shadow: 0 0 5px #00ffcc;
  margin-bottom: 1rem;
  appearance: none;
}

/* nasconde la spunta di checkbox*/
input[type="checkbox"] {
  display: none;
}

.skills-hamburger:hover {
  box-shadow: 0 0 10px #00ffcc;
  background: rgba(255, 255, 255, 0.2);
}

.skills-section {
  display: block;
}

.skills-list {
  margin: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.skill-item {
  display: flex;
  flex: 1 1 100px;
  flex-direction: column;
  align-items: center;
  width: 120px;
  max-width: 150px;
  font-size: clamp(2rem, 5vw, 3rem);
  padding: 1rem;
  background-color: rgba(242, 238, 238, 0.3);
  border-radius: 12px;
  text-shadow: 0 0 5px #00ffcc;
  box-shadow: 0 0 10px #00ffcc;
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: scale(1.1);
}

.skill-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 5px #00ffff);
}

.skill-item span {
  color: white;
  font-weight: bold;
}

.home-button {
  position: absolute;
  color: #fff;
  padding: 1rem 2rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  z-index: 3;
  pointer-events: auto;
}

#btn-home {
  bottom: 15%;
  left: 15%;
  font-size: 35px;
  text-shadow: 0 0 5px #c50e0e, 0 0 10px #c50e0e, 0 0 20px #c50e0e,
    0 0 40px #c50e0e;
  -webkit-animation: flicker 2.9s infinite alternate;
  animation: flicker 2.9s infinite alternate;
}

.mobile-menu a.active {
  text-shadow: 0 0 10px #ffffff, 0 0 20px #00ffff;
}

/* immagine profilo effetto flottante*/
@keyframes float {
  0% {
    transform: translateY(0px) rotate(4deg);
    -webkit-transform: translateY(0px) rotate(4deg);
    -moz-transform: translateY(0px) rotate(4deg);
    -ms-transform: translateY(0px) rotate(4deg);
    -o-transform: translateY(0px) rotate(4deg);
  }

  50% {
    transform: translateY(-8px) rotate(4deg);
    -webkit-transform: translateY(-8px) rotate(4deg);
    -moz-transform: translateY(-8px) rotate(4deg);
    -ms-transform: translateY(-8px) rotate(4deg);
    -o-transform: translateY(-8px) rotate(4deg);
  }

  100% {
    transform: translateY(0px) rotate(4deg);
    -webkit-transform: translateY(0px) rotate(4deg);
    -moz-transform: translateY(0px) rotate(4deg);
    -ms-transform: translateY(0px) rotate(4deg);
    -o-transform: translateY(0px) rotate(4deg);
  }
}

.profile-img {
  position: absolute;
  padding: 20px;
  top: 1rem;
  right: 8rem;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
}

.profile-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(6deg);
  border: 3px solid #00ffff;
  -webkit-animation: float 4s ease-in-out infinite;
  animation: float 4s ease-in-out infinite;
  -webkit-transform: rotate(6deg);
  -moz-transform: rotate(6deg);
  -ms-transform: rotate(6deg);
  -o-transform: rotate(6deg);
}

/* Mobile portfolio*/
@media (max-width: 700px) {
  :root {
    --bar-width: 60px;
    --bar-height: 8px;
    --hamburger-gap: 6px;
    --foreground: #00ffcc;
    --background: rgba(255, 255, 255, 0.2);
    --hamburger-margin-right: 30px;
    --hamburger-margin-top: 350px;
    --animation-timing: 200ms ease-in-out;
  }

  main.main-portfolio {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
  }

  .text-box {
    color: rgb(234, 221, 238);
    display: inline-block;
    max-width: 90%;
    font-size: 10px;
    padding: 1rem;
    background-color: rgba(174, 115, 201, 0.4);
    border: solid 1px red;
    border-radius: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: 0 0 5px rgb(183, 57, 143);
    box-shadow: 0 0 10px rgb(183, 57, 143);
  }

  .content {
    display: block;
    width: 100%;
  }

  h1.neon-text-portfolio {
    font-size: 1.8rem;
    text-align: center;
  }

  .skills-hamburger {
    display: flex;
    flex-direction: column;
    gap: var(--hamburger-gap);
    width: max-content;
    position: static;
    margin: 1rem auto;
    right: var(--hamburger-margin-right);
    top: var(--hamburger-margin-top);
    z-index: 1;
    cursor: pointer;
  }

  .skills-hamburger input {
    content: "";
    width: var(--bar-width);
    height: var(--bar-height);
    background-color: var(--foreground);
    display: block;
    max-width: fit-content;
    max-height: fit-content;
    border-radius: 9999px;
    box-shadow: 0 0 5px #00ffcc;
    transition: opacity var(--animation-timing), width var(--animation-timing);
    -webkit-transition: opacity var(--animation-timing),
      width var(--animation-timing);
    -moz-transition: opacity var(--animation-timing),
      width var(--animation-timing);
    -ms-transition: opacity var(--animation-timing),
      width var(--animation-timing);
    -o-transition: opacity var(--animation-timing),
      width var(--animation-timing);
  }

  .skills-checkbox {
    display: none;
  }

  .skills-list {
    max-width: 100%;
    transition: max-height 0.6s ease;
    display: flex;
    justify-content: center;
    gap: 1rem;
    -webkit-transition: max-height 0.6s ease;
    -moz-transition: max-height 0.6s ease;
    -ms-transition: max-height 0.6s ease;
    -o-transition: max-height 0.6s ease;
  }

  .skills-list.show {
    display: 400px;
  }

  .skill-item {
    width: 25px;
    font-size: 0.7rem;
  }

  .skill-item img {
    width: 20px;
    height: 20px;
  }

  .skills-section {
    width: 100%;
    display: block;
  }

  .skills-list.show {
    display: flex;
  }

  .profile-img {
    width: 100%;
    display: none;
  }

  .about-me {
    width: 100%;
  }

  #btn-home {
    display: none;
  }
}

@media (max-width: 480px) {
  .main-portfolio {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 5px;
  }

  .text-box {
    display: block;
    width: 100%;
    max-width: 90vw;
    padding: 1rem;
    box-sizing: border-box;
    font-size: 0.9rem;
    background-color: rgba(174, 115, 201, 0.619);
    border: solid 1px red;
    border-radius: 12px;
    text-shadow: 0 0 5px rgb(183, 57, 143);
    box-shadow: 0 0 10px rgb(183, 57, 143);
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .content {
    display: block;
    width: 100%;
    line-height: 1.4;
  }

  .skills-section {
    width: 100%;
    display: block;
  }

  .skills-list.show {
    display: 300px;
  }

  .skill-item {
    width: 25px;
    font-size: 0.6rem;
  }

  .skill-item img {
    width: 25px;
    height: 25px;
  }

  #btn-home {
    display: none;
  }
}

/* contacts style */
body.contacts-page {
  margin: 0;
  height: 100vh;
  overflow: scroll;
  background-image: url("assets/img/sea.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: 3;
}

.neon-text-contacts {
  padding-bottom: 35px;
  font-size: 3rem;
  font-family: "Quantico", sans-serif;
  color: #fff;
  text-shadow: 0 0 5px #f5ebc5, 0 0 10px rgb(148, 48, 181),
    0 0 20px rgb(183, 141, 57), 0 0 40px rgb(16, 46, 146);
  -webkit-animation: flicker 2.5s infinite alternate;
  animation: flicker 2.5s infinite alternate;
}

.hero.contacts-page {
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contacts-icons {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  justify-items: center;
  text-align: center;
  padding-bottom: 30px;
}

.contacts-icons img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 5px rgb(201, 127, 226));
  -webkit-filter: drop-shadow(0 0 5px rgb(201, 127, 226));
}

.contacts-icons a {
  color: #f5ebc5;
  text-shadow: 0 0 5px #f5ebc5, 0 0 10px rgb(148, 48, 181),
    0 0 20px rgb(183, 141, 57), 0 0 40px rgb(16, 46, 146);
  -webkit-animation: flicker 3s infinite alternate;
  animation: flicker 3s infinite alternate;
  text-decoration: none;
}

form {
  width: 90%;
  max-width: 600px;
}

.input-group {
  margin-bottom: 30px;
  position: relative;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  outline: 0;
  border: 1px solid rgb(201, 127, 226);
  background: transparent;
  font-size: 15px;
}

label {
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  padding: 10px;
  color: #f5ebc5;
  cursor: text;
  transition: 0.3s;
  -webkit-transition: 0.3s;
  -moz-transition: 0.3s;
  -ms-transition: 0.3s;
  -o-transition: 0.3s;
}

.submit-button {
  padding: 10px 0;
  color: #f5ebc5;
  outline: none;
  background: transparent;
  border: 1px solid rgb(201, 127, 226);
  width: 100%;
  cursor: pointer;
}

input:focus ~ label,
input:valid ~ label,
textarea:focus ~ label,
textarea:valid ~ label {
  top: -35px;
  font-size: 14px;
}

/* mobile contacts */
@media (max-width: 1250px) {
  #btn-home {
    display: none;
  }
}

/* mobile glitch effect */
@keyframes glitch-out {
  0% {
    transform: none;
    opacity: 1;
    filter: none;
  }

  20% {
    transform: skewX(5deg);
    filter: contrast(1.2) brightness(1.2);
  }

  40% {
    transform: skewX(-5deg) scale(1.05);
    filter: contrast(0.8) brightness(0.8);
  }

  60% {
    transform: skewX(10deg);
    filter: hue-rotate(20deg);
  }

  80% {
    transform: scale(0.9) skewX(-10deg);
    filter: hue-rotate(-20deg);
  }

  100% {
    opacity: 0;
    transform: scale(1.2);
    filter: blur(5px);
  }
}

.glitch-transition {
  animation: glitch-out 0.6s forwards;
}

