/* INIZIO RESET CSS */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* FINE RESET CSS */

/* INIZIO ROOT */

:root {
  --bg-color: #f5f5f5;
  --text-color: #121212;
  --color-section-primary: #a30e2b;
  --color-section-secondary: #2a2a2a;
  --color-background: #c2c2c2;
  --content-width: 1000px;
  --nav-height: 70px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
}

/* FINE ROOT */

/* INIZIO TYPOGRAPHY  */

h1 {
  font-size: 3.8125rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

h2 {
  font-size: 3.0625rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

h3 {
  font-size: 2.4375rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

h4 {
  font-size: 1.9375rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

h5 {
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

h6 {
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

p {
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

a {
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

b {
  color: #121212;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

label {
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

input,
textarea::placeholder {
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* FINE  TYPOGRAPHY  */

/* INIZIO PULSANTI */

.btn {
  border-radius: 1.5625rem;
  padding: 1rem 2rem;
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-align: center;
}

.btn-black {
  background: var(--text-color);
  color: var(--bg-color);
}

.btn-black:hover {
  background: var(--color-section-primary);
}

.btn-red {
  background: var(--color-section-primary);
  color: var(--bg-color);
}

.btn-red:hover {
  background-color: var(--color-section-secondary);
}

.btn-white {
  border: 1px solid #121212;
}

.btn-white:hover {
  background-color: var(--color-section-secondary);
  color: var(--bg-color);
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
select,
button {
  font-family: inherit;
}

/* FINE PULSANTI */

/* INIZIO HEADER */
header {
  margin: 0 3.75rem 0 3.75rem;
  padding: 3.31rem 0 1.44rem 0;
}

header.flex-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #c2c2c2;
}

ul {
  gap: 3.06rem;
}

.nav-red {
  display: inline-flex;
  align-items: center;
  gap: 0.87rem;
  color: var(--color-section-primary);
}

/* menu desktop */
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* hamburger (icona) */
.burger {
  position: relative;
  width: 40px;
  height: 30px;
  background: transparent;
  cursor: pointer;
  display: none;
}
.burger span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #000;
  border-radius: 9px;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}
.burger span:nth-of-type(1) {
  top: 0;
  transform-origin: left center;
}
.burger span:nth-of-type(2) {
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
}
.burger span:nth-of-type(3) {
  top: 100%;
  transform: translateY(-100%);
  transform-origin: left center;
}

header.flex-nav:has(#nav-toggle:checked) {
  border-bottom-color: transparent;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .burger {
    display: block;
  }
  /* menu nascosto */
  .nav-links {
    flex-basis: 100%;
    flex-direction: column;
    text-align: center;
    border-radius: 0 0 1.5625rem 1.5625rem;
    background: rgba(194, 194, 194, 0.3);
    overflow: hidden;
    max-height: 0; /* chiuso */
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    padding: 0;
    margin-top: 1.44rem;
    pointer-events: none;
  }

  /* quando il checkbox è attivo → menu aperto */
  #nav-toggle:checked ~ .nav-links {
    max-height: 500px; /* valore abbastanza grande per contenere tutti i link */
    opacity: 1;
    transform: translateY(0);
    padding: 1rem 0;
    pointer-events: auto;
  }

  /* animazione icona */
  #nav-toggle:checked + label.burger span:nth-of-type(1) {
    transform: rotate(45deg);
    top: 0;
    left: 5px;
  }
  #nav-toggle:checked + label.burger span:nth-of-type(2) {
    width: 0;
    opacity: 0;
  }
  #nav-toggle:checked + label.burger span:nth-of-type(3) {
    transform: rotate(-45deg);
    top: 28px;
    left: 5px;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* FINE HEADER */

/* INIZIO MAIN */

.flex-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Inizio sezione hero */

.hero-section {
  gap: 18.19rem;
  margin: 7.88rem 3.75rem 16.13rem 3.75rem;
}

.hero-section span {
  color: var(--color-section-primary);
}

.hero-section p {
  max-width: 18.1875rem;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 300;
  margin: 1.38rem 0 3.88rem 0;
}

.hero-section-btn {
  display: flex;
  gap: 2.38rem;
}

.img-profilo {
  max-width: 19.375rem;
  max-height: 25.8125rem;
}

/* Fine sezione hero */

/* Inizio sezione chi sono */

.img-scrivania-mobile {
  display: none;
}

.chisono-section {
  gap: 7rem;
  padding: 9.13rem 3.75rem;
  border-radius: 1.5625rem;
  background: #c2c2c2;
}

.img-scrivania {
  max-width: 29.125rem;
  max-height: 31.5rem;
}

.chisono-section p {
  max-width: 31rem;
  margin: 1rem 0 1.13rem 0;
}

.chisono-section .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.87rem;
}
/* Fine sezione chi sono */

/* Inizio sezione skills */

.skills-section {
  margin: 4.88rem 3.75rem 11.87rem 3.75rem;
}

.img-skills {
  max-width: 6.63381rem;
  max-height: 6.63381rem;
}

.skills-section p {
  max-width: 16.6875rem;
}

.skills-section .flex-section {
  gap: 5.25rem;
  padding-top: 8.06rem;
}

.skills-section .flex-section div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Fine sezione skills */

/* Inizio sezione projects */
.projects-section h2 {
  margin: 0 3.75rem 3.44rem 3.75rem;
}

.heading-number {
  font-size: 9.375rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.projects-section h3 {
  max-width: 49.6875rem;
}

.projects-section p {
  max-width: 37.5rem;
  margin: 0.94rem 0 2.19rem 0;
}

.projects-section img {
  max-width: 33.25rem;
  max-height: 19.5rem;
}

.project-one {
  border-radius: 1.5625rem 1.5625rem 0 0;
  background: linear-gradient(180deg, #c7bd93 0%, #657126 100%);
}

.project-two {
  border-radius: 1.5625rem 1.5625rem 0 0;
  background: linear-gradient(180deg, #e89e47 0%, #817fd1 100%);
  margin-top: -1.38rem;
}

.project-three {
  border-radius: 1.5625rem 1.5625rem 0 0;
  background: linear-gradient(180deg, #a0d2de 0%, #404653 100%);
  margin-top: -1.38rem;
}

.project-one,
.project-two,
.project-three {
  justify-content: space-between;
  align-items: flex-start;
  padding: 7.5rem 3.75rem 6.81rem 3.75rem;
  height: 53.125rem;
}

.project-one div:last-of-type,
.project-two div:last-of-type,
.project-three div:last-of-type {
  align-self: flex-end;
}

/* Fine sezione projects */

/* Inizio sezione contatti */

.contacts-section {
  margin: 4.31rem 3.75rem 6.88rem 3.75rem;
  justify-content: space-between;
  align-items: flex-start;
}

.contacts-section p {
  max-width: 28.4375rem;
  margin: 0.5rem 0 2.69rem 0;
}

.social-section {
  display: flex;
  gap: 2.06rem;
}

/* Fine sezione contatti */

/* Inizio sezione form */
.contacts-section h4 {
  margin-bottom: 1.19rem;
}

.form-field {
  display: flex;
  flex-direction: column;
}

input,
textarea {
  border-radius: 1.5625rem;
  border: 1px solid #2a2a2a;
  width: 27.875rem;
  margin-bottom: 1.5rem;
  height: 3.125rem;
  padding-left: 1.31rem;
}

input:focus,
textarea:focus {
  outline: none;
  border: 2px solid var(--color-section-primary);
}

textarea {
  height: 10rem;
  padding-top: 0.94rem;
}

button {
  width: 27.875rem;
  border: none;
}

label {
  margin-bottom: 0.56rem;
}
/* Fine sezione form */

/* FINE MAIN */

/* INIZIO FOOTER */

footer {
  text-align: center;
  margin: 0 3.75rem 3.13rem 3.75rem;
  padding: 2.62rem 0 3.13rem 0;
  border-top: 1px solid #c2c2c2;
}

footer h5 {
  margin-bottom: 0.31rem;
}

footer img {
  width: 2.6875rem;
  height: 2.5625rem;
  display: block;
  margin: 0 auto;
}
/* FINE FOOTER */

/* ------INIZIO MEDIA RESPONSIVE MOBILE------ */

@media (max-width: 1024px) {
  /* INIZIO TYPOGRAPHY  */

  h1 {
    font-size: 2.4375rem;
  }

  h2 {
    font-size: 1.9375rem;
  }

  h3 {
    font-size: 1.9375rem;
  }

  h4 {
    font-size: 1.5625rem;
  }

  h5 {
    font-size: 1rem;
  }

  h6 {
    font-size: 0.8125rem;
  }

  p {
    font-size: 1rem;
  }

  a {
    font-size: 1rem;
  }

  label {
    font-size: 1rem;
  }

  input,
  textarea::placeholder {
    font-size: 1rem;
  }

  /* FINE  TYPOGRAPHY  */

  /* INIZIO PULSANTI */

  .btn {
    font-size: 1rem;
  }

  /* FINE PULSANTI */

  /* INIZIO HEADER */
  header {
    margin: 0 1rem 0 1rem;
    padding: 2.88rem 0 1.44rem 0;
  }

  .header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-color);
  }

  .flex-nav {
    display: flex;
    justify-content: space-between;
  }

  ul {
    gap: 3.06rem;
  }

  .nav-red {
    display: inline-flex;
    align-items: center;
    gap: 0.87rem;
    color: var(--color-section-primary);
  }

  /* FINE HEADER */

  /* INIZIO MAIN */

  .flex-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Inizio sezione hero */

  .hero-section {
    gap: 2.34rem;
    margin: 4.37rem 0 5.13rem 0;
  }

  .hero-section p {
    max-width: 19.25rem;
    margin: 0.69rem 0 2.62rem 0;
    text-align: center;
  }

  .hero-section h1,
  .hero-section h4 {
    text-align: center;
  }

  .hero-section-btn {
    flex-direction: column;
    gap: 1.25rem;
  }

  .img-profilo {
    order: -1;
    max-width: 12.65163rem;
    max-height: 16.851rem;
  }

  /* Fine sezione hero */

  /* Inizio sezione chi sono */

  .chisono-section {
    gap: 2.31rem;
    padding: 5.06rem 1rem;
  }

  .img-scrivania {
    display: none;
  }

  .img-scrivania-mobile {
    display: block;
    width: 22.375rem;
    height: 15.9375rem;
  }

  .chisono-section p {
    margin: 0.5rem 0 2.06rem 0;
  }

  /* Fine sezione chi sono */

  /* Inizio sezione skills */

  .skills-section {
    margin: 4.25rem 1rem 7.06rem 1rem;
  }

  .img-skills {
    width: 4.375rem;
    height: 4.375rem;
  }

  .skills-section p {
    width: 9.375rem;
    height: 4.5rem;
  }

  .skills-section .flex-section {
    gap: 2.63rem;
    padding-top: 4.25rem;
    flex-direction: row;
    flex-wrap: wrap;
  }

  /* Fine sezione skills */

  /* Inizio sezione projects */
  .projects-section h2 {
    margin: 0 1rem 2.19rem 1rem;
  }

  .projects-section .flex-section {
    align-items: center;
  }

  .heading-number {
    font-size: 6.25rem;
  }

  .projects-section h3 {
    max-width: 22.375rem;
  }

  .projects-section p {
    max-width: 22.375rem;
    margin: 0 0 3.12rem 0;
  }

  .projects-section img {
    max-width: 22.375rem;
    max-height: 11.5625rem;
  }

  .project-one,
  .project-two,
  .project-three {
    justify-content: space-between;
    align-items: flex-start;
    padding: 5rem 1rem 7.5rem 1rem;
    height: 56.25rem;
  }

  .project-one div:last-of-type,
  .project-two div:last-of-type,
  .project-three div:last-of-type {
    align-self: center;
  }

  .projects-section a.btn-black.btn {
    width: 22.375rem;
    display: inline-flex;
    justify-content: center;
  }

  /* Fine sezione projects */

  /* Inizio sezione contatti */

  .contacts-section {
    margin: 2.19rem 1rem 5.75rem 1rem;
    justify-content: center;
    align-items: center;
    gap: 5rem;
  }

  .contacts-section p {
    max-width: 22.375rem;
    margin: 0.5rem 0 1.25rem 0;
  }

  .social-section {
    display: flex;
    gap: 2.37rem;
  }

  .social-section img {
    width: 2.5rem;
    height: 2.5rem;
  }

  /* Fine sezione contatti */

  /* Inizio sezione form */
  .contacts-section h4 {
    margin-bottom: 1.37rem;
  }

  input,
  textarea {
    width: 22.375rem;
    margin-bottom: 1.5rem;
    height: 3.125rem;
    padding-left: 1.31rem;
  }

  textarea {
    height: 10rem;
    padding-top: 0.94rem;
  }

  button {
    width: 22.375rem;
  }

  label {
    margin-bottom: 0.38rem;
  }
  /* Fine sezione form */

  /* FINE MAIN */

  /* INIZIO FOOTER */

  footer {
    margin: 0 1rem 3.13rem 1rem;
    padding: 2.62rem 0 3.13rem 0;
  }

  footer img {
    width: 2.375rem;
    height: 2.25rem;
  }
  /* FINE FOOTER */
}

/* ------FINE MEDIA RESPONSIVE MOBILE------ */
