/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 4.5rem;

  /* Colors */
  --first-color: hsl(266, 89%, 61%);
  --text-color: hsl(252, 26%, 3%);
  --body-color: hsl(0, 0%, 82%);
  --line-color: hsla(0, 0%, 10%, 0.4);
  --white-color: hsl(0, 0%, 100%);
  --blur-effect: hsla(0, 0%, 0%, 0.75);
  --hover-effect: hsl(266, 89%, 56%);

  /* Typography */
  --body-font: "Roboto", sans-serif;
  --biggest-font-size: 2.5rem;
  --h1-font-size: 1.75rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;

  /* Font weight */
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /* Z-index */
  --z-tooltip: 10;
  --z-fixed: 100;

  /* Spacing */
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/*========== Dark theme ==========*/
:root.dark-mode {
  --text-color: hsl(0, 0%, 100%);
  --body-color: hsl(252, 26%, 3%);
  --line-color: hsla(0, 0%, 89%, 0.4);
  --blur-light: hsla(0, 0%, 0%, 0.75);
}

:root.dark-mode button .moon {
  display: none;
}
:root.dark-mode button .sun {
  display: block;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.5rem;
    --h1-font-size: 3rem;
    --h2-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  background-color: var(--body-color);
  transition: background-color 0.4s;
}

h1,
h2,
h3,
h4,
p {
  color: var(--text-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

button {
  border: 0;
  cursor: pointer;
  background-color: transparent;
}

/*=============== REUSABLE CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: var(--spacing-md);
}

.grid {
  display: grid;
  gap: var(--spacing-sm);
}

.section {
  padding-block: var(--spacing-sm) 0;
}

.section__title-1,
.section__title-2 {
  position: relative;
  font-size: var(--h1-font-size);
  width: max-content;
  margin: 0.35rem auto;
}

.section__title-1 span,
.section__title-2 span {
  z-index: 5;
  position: relative;
}

.section__title-1::after,
.section__title-2::after {
  content: "";
  width: 40px;
  height: 28px;
  background-color: hsla(266, 89%, 61%, 0.2);
  position: absolute;
  top: -4px;
  right: -8px;
}

.section__title-2::after {
  top: initial;
  bottom: -4px;
}

.main {
  overflow: hidden;
}

/*=============== SOCIAL MEDIA & LINKS ===============*/
.social-link {
  color: var(--text-color);
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: 50%;
  display: inline-grid;
  text-align: center;
  transition: transform 0.3s;
}

.social-link:hover {
  transform: scale(1.1);
}

.hover-link:hover {
  color: var(--hover-effect);
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: box-shadow 0.4s;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line-color);
  background-color: var(--body-color);
}

.nav {
  display: flex;
  position: relative;
  height: var(--header-height);
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-size: 1.31rem;
  color: var(--text-color);
  font-weight: var(--font-bold);
}

.nav__logo strong {
  padding-inline: 0.125rem;
  color: var(--first-color);
}

.nav__buttons {
  display: flex;
  align-items: center;
  column-gap: var(--spacing-sm);
}

.change-theme {
  display: flex;
  font-size: 1.25rem;
  transition: color 0.3s;
}

button .sun {
  display: none;
}

/* Mobile menu */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    padding-block: 1.8rem 5rem;
    text-align: center;
    background-color: var(--blur-effect);
    backdrop-filter: blur(8px);
    transition: top 0.7s;
  }
}

.nav__title {
  color: var(--first-color);
  display: block;
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  position: relative;
  width: max-content;
  margin: 0 auto 3rem;
}

.nav__title::after,
.nav__title::before {
  content: "";
  width: 40px;
  height: 1px;
  background-color: #fff;
  position: absolute;
  top: 50%;
  left: -4rem;
}

.nav__title::before {
  left: initial;
  right: -4rem;
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
}

.nav__link {
  position: relative;
  color: var(--white-color);
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  transition: color 0.3s;
}

.nav__link:hover,
.nav__link.active {
  color: var(--first-color);
}

.nav__link::after {
  content: "";
  width: 0%;
  height: 2px;
  background: var(--first-color);
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  transition: width 0.2s;
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__item:nth-child(5) .nav__link {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 50rem;
  border: 0.1rem solid var(--first-color);
  transition: all 0.2s ease-in;
}

.nav__item:nth-child(5) .nav__link:hover {
  background-color: var(--first-color);
  color: var(--white-color);
}

.nav__item:nth-child(5) .nav__link::before,
.nav__item:nth-child(5) .nav__link::after {
  content: none;
}

/* Burger menu */
.nav__toggle {
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 24px;
  border-radius: 3px;
  height: 3px;
  background-color: var(--first-color);
  transition: all 0.3s;
  position: relative;
}

.nav__toggle span:nth-child(2) {
  background-color: var(--text-color);
}

.nav__toggle span + span {
  margin-top: 4px;
}

/* Burger animations */
.active.nav__toggle span:nth-child(1) {
  animation: ease 0.7s rotateTopBurger forwards;
}

.not-active.nav__toggle span:nth-child(1) {
  animation: ease 0.7s rotateTopBurgerReverse forwards;
}

.active.nav__toggle span:nth-child(2) {
  animation: ease 0.7s scaleOut forwards;
}

.not-active.nav__toggle span:nth-child(2) {
  animation: ease 0.7s scaleIn forwards;
}

.active.nav__toggle span:nth-child(3) {
  animation: ease 0.7s rotateBottomBurger forwards;
  background-color: var(--text-color);
}

.not-active.nav__toggle span:nth-child(3) {
  animation: ease 0.7s rotateBottomBurgerReverse forwards;
}

.show-menu {
  top: 0;
}

/* Keyframes */
@keyframes rotateTopBurger {
  0% {
    top: 0;
    transform: rotate(0);
  }
  50% {
    top: 6px;
    transform: rotate(0);
  }
  100% {
    top: 6px;
    transform: rotate(45deg);
  }
}

@keyframes rotateTopBurgerReverse {
  0% {
    top: 6px;
    transform: rotate(45deg);
  }
  50% {
    top: 6px;
    transform: rotate(0deg);
  }
  100% {
    top: 0;
    transform: rotate(0deg);
  }
}

@keyframes rotateBottomBurger {
  0% {
    top: 0;
    transform: rotate(0);
  }
  50% {
    top: -8px;
    transform: rotate(0);
  }
  100% {
    top: -8px;
    transform: rotate(135deg);
  }
}

@keyframes rotateBottomBurgerReverse {
  0% {
    top: -6px;
    transform: rotate(135deg);
  }
  50% {
    top: -6px;
    transform: rotate(0);
  }
  100% {
    top: 0;
    transform: rotate(0);
  }
}

@keyframes scaleOut {
  50%,
  100% {
    transform: scale(0);
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

.blur-header::after {
  content: "";
  position: absolute;
  width: 1000%;
  height: 100%;
  background-color: var(--blur-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  top: 0;
  left: 0;
  z-index: -1;
}

/*=============== HOME ===============*/
.home__container {
  padding-top: 4rem;
}

.home__name {
  font-size: var(--biggest-font-size);
  text-align: center;
}

.home__profile {
  position: relative;
  justify-self: center;
}

.home__image {
  width: 220px;
}

.home__img {
  position: relative;
  z-index: 10;
}

.home__shadow {
  width: 100%;
  height: 100%;
  background-color: var(--body-color);
  position: absolute;
  bottom: -0.75rem;
  right: -0.75rem;
  border: 4px solid var(--line-color);
  z-index: 5;
}

.home__social {
  height: max-content;
  position: absolute;
  left: -3.5rem;
  top: 0;
  bottom: 0;
  margin: auto 0;
  display: grid;
  row-gap: var(--spacing-sm);
}

.home__info {
  margin-top: var(--spacing-sm);
}

.home__description b {
  background: linear-gradient(
    90deg,
    hsla(266, 89%, 61%, 0.8),
    hsla(14, 98%, 50%, 0)
  );
}

/* Arrow animation */
.arrow-down {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: var(--h2-font-size);
  color: hsl(266, 89%, 56%);
  overflow: hidden;
}

.arrow-down i {
  animation: scroll-down 2s infinite ease-in-out;
  animation-fill-mode: backwards;
}

.arrow-down i:nth-child(1) {
  animation-delay: 0.3s;
}
.arrow-down i:nth-child(2) {
  animation-delay: 0.6s;
}
.arrow-down i:nth-child(3) {
  animation-delay: 0.9s;
}

@keyframes scroll-down {
  0% {
    transform: translateY(-1rem);
    opacity: 0;
  }
  50% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(0.6rem);
    opacity: 0;
  }
}

/*=============== SKILLS ===============*/
.skills__marquee {
  overflow: hidden;
  width: 100%;
}

/* Container das duas listas */
.skills__track {
  display: flex;
}

/* Lista padrão */
.skills__list {
  display: flex;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Itens */
.skills__item i {
  font-size: 32px;
  transition: transform 0.3s ease;
}

.skills__item i:hover {
  transform: scale(1.15);
}

.github-icon {
  color: #000;
}

.dark-mode .github-icon {
  color: #fff;
}

/* 🔥 DESKTOP */
@media (min-width: 769px) {
  .skills__track {
    justify-content: center;
  }

  .skills__clone {
    display: none; /* esconde a duplicada */
  }
}

/* 🔥 MOBILE */
@media (max-width: 920px) {
  .skills__track {
    animation: scroll 20s linear infinite;
  }
}

/* Animação perfeita */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/*=============== ABOUT ===============*/
.about__container {
  row-gap: 0;
}

.about__info {
  padding-inline: var(--spacing-sm);
}

.about__description {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.about__description a {
  color: var(--first-color);
  font-weight: var(--font-semi-bold);
}

/*=============== PROJECTS ===============*/
.projects__container {
  row-gap: var(--spacing-lg);
}

.projects__card {
  padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-lg);
  display: grid;
}

.projects__image {
  display: inline-block;
  position: relative;
  margin-bottom: 0.75rem;
}

.projects__img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.projects__content {
  margin-bottom: 1.25rem;
  position: relative;
}

.projects__subtitle {
  position: relative;
  display: inline-block;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
}

.projects__subtitle::after {
  content: "";
  width: 20px;
  height: 1px;
  background-color: var(--text-color);
  position: absolute;
  top: 50%;
  left: 0;
}

.projects__technologies {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}

.projects__technologies i {
  font-size: 0.9rem;
}

.projects__title {
  font-size: var(--h3-font-size);
  margin-bottom: 0.75rem;
}

.projects__description {
  max-height: 70px;
  overflow-y: auto;
  position: relative;
}

.projects__description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
}

.projects__buttons {
  display: flex;
  align-items: center;
  column-gap: var(--spacing-sm);
  height: 30px;
}

.projects__link {
  display: flex;
  align-items: center;
  column-gap: 0.25rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  transition: color 0.4s;
  color: var(--first-color);
}

.projects__link i {
  font-size: 1rem;
  transition: color 0.4s;
}

/*=============== FOOTER ===============*/
.footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line-color);
}

.footer__container {
  padding-block: var(--spacing-md);
  row-gap: var(--spacing-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.footer__description {
  padding: 0 var(--spacing-lg) var(--spacing-sm);
}

.footer__quote {
  font-size: 1rem;
  font-style: italic;
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(90deg, hsla(266, 89%, 61%, 0.2), transparent);
  border-left: 4px solid var(--first-color);
  border-radius: 12px;
  color: var(--text-color);
  line-height: 1.6;
}

.footer__copy {
  color: var(--text-color);
  font-size: var(--small-font-size);
  text-align: center;
}

.footer__description a,
.footer__copy a {
  color: var(--first-color);
  font-weight: var(--font-semi-bold);
}

/*=============== SCROLLBAR ===============*/
::-webkit-scrollbar {
  background: #22202c;
  width: 0.6rem;
}

::-webkit-scrollbar-thumb {
  background: var(--first-color);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--hover-effect);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: var(--spacing-sm);
  bottom: -50%;
  border-radius: 50%;
  background-color: var(--first-color);
  display: inline-flex;
  padding: 8px;
  font-size: 1.25rem;
  color: #fff;
  z-index: var(--z-tooltip);
  animation: scroll-up 4s infinite;
  transition:
    bottom 0.4s,
    transform 0.4s,
    background-color 0.4s;
}

.scrollup:hover {
  background: var(--hover-effect);
}

@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.9rem);
  }
}

.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
@media screen and (max-width: 340px) {
  .container {
    margin-inline: var(--spacing-sm);
  }

  .home__name {
    font-size: var(--h1-font-size);
  }

  .home__image {
    width: 180px;
  }
}

@media screen and (min-width: 576px) {
  .home__container,
  .about__container,
  .projects__container {
    grid-template-columns: 350px;
    justify-content: center;
  }
}

@media screen and (min-width: 768px) {
  .projects__container {
    grid-template-columns: repeat(2, 350px);
  }

  .projects__description::after {
    height: 10px;
  }
}

@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: var(--spacing-sm);
  }

  .section__title-1::after,
  .section__title-2::after {
    width: 70px;
    height: 48px;
  }

  .nav__toggle,
  .nav__title {
    display: none;
  }

  .nav {
    column-gap: 4rem;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
    align-items: center;
  }

  .nav__menu {
    margin-left: auto;
  }

  .nav__link {
    color: var(--text-color);
    font-size: var(--normal-font-size);
  }

  .arrow-down {
    padding-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
  }

  .home__container {
    grid-template-columns: repeat(2, 460px);
    gap: var(--spacing-lg) 4rem;
    align-items: center;
    padding-block: 7rem var(--spacing-lg);
  }

  .home__name {
    font-size: var(--h1-font-size);
    align-self: flex-end;
  }

  .home__info {
    margin-top: 0;
    align-self: flex-start;
  }

  .home__description {
    position: relative;
    font-size: var(--h3-font-size);
    margin-bottom: 2.5rem;
  }

  .home__profile {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .home__image {
    width: 320px;
  }

  .home__shadow {
    right: -1.25rem;
    bottom: -1.25rem;
    border: 6px solid var(--line-color);
  }

  .home__social {
    left: initial;
    right: -6rem;
  }

  .skills__list {
    font-size: 3rem;
    gap: 2.5rem;
  }

  .about__container {
    grid-template-columns: 440px 525px;
    gap: var(--spacing-sm) 9rem;
  }

  .projects__container {
    grid-template-columns: repeat(3, 352px);
  }

  .projects__card {
    padding: 1.25rem;
  }

  .projects__image {
    margin-bottom: var(--spacing-sm);
  }
}
