:root {
  --bg-color: #0c0d0f;
  --text1-color: lab(96.5139 -0.108719 -0.749958);
  --text2-color: #95989d;
  --text3-color: #95989d;
  --textCont-color-hover: lab(96.5139 -0.108719 -0.749958);
  --background-nav: rgb(30, 31, 34);
  --background-preTitle: #151618;
  --background-preTitle-text: #95989d;
  --background-preTitle-border: #2c2e30;
  --switch-color: #1d84f5;
  --line: #242627;
  --nav-bg: rgba(20, 20, 20, 0.5);
  --background-icon: #16212e;
  --gradient1-contact: rgba(27, 61, 105, 0.45) 0%;
  --gradient2-contact: rgba(14, 25, 41, 0.2) 50%;
  --gradient3-contact: black;
}
body.light-mode {
  --bg-color: #f8fafc;
  --text1-color: #0f172a;
  --text2-color: #64748b;
  --text3-color: #475569;
  --textCont-color-hover: #0f172a;
  --hover-color: #f1f5f9;
  --background-nav: #eef2f7;
  --nav-bg: rgba(248, 250, 252, 0.82);
  --background-preTitle: #ffffff;
  --background-preTitle-text: #475569;
  --background-preTitle-border: #dce3ec;
  --switch-color: #0f172a;
  --line: #dce3ec;
  --background-icon: #e8f1fc;
  --gradient1-contact: rgba(29, 132, 245, 0.16) 0%;
  --gradient2-contact: rgba(96, 165, 250, 0.06) 48%;
  --gradient3-contact: #ffffff 100%;
}
* {
  box-sizing: border-box;
  font-family: "Geist Variable", sans-serif;
  scroll-behavior: smooth;
}

body {
  display: flex;
  background-color: var(--bg-color);
  padding: 30px;
  flex-direction: column;
  transition: background-color 0.4s ease;
}

.box-name {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background-color: #1d84f5;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
}

.name {
  color: var(--text1-color);
  font-size: 14px;
  font-weight: 600;
  font-family: "Geist Mono Variable", monospace;
  transition: color 0.4s ease;
}
nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: sticky;
  top: 20px;
  left: 0;
  z-index: 1000;
  background-color: transparent;
  padding: 10px;
  border-radius: 20px;
}

nav.scrolled {
  background-color: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(10px);
}
nav a {
  color: var(--text2-color);
  font-size: 14px;
  padding: 14px;
  text-decoration: none;
  font-weight: normal;
  transition: color 0.4s ease;
}

.menu {
  display: flex;
  flex-direction: row;
  gap: 30px;
}

.button-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: #1d84f5;
  border: none;
  border-radius: 16px;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.1s ease;
  cursor: pointer;
}

.switch {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: none;
  border-radius: 14px;
  background-color: var(--switch-color);
  cursor: pointer;
  transition: background-color 0.4s ease;
}

.switch img {
  width: 20px;
  height: 20px;
  background-position: center;
  background-size: cover;
}

.button-contact:hover {
  transform: scale(1.04);
}

.view:hover:hover {
  transform: scale(1.06);
}

.contact:hover {
  background-color: var(--hover-color);
  border: 1px solid var(--background-preTitle-border);
}

.preTitle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--background-preTitle-text);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 20px;
  background-color: var(--background-preTitle);
  width: 30%;
  height: auto;
  margin: 0 auto;
  margin-top: 100px;
  padding: 5px;
  letter-spacing: 1px;
  transition:
    color 0.4s ease,
    background-color 0.4s ease,
    border 0.4s ease;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.point {
  width: 10px;
  height: 10px;
  background-color: #1d84f5;
  border-radius: 50%;
  animation: pulsa 1.1s infinite;
}

.title {
  display: flex;
  flex-direction: row;
  justify-content: center;
  font-size: 72px;
  font-weight: 550;
  margin-top: 30px;
}

.view {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1d84f5;
  border: none;
  width: 150px;
  border-radius: 17px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 13px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.contact {
  display: flex;
  align-items: center;
  width: 150px;
  justify-content: center;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 17px;
  color: var(--text1-color);
  font-size: 14px;
  font-weight: 500;
  padding: 13px;
  transition: transform 0.3s ease;
  cursor: pointer;
  transition:
    color 0.4s ease,
    background-color 0.4s ease,
    border 0.4s ease;
}

.image {
  display: inline-block;
  width: 15px;
  height: 15px;
  background-image: var(--arrow-right);
  background-repeat: no-repeat;
  background-size: contain;
  transition: background-image 0.4s ease;
  filter: invert(0);
  transition: filter 0.3 ease;
}

body.light-mode .image {
  filter: invert(1);
}
.buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 50px;
  margin-top: 40px;
}

.number {
  color: #1d84f5;
  font-size: 14px;
  font-family: "Geist Mono Variable", monospace;
  text-align: start;
  margin-bottom: 20px;
}

.text {
  font-size: 48px;
  color: var(--text1-color);
  font-weight: 600;
  transition: color 0.4s ease;
}

.describtion {
  font-size: 18px;
  color: var(--text2-color);
  line-height: 1.63em;
  width: 50%;
  margin-top: 50px;
  transition: color 0.4s ease;
}

.boxes {
  display: grid;
  grid-template-columns: repeat(2, 200px);
  gap: 20px;
  width: fit-content;
}

.box {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  padding: 20px;
  min-height: 120px;
  height: auto;
  border-radius: 20px;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  transition:
    background-color 0.4s ease,
    border 0.4s ease;
}

.box:hover {
  border: 1px solid #1d84f5;
}

.data {
  font-size: 50px;
  font-family: "Geist Mono Variable", monospace;
  color: #1d84f5;
  font-weight: 600;
}

.desc {
  font-size: 17px;
  color: var(--text2-color);
  transition: color 0.4s ease;
}

.boxTech1,
.boxTech2,
.boxTech3,
.boxTech4,
.boxTech5 {
  display: flex;
  flex-direction: column;
  margin-top: 50px;
  padding: 15px;
  width: 370px;
  height: auto;
  min-height: 150px;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 15px;
  gap: 20px;
  transition: transform 0.3s ease;
}

.img {
  width: 25px;
  height: 25px;
  background-size: contain;
  background-repeat: no-repeat;
}

.code {
  background-image: url("code-blue.png");
}

.back {
  background-image: url("server-blue.png");
}

.data {
  background-image: url("data-blue.png");
}

.tool {
  background-image: url("tool-blue.png");
}

.currently {
  background-image: url("book-blue.png");
}

.work {
  background-image: url("lavoro.png");
}

.school {
  background-image: url("diploma.png");
}

.plumbing {
  background-image: url("tool-blue.png");
}

.spain {
  background-image: url("viaggio.png");
}

.mail {
  background-image: url("mail-blu.png");
}

.github {
  background-image: url("github.png");
}
.linkedin {
  background-image: url("linkedin-blu.png");
}

.boxTech1:hover .code {
  background-image: url("code-white.png");
}

.boxTech2:hover .back {
  background-image: url("server-white.png");
}

.boxTech3:hover .data {
  background-image: url("data-white.png");
}

.boxTech4:hover .tool {
  background-image: url("tool-white.png");
}

.boxTech5:hover .currently {
  background-image: url("book-white.png");
}

.social:hover .mail {
  background-image: url("mail-bianca.png");
}

.social:hover .github {
  background-image: url("github-bianco.png");
}
.social:hover .linkedin {
  background-image: url("linkedin.png");
}

.boxTech1:hover,
.boxTech2:hover,
.boxTech3:hover,
.boxTech4:hover,
.boxTech5:hover {
  .icon {
    background-color: #1d84f5;
  }
  border: 1px solid #1d84f5;
  transform: translateY(-10px);
  .cont {
    color: var(--textCont-color-hover);
    font-weight: 500;
  }
}
.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: none;
  background-color: var(--background-icon);
  border-radius: 15px;
  transition: background-color 0.3s ease;
}

.icon img {
  width: 25px;
  background-size: contain;
  background-repeat: no-repeat;
}

.titleBox {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 20px;
}

.descBox {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.cont {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 17px;
  width: fit-content;
  border-radius: 15px;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  color: var(--text2-color);
  font-size: 12px;
  font-family: "Geist Mono Variable", monospace;
  white-space: nowrap;
  transition: transform 0.1s ease;
}

.cont:hover {
  background-color: var(--hover-color);
  transform: scale(1.04);
  color: var(--text1-color);
}

.boxes2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}

.container-project {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

.project1,
.project2,
.project3,
.project4 {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  align-items: center;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 15px;
  margin-top: 50px;
  transition: transform 0.3s ease;
}

.box-ex {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 15px;
  margin-top: 50px;
  padding: 20px;
  transition: transform 0.3s ease;
}

.container-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 20px;
  margin-top: 0;
  width: 80%;
}

.box-ex:hover {
  border: 1px solid #1d84f5;
}

.project1:hover,
.project2:hover,
.project3:hover,
.project4:hover {
  transform: translateY(-10px);
  border: 1px solid #1d84f5;
  .image-project1,
  .image-project2,
  .image-project3,
  .image-project4 {
    transform: scale(1.04);
  }
}

.image-project1 {
  display: flex;
  width: 100%;
  height: 350px;
  margin: 0;
  padding: 0;
  border: none;
  background-image: url("smart-home.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}
.image-project2 {
  display: flex;
  width: 100%;
  height: 350px;
  margin: 0;
  padding: 0;
  border: none;
  background-image: url("calorie-web.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}
.image-project3 {
  display: flex;
  width: 100%;
  height: 350px;
  margin: 0;
  padding: 0;
  border: none;
  background-image: url("siviglia-site.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}
.image-project4 {
  display: flex;
  width: 100%;
  height: 350px;
  margin: 0;
  padding: 0;
  border: none;
  background-image: url("bar-website.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}

.titleProject {
  font-size: 20px;
  color: var(--text1-color);
  font-weight: 500;
}
.boxIcon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background-preTitle);
  background-image: url("freccia-destra-dark.png");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid var(--background-preTitle-border);
  cursor: pointer;
}

.boxIcon:hover {
  background-color: #1d84f5;
  background-image: url("freccia-destra.png");
}

.buttonGit {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  padding: 5px 12px;
  width: fit-content;
  border-radius: 17px;
  gap: 10px;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  color: var(--text2-color);
  font-size: 12px;
  font-family: "Geist Mono Variable", monospace;
  white-space: nowrap;
  margin-top: 20px;
  transition: transform 0.1s ease;
  cursor: pointer;
}

.image-git {
  display: flex;
  width: 30px;
  height: 30px;
  background-image: url("git.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 30px;
  filter: invert(1);
  transition: filter 0.3s ease;
}

body.light-mode .image-git {
  filter: invert(0);
}

.git {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.43em;
  color: var(--text1-color);
}

.buttonGit:hover {
  background-color: var(--hover-color);
  transform: scale(1.04);
}

.box-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 70px 50px;
  margin: 0 auto;
  flex-direction: column;
  gap: 20px;
  width: 80%;
  height: auto;
  border: 1px solid var(--background-preTitle-border);
  background: radial-gradient(
    circle at 50% 0%,
    var(--gradient1-contact),
    var(--gradient2-contact),
    var(--gradient3-contact)
  );
  border-radius: 20px;
}

.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 150px;
  padding: 20px;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 15px;
  gap: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: border 0.3s ease;
}

.freccia {
  width: 14px;
  height: 14px;
  background-image: url("arrow.png");
  background-size: 14px;
}

.social .icon {
  transition: background-color 0.2s ease;
}

.social:hover {
  border: 1px solid #1d84f5;
  .freccia {
    background-image: url("freccia-destra.png");
  }
}

.social:hover {
  .icon {
    background-color: #1d84f5;
  }
}

footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
}

.social-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background-size: contain;
  background-color: var(--background-preTitle);
  border: 1px solid var(--background-preTitle-border);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.social-contact img {
  filter: invert(0);
  transition: filter 0.3s ease;
}
body.light-mode .social-contact img {
  filter: invert(1);
}

.social-contact:hover {
  transform: translateY(-5px) scale(1.08);
}

@keyframes pulsa {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(146, 188, 232, 0.8);
  }

  50% {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(146, 188, 232, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(146, 188, 232, 0);
  }
}

nav a:hover {
  background-color: var(--hover-color);
  border-radius: 20px;
  margin: 0px;
  color: var(--text1-color);
  align-items: center;
}

@media screen and (max-width: 1024px) {
  body {
    padding: 24px;
  }

  .menu {
    gap: 10px;
  }

  nav a {
    padding: 10px;
  }

  .preTitle {
    width: fit-content;
    max-width: 80%;
    padding: 8px 16px;
  }

  .title {
    font-size: 56px;
    text-align: center;
  }

  .describtion {
    width: 70%;
  }

  .boxes2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 10px;
  }

  .boxTech1,
  .boxTech2,
  .boxTech3,
  .boxTech4,
  .boxTech5 {
    width: 100%;
    margin-top: 20px;
  }

  .container-project {
    grid-template-columns: 1fr;
  }

  .container-boxes {
    width: 100%;
  }

  .box-contact {
    width: 100%;
  }

  .social {
    width: 100%;
  }
}
@media screen and (max-width: 768px) {
  body {
    padding: 15px;
    overflow-x: hidden;
  }

  nav {
    top: 10px;
    padding: 8px 10px;
    gap: 10px;
  }

  .row-name {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .menu {
    display: none;
  }

  .name {
    font-size: 12px;
    white-space: nowrap;
  }

  .button-contact {
    display: none;
  }

  .switch {
    padding: 8px;
    border-radius: 12px;
  }

  .switch img {
    width: 18px;
    height: 18px;
  }

  .preTitle {
    width: fit-content;
    max-width: 95%;
    margin-top: 70px;
    padding: 8px 12px;
    gap: 8px;
    font-size: 11px;
    text-align: center;
  }

  .point {
    flex-shrink: 0;
  }

  .title {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 42px;
    line-height: 1.1;
    text-align: center;
    margin-top: 25px;
  }

  .caratteristiche {
    padding: 0 10px;
    text-align: center;
    line-height: 1.5;
  }

  .I {
    display: block;
    width: 100%;
    max-width: 600px;
    padding: 0 10px;
    text-align: center;
    line-height: 1.6;
  }

  .buttons {
    gap: 15px;
    margin-top: 30px;
  }

  .view,
  .contact {
    width: 140px;
    padding: 12px 10px;
  }

  .text {
    font-size: 36px;
  }

  .describtion {
    width: 100%;
    font-size: 16px;
    margin-top: 30px;
  }

  .boxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .box {
    width: 100%;
  }

  .data {
    font-size: 40px;
  }

  .boxes2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .boxTech1,
  .boxTech2,
  .boxTech3,
  .boxTech4,
  .boxTech5 {
    width: 100%;
    margin-top: 20px;
  }

  .container-project {
    grid-template-columns: 1fr;
  }

  .project1,
  .project2,
  .project3,
  .project4 {
    margin-top: 25px;
  }

  .image-project1,
  .image-project2,
  .image-project3,
  .image-project4 {
    height: 260px;
  }

  .container-boxes {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .box-ex {
    margin-top: 20px;
  }

  .box-contact {
    width: 100%;
    padding: 50px 25px;
  }

  .social {
    width: 100%;
  }

  footer {
    padding: 20px 0;
    gap: 20px;
  }
}
@media screen and (max-width: 480px) {
  body {
    padding: 10px;
  }

  nav {
    width: 100%;
    padding: 7px;
    border-radius: 15px;
  }

  .row-name {
    gap: 6px;
  }

  .box-name {
    padding: 7px;
    font-size: 10px;
    border-radius: 10px;
  }

  .name {
    font-size: 11px;
  }

  .switch {
    padding: 7px;
  }

  .preTitle {
    max-width: 100%;
    margin-top: 60px;
    padding: 7px 10px;
    font-size: 9px;
    letter-spacing: 0;
    border-radius: 14px;
  }

  .point {
    width: 7px;
    height: 7px;
  }

  .title {
    display: block;
    font-size: 34px;
    line-height: 1.15;
  }

  .title span {
    display: inline;
  }

  .caratteristiche {
    font-size: 13px;
    padding: 0 5px;
  }

  .I {
    font-size: 14px;
    padding: 0 5px;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
  }

  .view,
  .contact {
    width: 100%;
    max-width: 280px;
  }

  .text {
    font-size: 30px;
  }

  .describtion {
    font-size: 15px;
    line-height: 1.55;
  }

  .boxes {
    grid-template-columns: 1fr;
  }

  .box {
    min-height: 100px;
  }

  .data {
    font-size: 36px;
  }

  .desc {
    font-size: 15px;
  }

  .boxTech1,
  .boxTech2,
  .boxTech3,
  .boxTech4,
  .boxTech5 {
    padding: 14px;
  }

  .descBox {
    gap: 7px;
  }

  .cont {
    padding: 10px 12px;
    font-size: 10px;
  }

  .image-project1,
  .image-project2,
  .image-project3,
  .image-project4 {
    height: 210px;
  }

  .titleProject {
    font-size: 18px;
  }

  .box-contact {
    padding: 40px 15px;
    border-radius: 16px;
  }

  .social {
    height: auto;
    min-height: 140px;
  }

  footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
