/*===== GERAL ===============================================*/

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

  font-family: "DM Sans", sans-serif;
}

:root {
  --hue: 220; /* azul */
  --primary-color: hsl(var(--hue), 92%, 43%);
  --primary-hover: hsl(var(--hue), 92%, 33%);
  --secundary-color: hsl(0, 0%, 5%);
  --third-color: hsla(0, 0%, 100%, 0.1);
  --bg-color: hsl(0, 0%, 8%);

  --headline: hsl(0, 0%, 100%);
  --paragraph: hsla(0, 0%, 100%, 0.658);
  --paragraph-2: hsl(calc(var(--hue) + 10), 14%, 97%);

  font-size: 62.5%;

  --nav-height: 7.2rem;
}

html {
  scroll-behavior: smooth;
}

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

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

  overflow: overlay;

  background-color: var(--bg-color);
}

body.light-mode {
  --secundary-color: rgb(229, 229, 229);
  --third-color: hwb(0 48% 52% / 0.356);
  --bg-color: rgb(241, 241, 241);

  --headline: hsl(0, 0%, 0%);
  --paragraph: rgb(32, 32, 32);
  --paragraph-2: hsl(calc(var(--hue) + 10), 14%, 3%);
}

::-webkit-scrollbar {
  width: 0.8rem;
}

::-webkit-scrollbar-track {
  border-radius: 1rem;
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  border-radius: 1rem;
  background: var(--paragraph);
}

.wrapper {
  width: min(50rem, 100%);

  margin-inline: auto;
  padding-inline: 2.4rem;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  color: var(--paragraph);
}

section {
  padding-block: 10rem;
  padding-inline: 2rem;
}

section h4 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 150%;
  letter-spacing: 0.08rem;
  color: var(--primary-color);
  text-transform: uppercase;

  margin-bottom: 1.6rem;
}

section header h2 {
  font-size: 3rem;
  line-height: 3.9rem;

  color: var(--primary-color);
}

section h3 {
  color: var(--headline);
}

section p,
section span {
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 130%;

  color: var(--paragraph);
}

.button {
  background: none;
  border: 0.2rem solid var(--primary-color);

  margin-bottom: 6rem;
  padding: 1.4rem 3rem;

  width: fit-content;

  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;

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

  position: relative;

  transition: 400ms;
}

body.light-mode .button,
body.light-mode #home h4 {
  filter: brightness(0.8);
}

.button:hover {
  color: #fff;
  background-color: var(--primary-hover);
  border: 0.2rem solid var(--primary-hover);
  cursor: pointer;
}

body.light-mode .button:hover {
  filter: none;
}

/* SOCIAL LINKS */

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

.social-links li {
  height: 3rem;
}

.social-links svg {
  margin-top: 0.3rem;
  transition: 300ms;
}

.social-links li:nth-child(2) svg {
  width: 2.7rem;
  height: 2.7rem;
}

.social-links svg:hover {
  margin-top: 0;
  margin-bottom: 0.3rem;
}

body .social-links li svg path {
  transition: 200ms;
}

body nav#navigation .social-links li:nth-child(1) svg:hover path,
body .social-links li:nth-child(1) svg:hover path {
  stroke: #ff377a;
}

body .social-links li:nth-child(2) svg:hover path:nth-child(2),
body nav#navigation .social-links li:nth-child(2) svg:hover path:nth-child(2) {
  fill: #fff;
}

body.light-mode .social-links li:nth-child(2) svg:hover path:nth-child(2),
body.light-mode
  nav#navigation
  .social-links
  li:nth-child(2)
  svg:hover
  path:nth-child(2) {
  fill: #000;
}

body .social-links li:nth-child(3) svg:hover path:nth-child(2),
body nav#navigation .social-links li:nth-child(3) svg:hover path:nth-child(2) {
  fill: #0a66c2;
}

body .social-links li:nth-child(4) svg:hover path:nth-child(2),
body nav#navigation .social-links li:nth-child(4) svg:hover path:nth-child(2) {
  fill: #00abf0;
}

/* == == */

#projects .card circle {
  fill: var(--secundary-color);
}

#backToTopButton circle {
  fill: var(--primary-color);
}

#contact li path,
#navigation button.open-menu path[stroke*="#00856F"] {
  stroke: var(--primary-color);
}

#navigation.scroll button.open-menu path[stroke*="#00856F"] {
  stroke: var(--paragraph-2);
}


#toast {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: var(--bg-color); 
  color: var(--headline);
  padding: 20px 36px;
  border-radius: 12px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translateY(30px);
  transition: opacity 0.4s, transform 0.4s;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  text-shadow: 0 1px 2px rgba(0,0,0,0.10);
}
#toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}



/*===== NAVIGATION ===================================*/

nav {
  width: 100vw;
  height: var(--nav-height);

  display: flex;

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

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

nav.scroll {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

body.light-mode nav.scroll {
  background: rgba(151, 151, 151, 0.5);
}

/* LOGO */

a.logo {
  font-family: "Gemunu Libre", sans-serif;
  font-size: 3rem;
  opacity: 0.7;
}

nav#navigation a.logo {
  color: var(--primary-color);
}

body.light-mode nav#navigation a.logo,
body.light-mode footer a.logo {
  font-weight: bold;
}

footer a.logo,
nav#navigation.scroll a.logo,
body.menu-expanded nav#navigation a.logo,
body.light-mode.menu-expanded nav#navigation.scroll a.logo {
  color: #fff;
}

body.menu-expanded nav#navigation a.logo {
  opacity: 1;
}

body.light-mode nav#navigation a.logo {
  filter: brightness(0.8);
}

body.light-mode footer a.logo,
body.light-mode nav#navigation.scroll a.logo {
  color: #000;
}

/* == == */

nav#navigation .menu ul li a {
  color: #fff;
}

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 nav#navigation.scroll {
  background: none;
  backdrop-filter: none;
}

.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: translateX(100%);
}

body.menu-expanded .menu,
body.menu-expanded nav.scroll .menu {
  top: 0;
  left: 0;

  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);

  width: 100vw;
  height: 100vh;

  padding-top: var(--nav-height);

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

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

  margin: 8rem 0 10rem 0;

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

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

body.menu-expanded button path {
  stroke: white;
}

/*===== HOME ===================================*/

#home {
  height: 100vh;
  min-height: calc(60rem + var(--nav-height));
  padding-block: 0;

  background-color: var(--secundary-color);

  display: flex;
  align-items: center;
}

#home .wrapper {
  height: 53rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6rem;

  position: relative;
}

#home h1 {
  font-size: 4.5rem;
  color: var(--headline);
  line-height: 110%;

  margin-bottom: 1rem;
}

#home p {
  display: inline-flex;

  font-size: 1.8rem;
  line-height: 150%;
  font-weight: bold;

  margin-bottom: 3.2rem;
}

#home .line {
  border-right: 0.2rem solid var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
}

#home .typing {
  animation: line-typing 500ms steps(40) infinite normal,
    typing 2s steps(40) 1.4s normal backwards;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 27.5rem;
  }
}

@keyframes line-typing {
  from {
    border-right-color: var(--primary-color);
  }
  to {
    border-right-color: transparent;
  }
}

#home .button {
  margin-inline: auto;
}

#home .col-b {
  display: flex;
  flex-direction: column;
  align-items: center;

  animation: flutuar 3s infinite backwards;
  position: relative;
}

@keyframes flutuar {
  0% {
    transform: translateY(2rem);
  }
  50% {
    transform: translateY(-2rem);
  }
  100% {
    transform: translateY(2rem);
  }
}

#home .wrapper::before {
  content: "";
  display: block;

  width: 27rem;
  height: 27rem;

  background-color: var(--primary-color);
  border-radius: 100%;

  position: absolute;
  bottom: -3.1rem;
  z-index: -1;

  animation: appear 1s 500ms backwards;
}

/* ===== HERO IMAGE ===== */
#header-img {
  display: block;
  width: min(46rem, 100%);
  height: auto;
  margin-inline: auto;
  animation: appear 1s 1s backwards;
  filter: none;
}

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


@keyframes appear-vidro {
  from {
    right: -4rem;
    opacity: 0;
  }
  to {
    right: -2rem;
    opacity: 1;
  }
}

/*===== ABOUT =================================================*/

#about {
  text-align: left;
}

#about .content p {
  margin-block: 2.4rem;
}

#about .content a {
  text-decoration: none;
  color: var(--paragraph);
  font-weight: bold;
}

#about .col-a {
  margin-bottom: 6rem;
}

#about .col-b {
  text-align: left;
}

#about img {
  width: 38rem;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;

  border-radius: 2rem;
  box-shadow: 0 0 2rem black;

  transition: 600ms;
}

/*===== PROJECTS ===============================================*/

#projects {
  background-color: var(--secundary-color);
}

#projects header {
  margin-bottom: 6rem;
}

#projects header h2 {
  margin-bottom: 1.6rem;
}

#projects header p {
  max-width: 60rem;
  margin: 0 auto 3rem;
  text-align: center;
}

#projects header p a {
  color: var(--paragraph);
  font-weight: bold;
  font-style: italic;
}

#projects header p + a {
  padding: 0.8rem 2rem;
  color: var(--paragraph);

  background-color: var(--third-color);
  border-radius: 0.8rem;

  display: inline-flex;
  justify-content: center;
  gap: 1rem;

  transition: 300ms;
}

#projects header a svg path:nth-child(2) {
  fill: var(--headline);
}

#projects header a:hover {
  filter: brightness(0.7);
}

#projects .cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 3.2rem;
}

#projects .card {
  padding: 4rem;
  background: var(--bg-color);

  border-radius: 0.6rem;
  box-shadow: -1rem 1rem 1rem rgba(0, 0, 0, 0.267);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;

  transition: 400ms;
}

#projects .card:hover {
  background: var(--third-color);
}

#projects .card .img-wrapper {
  width: 100%;
  position: relative;
}

#projects .card img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  border-radius: 0.6rem;

  transition: 300ms;
}

#projects .card:hover > .img-wrapper img {
  filter: opacity(0.5);
}

#projects .card .buttons {
  visibility: hidden;
  opacity: 0;

  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);

  display: flex;
  justify-content: center;
  gap: 1rem;

  transition: 400ms;
}

#projects .card:hover > .img-wrapper .buttons {
  visibility: visible;
  opacity: 1;
}

#projects .card .buttons a svg {
  width: 4rem;
  height: 4rem;
}

#projects .card .buttons a svg path:nth-child(2) {
  fill: #000;
  transition: 200ms;
}

#projects .card .buttons a:hover svg path:nth-child(2) {
  fill: #fff;
}

#projects .card .buttons a {
  background: #fff;
  border-radius: 50%;

  width: 6rem;
  height: 6rem;

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

  transition: 500ms;
}

#projects .card .buttons a:hover {
  background-color: #000;
  cursor: pointer;
}

#projects .card .buttons a:hover > svg {
  fill: #fff;
}

#projects .card:nth-child(8) svg path:nth-child(2) {
  fill: var(--paragraph);
}

#projects .button {
  margin: 6rem auto 0;
}


/*===== KNOWLEDGE ===============================================*/

#knowledge header h2 {
  margin-bottom: 6rem;
}

#knowledge .cards {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

#knowledge .card {
  padding: 2.8rem;
  text-align: left;

  background: var(--secundary-color);

  border-radius: 0.6rem;
  box-shadow: -1rem 1rem 1rem rgba(0, 0, 0, 0.267);

  transition: 400ms;
}

#knowledge .card:hover {
  background: var(--third-color);
}

#knowledge .card h3 {
  margin-block: 1.6rem;
}

#knowledge .card img {
  width: 10rem;
}

/*===== CONTACT ===============================================*/

#contact {
  text-align: left;
  background-color: var(--secundary-color);
}

#contact .col-a {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin-bottom: 2rem;
}

#contact .col-a .content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

#contact ul {
  margin-bottom: 2rem;
}

#contact ul a,
#about .content a:nth-child(2) {
  width: fit-content;

  text-decoration: none;

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

  padding: 1rem;
  border-radius: 0.8rem;

  transition: 300ms;
}

#contact ul a {
  color: var(--paragraph);
}

#contact ul a:hover {
  background: var(--third-color);
}

#contact a path {
  transition: 400ms;
}

#contact a.button path {
  fill: var(--primary-color);
}

#contact a.button:hover path {
  fill: #fff;
}

#contact ul li:nth-child(2) a img {
  rotate: -15deg;
}

#contact ul li:nth-child(2) a path {
  stroke: none;
}

#contact .col-b {
  height: 38rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

#contact .col-b img {
  width: 13rem;
  height: auto;
  animation: flutuar 2.5s infinite backwards;
  filter: brightness(1.2);
}

#contact .col-b::after {
  content: "";
  display: block;

  width: 13rem;
  height: 5rem;

  background-color: black;
  border-radius: 100%;
}

body.light-mode #contact .col-b::after {
  background-color: grey;
}

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

footer {
  background-color: var(--secundary-color);

  text-align: left;
  color: var(--paragraph);
}

footer .wrapper {
  padding-block: 6rem;
  border-top: 0.1rem solid var(--paragraph);
}

footer .logo {
  display: inline-block;
  margin-bottom: 2.4rem;
  opacity: 0.6;
}

footer a img:nth-child(2),
body.light-mode footer a img:nth-child(1) {
  display: none;
}

body.light-mode footer a img:nth-child(2) {
  display: initial;
}

footer p {
  line-height: 2;

  margin-bottom: 3.2rem;
}

footer .social-links {
  justify-content: flex-start;
}

footer .social-links li:nth-child(1) svg path {
  stroke: var(--paragraph-2);
}

footer .social-links li:nth-child(2) svg path:nth-child(2),
footer .social-links li:nth-child(3) svg path:nth-child(2),
footer .social-links li:nth-child(4) svg path:nth-child(2) {
  fill: var(--paragraph-2);
}

/*===== SWITCH MODE TOGGLE =====================================*/

#toggle {
  display: flex;

  position: fixed;
  bottom: 2rem;
  left: 2.5rem;
}

#toggle input {
  position: absolute;
  visibility: hidden;
}

#toggle label {
  width: 8rem;
  height: 4rem;

  background-color: var(--secundary-color);
  border: 0.1rem solid var(--primary-color);
  border-radius: 5rem;

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

#toggle label:hover {
  cursor: pointer;
}

#toggle label::before {
  content: "";
  display: block;

  width: 3rem;
  height: 3rem;

  background-color: var(--primary-color);
  border-radius: 50%;

  position: absolute;
  bottom: 0.5rem;
  left: 0.6rem;
  transform: translateX(0);

  transition: 500ms;
}

#toggle input:checked + label::before {
  transform: translateX(3.8rem);
}

/*===== BACK TO TOP BUTTON =====================================*/

#backToTopButton {
  position: fixed;
  bottom: 1.5rem;
  right: 2.5rem;

  opacity: 0;
  visibility: hidden;

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

#backToTopButton.show {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

/*===== RESPONSIVO (DESKTOP) ====================================*/

@media (min-width: 1024px) {
  /*===== GERAL =======================================*/

  body {
    overflow: auto;
  }

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

  section {
    padding-block: 13rem;
  }

  body section h2 {
    font-size: 4rem;
    line-height: 5.2rem;
  }

  .col-a {
    grid-area: A;
  }

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

  /*===== NAVEGATION ==================================*/

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

  nav#navigation a.logo,
  footer a.logo {
    font-size: 4rem;
    opacity: 0.7;
  }

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

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

    width: 70%;
  }

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

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

    transition: opacity 0.4s;
  }

  body.light-mode nav#navigation .menu ul li a {
    opacity: 1;
  }

  nav#navigation.scroll .menu ul li a {
    color: var(--paragraph-2);
    opacity: 0.6;
  }

  nav#navigation .menu ul:nth-child(1) li {
    width: 8.4rem;
    color: var(--paragraph);
  }

  nav#navigation .menu ul:nth-child(1) li:nth-child(3),
  nav#navigation .menu ul:nth-child(1) li:nth-child(4) {
    width: 12rem;
  }

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

  nav#navigation.scroll .menu ul li a.active,
  nav#navigation.scroll .menu ul li a:hover {
    opacity: 1;
  }

  nav#navigation .menu ul:nth-child(1) li a::after {
    content: "";
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);

    display: block;

    position: relative;
    bottom: -2rem;
    left: -0.5rem;

    transition: width 0.2s;
  }

  nav#navigation.scroll .menu ul li a::after {
    background-color: var(--paragraph-2);
  }

  nav#navigation .menu ul li a:hover::after,
  nav#navigation .menu ul li a.active::after {
    padding-inline: 0.8rem;
    width: 100%;
  }

  nav#navigation.scroll .menu a.button:hover,
  nav#navigation.scroll .menu a.button.active {
    background-color: var(--primary-color);
    filter: brightness(1.3);
    border: none;
  }

  nav#navigation .social-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }

  nav#navigation .social-links li:nth-child(1) svg path {
    stroke: var(--primary-color);
  }

  nav#navigation .social-links li:nth-child(2) svg path:nth-child(2),
  nav#navigation .social-links li:nth-child(3) svg path:nth-child(2),
  nav#navigation .social-links li:nth-child(4) svg path:nth-child(2) {
    fill: var(--primary-color);
  }

  nav#navigation.scroll .social-links li:nth-child(1) svg path {
    stroke: var(--paragraph-2);
  }

  nav#navigation.scroll .social-links li:nth-child(2) svg path:nth-child(2),
  nav#navigation.scroll .social-links li:nth-child(3) svg path:nth-child(2),
  nav#navigation.scroll .social-links li:nth-child(4) svg path:nth-child(2) {
    fill: var(--paragraph-2);
  }

  nav#navigation .social-links svg {
    margin-top: 0.3rem;
    transition: 300ms;
  }

  nav#navigation .social-links svg:hover {
    margin-top: 0;
    margin-bottom: 0.3rem;
  }

  nav#navigation .social-links li svg path {
    transition: 200ms;
  }

  nav#navigation.scroll .social-links li:nth-child(1) svg:hover path {
    stroke: #ff377a;
  }

  nav#navigation.scroll
    .social-links
    li:nth-child(2)
    svg:hover
    path:nth-child(2) {
    fill: #fff;
  }

  nav#navigation.scroll
    .social-links
    li:nth-child(3)
    svg:hover
    path:nth-child(2) {
    fill: #0a66c2;
  }

  nav#navigation.scroll
    .social-links
    li:nth-child(4)
    svg:hover
    path:nth-child(2) {
    fill: #00abf0;
  }

  /*===== HOME ========================================*/

  #home {
    padding-top: var(--nav-height);
  }

  #home .wrapper {
    flex-direction: row;
    justify-content: space-between;

    grid-template-columns: repeat(2, 1fr);
    grid-template-areas: "A B";
  }

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

  #home .col-b {
    align-self: center;
    justify-self: center;
  }

  #home h1 {
    font-size: 6rem;
  }

  #home .content p {
    font-size: 2.5rem;
  }

  #home .button {
    margin: 0;
  }

  #home .wrapper::before {
    width: 40rem;
    height: 40rem;

    right: 8rem;
    bottom: 6rem;
  }

  #header-img {
    width: 52rem;
  }

  @keyframes typing {
    from {
      width: 0;
    }
    to {
      width: 38rem;
    }
  }

  /*===== ABOUT =======================================*/

  #about .wrapper {
    grid-template-columns: 48rem 1fr;
    grid-template-areas: "B A";

    gap: 6.7rem;
  }

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

  #about .col-b {
    text-align: center;
  }

  #about img:hover {
    scale: 1.07;
  }

  /*===== PROJECTS ====================================*/

  #projects {
    background-color: var(--secundary-color);
  }

  #projects h2 {
    width: 49.7rem;
    margin-inline: auto;
  }

  #projects .cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
  }

  #projects h3 {
    height: 5rem;
  }

  /*===== KNOWLEDGE =====================================*/

  #knowledge h2 {
    width: 49.7rem;
    margin-inline: auto;
  }

  #knowledge .cards {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4rem;
  }

  #knowledge .card {
    width: 30%;
    flex-grow: 1;
  }

  /*===== CONTACT =====================================*/

  #contact .wrapper {
    grid-template-columns: 1fr 57.5rem;
    grid-template-areas: "A B";
  }

  #contact .col-a {
    display: flex;
    flex-direction: column;
    justify-content: center;

    margin-bottom: 0;
  }

  #contact .col-a .content {
    align-items: flex-start;
  }

  #contact .col-b {
    text-align: center;
  }

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

  footer .wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "A B";
  }

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

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

  footer p {
    margin-bottom: 0;
  }

  footer .social-links {
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  /*===== GERAL ==================================*/

  .knowledge-grid {
    flex-direction: column;
    gap: 24px;
  }

  .knowledge-card {
    min-width: 0;
  }

  .tools-card {
    max-width: 100%;
  }

  .knowledge-cards-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: stretch;
  }
  .custom-card {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  .knowledge-cards-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .knowledge-cards-layout > .knowledge-card,
  .knowledge-cards-layout > .knowledge-card.tools-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .custom-cards-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .custom-card {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}



@media (max-width: 700px) {
  .knowledge-cards-layout {
    grid-template-columns: 1fr !important;
  }
  .knowledge-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 500px) {
  /*===== GERAL ==================================*/

  section h4 {
    font-size: 1.2rem;
  }

  body section h2 {
    font-size: 2.2rem;
  }

  section h3 {
    font-size: 1.4rem;
  }

  section p,
  section span,
  footer p {
    font-size: 1.3rem;
  }

  .button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
  }

  /*===== NAVEGATION ==================================*/

  nav#navigation button svg {
    width: 3rem;
    height: 3rem;
  }

  /*===== MENU-EXPANDED ==================================*/

  body.menu-expanded .menu ul:nth-child(1) {
    font-size: 1.4rem;
    gap: 2rem;
    margin: 6rem 0 7rem;
  }

  body.menu-expanded .menu .social-links svg,
  footer svg {
    width: 2rem;
    height: 2rem;
  }

  body.menu-expanded .menu .social-links li:nth-child(2) svg,
  footer .social-links li:nth-child(2) svg {
    width: 2.3rem;
    height: 2.3rem;
  }

  /*===== HOME ==================================*/

  #home h1 {
    font-size: 3.8rem;
  }

  #home p {
    font-size: 1.6rem;
  }

  @keyframes typing {
    from {
      width: 0;
    }
    to {
      width: 23.5rem;
    }
  }

  #home .wrapper::before {
    bottom: -2rem;
  }

  /*===== ABOUT ==================================*/

  #about .content a:nth-child(2) {
    font-size: 1.4rem;
  }

  /*===== PROJECTS ==================================*/

  #projects .card {
    padding: 2.5rem;
  }

  #projects .card img {
    height: 15rem;
  }

  #projects .card .buttons a {
    width: 5rem;
    height: 5rem;
  }

  #projects .card .buttons a svg {
    width: 3rem;
    height: 3rem;
  }

  /*===== CONTACT ==================================*/

  #contact ul a {
    font-size: 1.3rem;
  }

  #contact .col-b img {
    width: 10rem;
  }

  #contact .col-b::after {
    width: 10rem;
    height: 3rem;
  }
}

@media (max-width: 410px) {
  #home .wrapper::before {
    width: 24rem;
    height: 24rem;

    bottom: -0.5rem;
  }
}

@media (max-width: 320px) {
  /*===== GERAL ==================================*/

  .wrapper {
    padding-inline: 2rem;
  }

  /*===== HOME ==================================*/

  #home .wrapper::before {
    width: 20rem;
    height: 20rem;

    bottom: 2rem;
  }

  #home h1 {
    font-size: 3.2rem;
  }

  #home p {
    font-size: 1.4rem;
  }

  #home .line {
    white-space: initial;
    overflow: hidden;
  }

  @keyframes typing {
    from {
      width: 0;
    }
    to {
      width: 18rem;
    }
  }

  /*===== ABOUT ==================================*/

  #about .content a:nth-child(2) {
    font-size: 1.2rem;
  }
}

@media (max-width: 250px) {
  /*===== GERAL ==================================*/

  .wrapper {
    padding-inline: 1rem;
  }

  body section h2 {
    font-size: 2rem;
  }

  section h3 {
    font-size: 1.2rem;
  }

  section p,
  section span,
  footer p {
    font-size: 1.1rem;
  }

  .button {
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    gap: 0.6rem;
  }

  .social-links {
    gap: 1.5rem;
  }

  nav#navigation a.logo,
  footer a.logo {
    font-size: 2.5rem;
  }

  /*===== HOME ==================================*/

  #home h1 {
    font-size: 2.9rem;
  }

  #home p {
    font-size: 1.2rem;
  }

  #home .wrapper::before {
    width: 15rem;
    height: 15rem;

    bottom: 3.5rem;
  }

  /*===== PROJECTS ==================================*/

  #projects .card {
    padding: 1.8rem;
  }

  #projects .card .buttons {
    flex-direction: column;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
  }

  #projects .card .buttons a {
    width: 4rem;
    height: 4rem;
  }

  /*===== CONTACT ==================================*/

  #contact ul a {
    font-size: 1.1rem;
  }

  #contact svg {
    width: 1.8rem;
    height: 1.8rem;
  }

  #contact .col-b img {
    width: 9rem;
  }

  #contact .col-b::after {
    width: 9rem;
    height: 2rem;
  }
}


.knowledge-grid {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.knowledge-card {
  background: #181a20;
  border-radius: 18px;
  padding: 32px 28px 24px 28px;
  flex: 1 1 340px;
  min-width: 320px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.knowledge-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.knowledge-card-header .icon-bg {
  background: #0056ff;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.knowledge-card-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.knowledge-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.knowledge-list > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.icon-skill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #23242a;
  border-radius: 8px;
  padding: 6px;
  min-width: 34px;
  min-height: 34px;
}
.knowledge-list strong {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}
.knowledge-list span {
  color: #b3b3b3;
  font-size: 0.98rem;
  font-weight: 400;
  display: block;
  margin-top: 2px;
}
.tools-card {
  margin-top: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}


@media (min-width: 1024px) {
  #knowledge .grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    align-items: flex-start;
  }
  #knowledge .grid > div {
    max-width: 100%;
  }
}

#knowledge .flex.justify-center {
  justify-content: center !important;
  display: flex !important;
}
#knowledge .tools-card {
  margin-left: auto !important;
  margin-right: auto !important;
}

#knowledge .grid > div > div {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem !important;
}

#knowledge .flex.justify-center {
  margin-top: 2.5rem !important;
}



#knowledge .grid .grid > div,
#knowledge .grid .grid > div:hover {
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

#knowledge .grid .grid > div:hover {
  background: #232b3a !important;
  box-shadow: 0 6px 24px 0 rgba(24,90,219,0.10);
  transform: translateY(-4px) scale(1.03);
  cursor: pointer;
}

.knowledge-cards-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
  margin-bottom: 4rem;
}
.knowledge-cards-layout > .knowledge-card:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}
.knowledge-cards-layout > .knowledge-card:nth-child(2) {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.knowledge-cards-layout > .knowledge-card.tools-card {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  min-width: 0;
  width: 100%;
}

.knowledge-card {
  background: #23242a;
  border: 1px solid #44454f;
  border-radius: 1rem;
  box-shadow: 0 4px 24px #0002;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.knowledge-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.knowledge-card-header .icon-bg {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #185adb;
  border-radius: .5rem;
}
.knowledge-card-header h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.knowledge-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.knowledge-list > div {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #23242a;
  border: 1px solid #44454f;
  border-radius: .75rem;
  padding: 1rem;
  transition: .2s;
}
.knowledge-list > div:hover {
  background: #232b3a;
  box-shadow: 0 6px 24px 0 rgba(24,90,219,0.10);
  transform: translateY(-4px) scale(1.03);
  cursor: pointer;
}
.knowledge-list .icon-bg {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #185adb;
  border-radius: .4rem;
}
.knowledge-list h4 {
  color: #fff;
  font-weight: 600;
  margin: 0;
}

.knowledge-list p {
  color: #c8cbdc;
  font-size: 1.45rem !important; 
  line-height: 1.5;
  margin: 0;
}




.knowledge-card {
  padding: 4rem 4.5rem;
}

.knowledge-card-header .icon-bg {
  width: 4.2rem;
  height: 4.2rem;
  font-size: 2.5rem;
}
.knowledge-card-header .icon-bg i {
  font-size: 2.5rem;
}

.knowledge-list > div {
  min-height: 80px;
  align-items: flex-start;
  display: flex;
}


.knowledge-list h4 {
  color: #fff;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; 
}

.line.no-cursor {
  border-right: none !important;
  animation: none !important;
}

body.light-mode .knowledge-card,
body.light-mode .knowledge-list > div {
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  color: #222 !important;
}

body.light-mode .knowledge-card-header h2,
body.light-mode .knowledge-list h4,
body.light-mode .knowledge-list strong {
  color: #222 !important;
}

body.light-mode .knowledge-list p,
body.light-mode .knowledge-list span {
  color: #444 !important;
}

body.light-mode .knowledge-card-header .icon-bg,
body.light-mode .knowledge-list .icon-bg {
  background: #185adb !important;
}

body.light-mode .knowledge-list > div:hover {
  background: #f5f7fa !important;
  box-shadow: 0 6px 24px 0 rgba(24,90,219,0.06);
}

body.light-mode .tools-card {
  background: #f8f8f8 !important;
  border: 1px solid #e0e0e0 !important;
}

body.light-mode #knowledge {
  background: #fff !important;
}

#projects .cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  justify-items: center;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}




.custom-cards-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  justify-items: center;
  align-items: stretch;
}


.custom-card {
  background: #23232b;
  border-radius: 18px;
  box-shadow: 0 4px 24px #00000030;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 480px;
  width: 100%;
  align-items: center;
}

.custom-card-image {
  position: relative;
  overflow: hidden;
}

.custom-card-image img {
  transition: filter 0.3s;
}

.custom-card-image .card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,20,25,0.65);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.3s;
  z-index: 2;
}

.custom-card:hover .custom-card-image img {
  filter: brightness(0.5) blur(1px);
}

.custom-card:hover .custom-card-image .card-overlay {
  opacity: 1;
}

.card-icon-btn {
  background: rgba(30,30,40,0.85);
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  z-index: 3;
}

.card-icon-btn:hover {
  background: #23232b;
  transform: scale(1.08);
}

.card-icon-btn svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}


body.light-mode .custom-card {
  background: #fff !important;
  box-shadow: 0 4px 24px #00000010;
}

body.light-mode .custom-card-content h3,
body.light-mode .custom-card-content p {
  color: #222 !important;
}

body.light-mode .custom-card-image .card-overlay {
  background: rgba(240,240,240,0.85);
}

body.light-mode .custom-card .card-icon-btn {
  background: #f0f0f0;
}

body.light-mode .custom-card .card-icon-btn:hover {
  background: #185adb;
    min-width: 0;
}

body.light-mode .custom-card .card-icon-btn svg {
  fill: #185adb;}body.light-mode .custom-card .card-icon-btn:hover svg {
  fill: #fff;
}

@media (max-width: 500px) {
  .knowledge-card {
    min-width: 0;
    padding: 1.5rem 1rem;
  }
}

/* ===== BACKEND PROJECT CARDS ===== */
.backend-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.backend-card {
  background: #23242a;
  border: 1px solid #44454f;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.backend-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px #00000050;
}

.backend-card-header {
  padding: 1.4rem 1.6rem 1rem;
}

.backend-card-title-row {
  margin-bottom: 0.8rem;
}

.backend-card-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.backend-card-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #25e08a;
  background: rgba(37, 224, 138, 0.12);
  border: 1px solid rgba(37, 224, 138, 0.4);
  border-radius: 999px;
}

body.light-mode .backend-card-badge {
  color: #0d6e3a;
  background: rgba(13, 110, 58, 0.1);
  border-color: rgba(13, 110, 58, 0.4);
}

.backend-card-subtitle {
  color: #c8cbdc;
  font-size: 1.1rem;
}

.backend-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.backend-tag {
  background: #2e2f38;
  color: #c8cbdc;
  border: 1px solid #44454f;
  border-radius: 0.4rem;
  padding: 0.2rem 0.7rem;
  font-size: 1rem;
  font-weight: 600;
}

.backend-card-body {
  padding: 1rem 1.6rem;
  flex: 1;
}

.backend-card-desc {
  color: #c8cbdc;
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.backend-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.backend-features li {
  color: #d0d3e0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.feature-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.backend-card-footer {
  padding: 1rem 1.6rem 1.4rem;
  display: flex;
  gap: 0.8rem;
  border-top: 1px solid #33343d;
}

.backend-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.backend-link-primary {
  background: #185adb;
  color: #fff;
}

.backend-link-primary:hover {
  background: #1347b0;
  color: #fff;
}

.backend-link-primary svg {
  fill: #fff;
}

.backend-link-secondary {
  background: #2e2f38;
  color: #c8cbdc;
  border: 1px solid #44454f;
}

.backend-link-secondary:hover {
  background: #44454f;
  color: #fff;
}

@media (max-width: 1200px) {
  .backend-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
  }
}

@media (max-width: 700px) {
  .backend-cards-grid {
    grid-template-columns: 1fr;
  }
}

body.light-mode .backend-card {
  background: #fff;
  border-color: #e0e0e0;
}

body.light-mode .backend-card-title {
  color: #111;
}

body.light-mode .backend-card-desc,
body.light-mode .backend-features li {
  color: #444;
}

body.light-mode .backend-tag,
body.light-mode .backend-link-secondary {
  background: #f0f0f0;
  color: #444;
  border-color: #ddd;
}

body.light-mode .backend-card-footer {
  border-top-color: #e0e0e0;
}

/*===== SOCIAL ICONS ALIGN FIX =====*/

.social-links li,
nav#navigation .social-links li {
  height: auto;
  display: flex;
  align-items: center;
}

/*===== LANGUAGE DROPDOWN =====*/

nav#navigation .lang-switch {
  position: relative;
}

nav#navigation .lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  background: hsla(var(--hue), 92%, 43%, 0.08);
  border: 1px solid hsla(var(--hue), 92%, 43%, 0.4);
  border-radius: 999px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.4s, border-color 0.4s;
}

/* o reset "nav#navigation .wrapper *" pinta cada filho direto,
   então a cor precisa ser aplicada nos filhos, não herdada */
nav#navigation .lang-btn,
nav#navigation .lang-btn * {
  color: var(--primary-color);
  transition: color 0.4s;
}

nav#navigation.scroll .lang-btn {
  background: hsla(0, 0%, 100%, 0.06);
  border-color: hsla(0, 0%, 100%, 0.2);
}

nav#navigation.scroll .lang-btn,
nav#navigation.scroll .lang-btn * {
  color: var(--paragraph-2);
}

nav#navigation .lang-btn:hover {
  filter: brightness(1.2);
}

nav#navigation .lang-switch .lang-chevron {
  transition: transform 0.2s;
}

nav#navigation .lang-switch.open .lang-chevron {
  transform: rotate(180deg);
}

nav#navigation .lang-menu {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  min-width: 17rem;
  padding: 0.6rem;
  background: #16171c;
  border: 1px solid #33343d;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 200;
}

nav#navigation .lang-switch.open .lang-menu {
  display: block;
}

nav#navigation .lang-menu button {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1rem;
  background: none;
  border: none;
  border-radius: 0.6rem;
  font-size: 1.3rem;
  text-align: left;
  cursor: pointer;
}

nav#navigation .lang-menu button,
nav#navigation .lang-menu button * {
  color: #e6e8f0;
}

nav#navigation .lang-menu button:hover {
  background: hsla(0, 0%, 100%, 0.07);
}

nav#navigation .lang-menu .lang-flag {
  padding: 0.1rem 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #9a9db0;
  border: 1px solid #44454f;
  border-radius: 0.3rem;
}

/* o reset também força visibility:initial no <path> interno,
   por isso o svg e seus filhos precisam ser escondidos juntos */
nav#navigation .lang-menu .lang-check,
nav#navigation .lang-menu .lang-check * {
  visibility: hidden;
}

nav#navigation .lang-menu .lang-check {
  margin-left: auto;
  color: #25e08a;
}

nav#navigation .lang-menu button.active .lang-check,
nav#navigation .lang-menu button.active .lang-check * {
  visibility: visible;
}

body.light-mode nav#navigation.scroll .lang-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.25);
}

body.light-mode nav#navigation .lang-menu {
  background: #fff;
  border-color: #ddd;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

body.light-mode nav#navigation .lang-menu button,
body.light-mode nav#navigation .lang-menu button * {
  color: #222;
}

body.light-mode nav#navigation .lang-menu .lang-flag {
  color: #777;
  border-color: #ccc;
}

body.light-mode nav#navigation .lang-menu .lang-check {
  color: #0d9e6a;
}

body.light-mode nav#navigation .lang-menu button:hover {
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 1023px) {
  nav#navigation .lang-btn {
    padding: 0.5rem 0.9rem;
    gap: 0.4rem;
    font-size: 1.2rem;
  }
}

/* vence "nav#navigation button svg { width: 3rem }" do mobile */
nav#navigation .lang-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

nav#navigation .lang-btn svg.lang-chevron {
  width: 1.1rem;
  height: 1.1rem;
}

nav#navigation .lang-menu button svg.lang-check {
  width: 1.4rem;
  height: 1.4rem;
}

/*===== NAV MENU: não quebrar "Sobre mim" nem o logo =====*/

@media (min-width: 1024px) {
  nav#navigation a.logo {
    white-space: nowrap;
  }

  nav#navigation .menu {
    width: auto;
    flex: 1;
    margin-inline: 3.2rem;
  }

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

  nav#navigation .menu ul:nth-child(1) li,
  nav#navigation .menu ul:nth-child(1) li:nth-child(3),
  nav#navigation .menu ul:nth-child(1) li:nth-child(4) {
    width: auto;
  }

  nav#navigation .menu ul:nth-child(1) li a {
    white-space: nowrap;
  }
}

/*===== FEATURED PROJECTS GRID =====*/

.projects-subtitle {
  margin: 4.5rem 0 2.4rem;
  color: var(--headline);
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
}

.projects-subtitle:first-child {
  margin-top: 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4.5rem 3rem;
  text-align: left;
}

@media (max-width: 800px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

.featured-preview {
  display: block;
  padding: 1rem;
  background: #17181d;
  border: 1px solid #33343d;
  border-radius: 1.4rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.featured-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 0.8rem;
}

.featured-card:hover .featured-preview {
  border-color: var(--card-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.featured-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.8rem;
}

.featured-title-row h3 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--headline);
}

.featured-icons {
  display: flex;
  gap: 1.2rem;
}

.featured-icons a {
  display: inline-flex;
  color: var(--paragraph);
  transition: color 0.2s, transform 0.2s;
}

.featured-icons a:hover {
  color: var(--card-accent);
  transform: translateY(-2px);
}

.featured-desc {
  margin: 0.6rem 0 1.4rem;
  max-width: 55ch;
  color: var(--paragraph);
  font-size: 1.35rem;
  line-height: 1.6;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.featured-tag {
  padding: 0.45rem 1.2rem;
  background: #2e2f38;
  color: #e6e8f0;
  border: 1px solid #3c3d47;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 600;
}

body.light-mode .featured-preview {
  background: #fff;
  border-color: #e0e0e0;
}

body.light-mode .featured-card:hover .featured-preview {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body.light-mode .featured-tag {
  background: #ececec;
  color: #333;
  border-color: #ddd;
}
