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

:root {
  --primary-color: #156064;
  --secondary-color: #61dafb;
  --bg-color: #121420;

  font-size: 62.5%;

  --nav-height: 7rem;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  height: 100%;
}

body * {
  font-family: 'DM Sans', sans-serif;
}

body {
  background-color: var(--bg-color);

  text-align: center;
  font-size: 1.6rem;

  overflow: overlay;
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
}

.wrapper {
  width: min(50rem, 100%);
  margin-inline: auto;
  padding-inline: 2.4rem;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

section {
  padding-top: 10rem;
}

section header h4 {
  color: var(--primary-color);
  font-size: 1.6rem;
  line-height: 3rem;

  text-transform: uppercase;
}

section header h1 {
  font-size: clamp(3rem, 2rem + 3vw, 4rem);
  color: var(--secondary-color);
  margin: 1.6rem 0 2.4rem;
}

section .content p {
  color: var(--primary-color);
  font-size: 1.8rem;
  line-height: 2.7rem;
  font-weight: 700;
}

section .content strong {
  color: var(--secondary-color);
}

.button {
  background: var(--secondary-color);
  color: var(--primary-color);

  font-size: 1.4rem;
  font-weight: 700;

  text-transform: uppercase;
  text-decoration: none;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  width: fit-content;

  padding: 1.6rem 5.2rem;
  margin-botton: 6rem;
  border-radius: 4rem;

  transition: filter 0.2s;
}

.button:hover {
  filter: brightness(0.9);
  color: var(primary-color);
}

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

/*================= NAVIGATE =================*/
nav {
  height: var(--nav-height);
  border-bottom: 1px solid var(--primary-color);
  background-color: var(--bg-color);

  display: flex;

  width: 100%;

  position: fixed;
  top: 0;
  z-index: 100;
}

nav .logo img {
  width: 11.6rem;
}

nav .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav button {
  background: none;
  border: none;
  cursor: pointer;
}

nav .menu,
nav .close-menu {
  position: fixed;
}

/*================= MENU EXPANDED =================*/
body.menu-expanded {
  overflow: hidden;
}

body.menu-expanded > :not(nav) {
  visibility: hidden;
}

.menu,
.close-menu,
body.menu-expanded .open-menu {
  opacity: 0;
  visibility: hidden;
}

body.menu-expanded .menu,
body.menu-expanded .close-menu {
  opacity: 1;
  visibility: visible;
}

.menu {
  transform: translateY(100%);
}

body.menu-expanded .menu {
  top: 0;
  left: 0;

  background: var(--primary-color);
  width: 100%;
  height: 100vh;
  padding-top: var(--nav-height);

  transition: transform 300ms;
  transform: translateY(0);
}

.menu ul:nth-child(1) {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;

  margin-top: 6rem;

  font-size: 2.4rem;
  line-height: 3.1rem;
  font-weight: 700;
}

.menu ul li a {
  color: var(--secondary-color);
  text-decoration: none;
}

.menu .button {
  color: var(--secondary-color);

  background: #156064;
  box-shadow: 5px 5px 10px #125458, -5px -5px 10px #186c70;

  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;

  display: inline-block;
  padding: 1.6rem 3.2rem;
  margin: 4.8rem 0.8rem;
  border-radius: 4rem;

  transition: filter 0.2s;
}

.menu .button:hover {
  filter: brightness(0.9);
  color: var(primary-color);
}

.menu .button:active {
  box-shadow: inset 5px 5px 7px #125458, inset -5px -5px 7px #186c70;
  font-size: 17px;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.2rem;
}

body.menu-expanded .logo,
body.menu-expanded button {
  position: relative;
  z-index: 100;
}

/*================= HOME =================*/
#home {
  margin-top: 4rem;
}

section#home header h1 {
  font-size: clamp(3.4rem, 2rem + 3vw, 5.2rem);
  color: var(--secondary-color);
  margin: 1.6rem 0 2.4rem;
}

section#home header h3 {
  color: var(--primary-color);
  font-size: clamp(2rem, 1rem + 2vw, 4rem);
  line-height: 3rem;
}

#home .content p {
  width: 26.4rem;
  text-align: center;
  margin-inline: auto;
}

#home .button {
  margin: 3.2rem auto 5.5rem;
}

#home .col-b img {
  width: 26.8rem;
}

.skills-banner .wrapper {
  margin-top: -1rem;
  height: 64px;
  background: var(--primary-color);
  border-top: 1px solid var(--secondary-color);
  border-bottom: 1px solid var(--secondary-color);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;

  overflow: hidden;

  width: 100%
}

/*================= BANNER SKILLS =================*/
.skills-banner img {
  width: 2.5rem;
  animation: banner 40s linear infinite;
}

@keyframes banner {
  0% {
    transform: translateX(-900%);
  }

  50% {
    transform: translateX(900%);
  }

  100% {
    transform: translateX(-900%);
  }
}

/*================= ABOUT =================*/
#about {
  text-align: left;
}

#about p {
  text-align: justify;
}

#about p:nth-child(1) {
  margin-bottom: 3.4rem;
}

#about .col-b img {
  margin-top: 6rem;
  width: 31.5rem;
}

/*================= SKILLS =================*/
#skills h2 {
  font-size: clamp(2rem, 2rem + 3vw, 3rem);
  color: var(--secondary-color);
  margin: 2rem 0 4rem;
}

#skills .skills-using {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 5rem;
}

#skills .line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5.2rem;
}

#skills .line img {
  width: 3.5rem;
  height: 3.5rem;
}

#skills .line .skill {
  width: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

#skills .line .skill span {
  font-size: 1.4rem;
  color: var(--primary-color);
  text-transform: uppercase;
  font-weight: 700;
}

/*================= PORTFOLIO =================*/
#portfolio .projects .project {
  margin-top: 5rem;
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: 3.6rem;

  box-shadow: 0.4rem 0.4rem 0.4rem var(--primary-color), 0.4rem 0.4rem 0.4rem;
  border-radius: 1rem;
}

#portfolio .projects .project {
  position: relative;
}

#portfolio .projects .project img {
  border-radius: 1rem;
}

#portfolio .projects .project .links {
  position: absolute;
  top: 50%;
  z-index: 1;
  margin-top: -5rem;

  width: 100%;
  height: 10rem;
  background: var(--primary-color);

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;

  opacity: 0;
  visibility: hidden;

  transform: translateY(50%);
  transition: transform 0.5s ease-in;
}

#portfolio .projects .project:hover .links {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#portfolio .projects .project .links a {
  color: var(--secondary-color);

  background: #156064;
  box-shadow: 5px 5px 10px #125458, -5px -5px 10px #186c70;

  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;

  padding: 1.6rem 3.2rem;
  border-radius: 4rem;

  transition: filter 0.2s;
}

#portfolio .projects .project .links a:hover {
  filter: brightness(0.9);
  color: var(primary-color);
}

#portfolio .projects .project .links a:active {
  box-shadow: inset 5px 5px 7px #125458, inset -5px -5px 7px #186c70;
  font-size: 17px;
}

/*================= CONTACT =================*/
#contact {
  text-align: left;
  padding-bottom: 10rem;
}

#contact header {
  margin-bottom: 4rem;
}

#contact header h1 {
  text-transform: uppercase;
}

#contact ul {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

#contact ul li {
  color: var(--primary-color);

  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#contact .button {
  margin-top: 3.2rem;
  margin-bottom: 6rem;
}

/* FORM */
#contact form {
  background: var(--primary-color);
  padding: 5rem 4rem;
  width: 100%;

  border-radius: 1rem;

  display: flex;
  flex-direction: column;
}

#contact form fieldset {
  border: none;
}

#contact form .fieldset-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#contact form legend {
  color: var(--secondary-color);
  font-size: 2rem;

  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

#contact form input {
  width: 100%;
  height: 3.4rem;
  padding: 1.6rem;

  border: none;
  border-radius: 0.4rem;

  background: var(--secondary-color);
  color: var(--primary-color);
  font-weight: 700;
}

#contact form textarea {
  width: 100%;
  height: 6rem;
  margin-bottom: 2rem;
  resize: none;
  padding: 1.6rem;

  color: var(--primary-color);
  font-weight: 700;
  background: var(--secondary-color);

  border: none;
  border-radius: 0.4rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--primary-color);
  opacity: 0.7;
  font-weight: 400;
}

#contact form button {
  color: var(--secondary-color);

  background: #156064;
  box-shadow: 5px 5px 10px #125458, -5px -5px 10px #186c70;

  width: fit-content;
  padding: 0.8rem 1.6rem;

  display: flex;
  align-items: center;
  gap: 0.5rem;

  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.4rem;
  border: none;

  cursor: pointer;
  transition: filter 0.2s;
}

#contact form button:hover {
  filter: brightness(0.9);
}

/* THANKS */
.thanks {
  height: 100vh;
  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: var(--primary-color);
  color: var(--secondary-color);
  min-width: 30rem;
  padding: 3rem;

  display: flex;
  flex-direction: column;
  align-items: center;

  border-radius: 1rem;
}

.container h2 {
  margin-bottom: 1.6rem;
}

.container a {
  text-decoration: none;
  border-radius: 1rem;

  color: var(--secondary-color);

  background: #156064;
  box-shadow: 5px 5px 10px #125458, -5px -5px 10px #186c70;

  width: fit-content;
  padding: 0.8rem 1.6rem;

  transition: filter 0.2s;
}

.container a:hover {
  filter: brightness(0.9);
}

/*================= FOOTER =================*/
footer {
  background: black;
  padding-block: 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

footer .wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.4rem;
}

footer .logo {
  text-align: left;
}

footer .logo img {
  width: 19.1rem;
  margin-bottom: 0.9rem;
}

footer span {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: block;
  text-align: left;
}

/* BACK TO TOP */
#backToTopButton {
  position: fixed;
  bottom: 1rem;
  right: 2.5rem;

  opacity: 0;
  visibility: 0;

  transform: translateY(100%);
  transition: 200ms;
}

#backToTopButton.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/*================= RESPONSIVE =================*/
@media (min-width: 1024px) {
  /*================= GERAL =================*/
  body {
    overflow: auto;
  }

  .wrapper {
    width: min(112rem, 100%);
    display: grid;
  }

  .col-a {
    grid-area: A;
    text-align: left;
  }

  .col-b {
    grid-area: B;
  }

  section {
    padding-top {
      16rem;
    }
  }

  /*================= NAVIGATION =================*/
  /* RESET */
  nav#navigation .wrapper * {
    margin: 0;
    padding: 0;
    visibility: initial;
    display: initial;
    opacity: initial;
    flex-direction: initial;
    position: initial;
    font-size: initial;
    font-weight: initial;
    transform: initial;
    color: initial;
    background-color: initial;
    filter: initial;
  }

  nav#navigation .logo img {
    width: 16.1rem
  }

  nav#navigation .close-menu,
  nav#navigation .open-menu,
  nav#navigation .social-links {
    display: none;
  }

  nav#navigation .menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 65%;
  }

  nav#navigation .menu ul:nth-child(1) {
    display: flex;
    gap: 3.2rem;
  }

  nav#navigation .menu ul li a {
    color: var(--secondary-color);
    opacity: 0.7;
  }

  nav#navigation .menu a.button {
    display: flex;
    justify-content: center;
    padding: 1rem 2.4rem;

    color: var(--secondary-color);

    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.8rem;
    text-transform: uppercase;

    transition: filter 0.2s;
  }

  nav#navigation .menu a.button:hover {
    filter: brightness(.9)
  }

  nav#navigation .menu li a {
    transition: opacity 0.4s;
  }

  nav#navigation .menu li a.active,
  nav#navigation .menu li a:hover {
    opacity: 1;
    font-weight: 700;
  }

  nav#navigation .menu li a::after {
    content: '';
    width: 0%;
    height: 2px;

    background: var(--secondary-color);

    position: relative;
    bottom: -2rem;
    display: block;

    transition: width 0.2s;
  }

  nav#navigation .menu li a.active::after,
  nav#navigation .menu li a:hover::after {
    width: 100%;
  }

  /*================= HOME =================*/
  #home .wrapper {
    grid-template-columns: 60.5rem 1fr;
    grid-template-areas: 'A B';
  }

  #home .col-a {
    text-align: left;
    align-self: center;
  }

  #home .content p {
    text-align: left;
    width: 47rem;
    margin: 0;
    margin-bottom: 3rem;

  }

  #home .content .button {
    margin: 0;
  }

  #home .col-b img {
    width: 46.1rem;
  }

  /*================= skills-banner =================*/
  .skills-banner {

  }

  .skills-banner img {
    width: 4rem;
    height: 4rem;
  }

  .skills-banner .wrapper {
    width: min(107.2rem, 100%);
    margin-inline: auto;

    border: 1px solid var(--secondary-color);
  }

  /*================= ABOUT =================*/
  #about .wrapper {
    grid-template-column: 4.8rem 1fr;
    grid-template-areas: 
      'B A';
    gap: 8.4rem;
  }

  #about .col-a {
    align-self: center;
  }

  #about .col-b img {
    width: 50.8rem;
  }

  /*================= SKILLS =================*/
  section#skills .line {
    gap: 11rem;
  }

  section#skills .line img {
    width: 7.5rem;
    height: 7.5rem;
  }
  
  section#skills .line .skill {
    width: 8rem;
  }

  section#skills .line .skill span {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  /*================= PORTFOLIO =================*/
  .projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .projects .project {
    max-width: 32rem;
  }

  #portfolio .projects .project img {
    height: 18rem;
  }

  /*================= CONTACT =================*/
  #contact .wrapper {
    grid-template-columns: 1fr 57rem; 
    grid-template-areas: 
      'A B';

    margin-top: 5rem;
  }

  #contact .col-a {
    align-self: center;
  }

  #contact form input {
    height: 4.6rem;

    font-size: 1.6rem;
  }

  #contact form textarea {
    height: 8rem;

    font-size: 1.6rem;
  }

  
/*================= FOOTER =================*/

  footer {
    display: flex;
    flex-direction: row;
  }

  footer div.wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'A B';
    
    flex-direction: row;  
    justify-content: space-between;
    align-items: center;
  }

  footer .col-a {
    align-self: center;
  }

  footer .col-a span {
    display: block;
  }

  footer .col-b {
    align-self: center;
    justify-self: end;
  }
}
