@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

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

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100dvh;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(
      ellipse 100% 50% at top center,
      #040612,
      #0d142a,
      transparent
    ),
    radial-gradient(
      ellipse 100% 50% at bottom center,
      #040612,
      #0d1b2a,
      transparent
    );
  background-color: #0c334f;
  color: #ffffffed;
  font-family:
    "Poppins",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
}
a,
a:visited {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
.header {
  position: sticky;
  top: 1rem;
  display: grid;
  place-content: center;
  height: 50px;
  font-size: clamp(0.75rem, calc(0.568rem + 0.909vw), 1rem);
  border-radius: calc(infinity * 1px);
  padding: 0.4rem 1rem;
  margin-bottom: 1rem;
  z-index: 100;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease;
}
.header.scrolled {
  background-color: rgba(4, 6, 18, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header nav {
  display: flex;
  gap: 1.5rem;
}
.header nav a {
  padding: 0.2rem 0.4rem;
  font-weight: 600;
  transition: color 0.3s ease;
}
.header nav a.active {
  color: #068cb8;
}
main {
  display: grid;
  gap: 2rem;
}
.work {
  grid-area: work;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.presentation {
  display: grid;
  gap: 1rem;
  grid-template-areas:
    "work"
    "title"
    "description"
    "contact";
  text-wrap: balance;
  height: 100%;
}
.profile-pic {
  grid-area: image;
  border-radius: 100%;
  width: 120px;
  height: 120px;
}

.presentation h1 {
  grid-area: title;
}
.presentation h1 span {
  color: #f5901d;
}
.presentation p {
  grid-area: description;
  font-size: clamp(1rem, calc(0.636rem + 1.818vw), 1.5rem);
}
.presentation p span {
  color: #f7df1e;
}

.presentation a {
  grid-area: anchor;
  align-self: center;
  justify-self: left;
  display: grid;
  place-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;

  background-color: #040612;
  font-size: 0.8rem;
  font-weight: 600;
}
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.avaible {
  overflow: hidden;
  padding: 1px;
  position: relative;
  display: inline-flex;
  border-radius: calc(infinity * 1px);
}
.avaible span {
  position: absolute;
  background-image: conic-gradient(
    from 90deg at 50% 50%,
    #068cb8,
    #0c334f,
    #0d1b2a,
    #0c334f,
    #068cb8
  );
  inset: -1000%;
  animation: rotate 2s linear infinite;
}
.avaible a {
  z-index: 10;
}

.contact-main {
  grid-area: contact;
  display: flex;
  gap: 1rem;
  list-style: none;
}
.contact-main a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid #068cb8;
  background-color: #040612;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}
.contact-main img {
  width: 1rem;
  height: 1rem;
}

#projects {
  position: relative;
  display: grid;
}

#projects h2 {
  z-index: 10;
  border: 2px solid #068cb8;
  text-shadow: 0 0 5px #111;
  border-radius: 0.25rem;
  text-align: center;
  background: radial-gradient(
    ellipse at center center,
    #040612,
    #0d142a,
    #0c334f
  );
  font-size: 2rem;
  margin-bottom: 1rem;
}

.line {
  position: absolute;
  top: 40px;
  left: 20px;
  width: 2px;
  height: 80%;
  background-color: #068cb8;
}

.projects-container {
  z-index: 10;
  overflow: hidden;
}

.project-image {
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border-radius: 0.25rem;
  border: 1px solid #068cb8;
}

.project-anchor {
  position: relative;
}

.project-anchor h3 {
  text-wrap: balance;
  font-size: clamp(1rem, calc(0.909rem + 0.455vw), 1.25rem);
  position: absolute;
  bottom: 0.4rem;
  left: 0;
  width: 100%;
  background: linear-gradient(
    to top,
    rgba(20, 14, 4, 0.88) 0%,
    rgba(10, 8, 3, 0.55) 70%,
    transparent 100%
  );
  backdrop-filter: blur(4px);
  padding: 1rem;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-right: 1px solid #068cb8;
  border-left: 1px solid #068cb8;
  border-bottom: 1px solid #068cb8;
}
.project-name-pc {
  display: none;
}
.projects-container p {
  font-size: clamp(0.813rem, calc(0.699rem + 0.568vw), 1.125rem);
  line-height: 1.5;
  text-wrap: balance;
  max-width: 90%;
  margin: 1rem 0 0.5rem 2.5rem;
}

.ul-tec-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.5rem 0 1rem 2.5rem;
}
.tec-projects {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid #068cb8;
  background-color: #040612;
  font-size: 0.8rem;
  font-weight: 600;
}
.tec-projects img {
  width: 1rem;
  height: 1rem;
}
.ul-code-preview {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0.5rem 0 2.5rem 2.5rem;
}
.code,
.preview {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid #068cb8;
  background-color: #040612;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}
.code img,
.preview img {
  width: 1rem;
  height: 1rem;
}

#about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 100vw;
  height: auto;
  padding: 1rem;
}
#about h2,
.h2-pc {
  text-align: center;
  width: 100%;
  background: radial-gradient(
    circle at center center,
    #111,
    #040612,
    transparent
  );
  text-shadow: 0 0 5px #068cb8;
}
#about span {
  position: relative;
}
#about img {
  width: 60vw;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 3px;
  box-shadow: 0 1px 10px #068cb8;
}
#about span > span {
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0c334f;
  z-index: -1;
  border-radius: 3px;
  transform: rotate(10deg);
}
#about div {
  display: grid;
  gap: 1rem;
}
#about div p > span {
  color: #f5901d;
}
.h2-pc {
  display: none;
}
footer {
  display: grid;
  place-content: center;
  gap: 0.5rem;
  width: 100%;
  font-size: clamp(0.75rem, calc(0.568rem + 0.909vw), 1rem);
  margin: 2rem 0 1rem 0;
}
footer ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
}
footer ul a {
  position: relative;
  padding: 0.2rem 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: calc(infinity * 1px);
  overflow: hidden;
  z-index: 1;
}

footer ul a:hover {
  color: #fff;
  transform: scale(1.1);
}
footer > p > a {
  font-weight: 600;
  transition: color 0.3s ease;
}
footer > p > a:hover {
  color: #068cb8;
}
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(4, 6, 18, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  position: relative;
  background: linear-gradient(135deg, #0d142a 0%, #0c334f 100%);
  border: 1px solid #068cb8;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal.active .modal-content {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: none;
  border: none;
  color: #ffffffed;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}
.modal-close:hover {
  color: #068cb8;
}
.modal-content h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 5px #068cb8;
}
.modal-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}
.modal-contact-list li a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: rgba(4, 6, 18, 0.6);
  border: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}
.modal-contact-list li a:hover {
  background-color: rgba(6, 140, 184, 0.1);
  border-color: #068cb8;
  transform: translateX(5px);
}
.modal-contact-list li a img {
  width: 1.5rem;
  height: 1.5rem;
}
.modal-contact-list li a span {
  font-weight: 600;
}

.wsp-floating-icon {
  z-index: 100;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #040612;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.wsp-floating-icon::before {
  content: "";
  position: absolute;
  inset: -1000%;
  background-image: conic-gradient(
    from 90deg at 50% 50%,
    #068cb8,
    #0c334f,
    #0d1b2a,
    #0c334f,
    #068cb8
  );
  animation: rotate 2s linear infinite;
  z-index: -1;
}
.wsp-floating-icon::after {
  content: "";
  position: absolute;
  inset: 1px;
  background-color: #040612;
  border-radius: 50%;
  z-index: -1;
}
.wsp-floating-icon img {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 2px #50a8b7);
  position: relative;
  z-index: 10;
}
.wsp-floating-icon:hover {
  transform: scale(1.1);
}

@media (min-width: 1200px) {
  main {
    max-width: 50vw;
  }
  .project-anchor h3 {
    display: none;
  }
  .projects-container > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
  }
  .project-image {
    transition: filter 0.3s ease;
    filter: brightness(0.9);
  }
  .project-image:hover {
    filter: brightness(1.2);
  }
  .project-name-pc {
    display: grid;
    align-items: center;
    text-wrap: balance;
  }
  .ul-tec-projects {
    margin: 0.5rem 0;
  }
  .projects-container p {
    margin: 0.5rem 0;
  }
  .projects-container > div {
    margin-bottom: 3rem;
  }
  .contact-main a:hover {
    background-color: #0c334f;
    color: #fff;
    transform: scale(1.2);
  }
  #projects h2 {
    margin-bottom: 3rem;
  }
  .ul-code-preview {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0.5rem 0;
  }
  .code:hover,
  .preview:hover {
    background-color: #0c334f;
    color: #fff;
    transform: scale(1.2);
  }
  #about img {
    grid-area: image;
    width: 20vw;
  }
  #about > h2 {
    display: none;
  }
  .h2-pc {
    display: inline-block;
  }
  #about {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 50vw;
  }
  #about > div {
    display: grid;
    gap: 1.5rem;
  }
}
