*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

/* Better tap highlights for mobile */
* {
  -webkit-tap-highlight-color: rgba(240, 0, 0, 0.2);
  -webkit-touch-callout: none;
}

:root{
  --bg-color: #000000;
  --second-bg-color: #000508;
  --text-color: #ededed;
  --main-color: #f00000;
}

/* Tema claro (ativado em body.light) */
body.light {
  --bg-color: #ffffff;
  --second-bg-color: #f2f4f7;
  --text-color: #1a1d21;
  --main-color: #d10000;
}

/* Transições suaves */
body, .header, .navbar a, .btn, .skills-box .skills-content, .education-content .content, .footer, section, .about-img img, .about-img .circle-spin {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* Botão de alternância de tema */
.theme-toggle {
  width: 3.6rem;
  height: 3.6rem;
  margin-left: 2rem;
  border-radius: 50%;
  border: .2rem solid var(--main-color);
  background: var(--bg-color);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--main-color);
  transition: background .35s ease, color .35s ease;
}

.theme-toggle::before {
  content: '\2600'; /* Sol */
  transition: transform .4s ease, opacity .3s;
}

body.light .theme-toggle::before {
  content: '\1F319'; /* Lua */
}

.theme-toggle:hover {
  background: var(--main-color);
  color: var(--bg-color);
}

/* Language switcher */
.lang-switch {
  margin-left: 1.5rem;
  background: var(--bg-color);
  color: var(--text-color);
  border: .2rem solid var(--main-color);
  border-radius: .6rem;
  padding: .6rem .8rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .35s, color .35s, border-color .35s;
}
.lang-switch:focus { outline: none; }
.lang-switch:hover { background: var(--main-color); color: var(--bg-color); }

html{
  font-size: 62.5%;
  overflow-x: hidden;
  /* Improved font scaling for better readability across devices */
  font-size: clamp(56%, 0.5rem + 1vw, 62.5%);
}

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

.header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: .3s;
  /* Better responsive padding */
  padding: clamp(1rem, 2.5vw, 2rem) clamp(2%, 4vw, 9%);
  /* Improved mobile layout */
  min-height: 6rem;
}

.header.sticky {
  background: var(--bg-color);
}

.logo {
  position: relative;
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--text-color);
  font-weight: 600;
}

.navbar{
  position: relative;
}

.navbar a{
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  color: var(--text-color);
  font-weight: 500;
  margin-left: clamp(1.5rem, 3vw, 3.5rem);
  transition: .3s;
  position: relative;
}

.navbar a::before,
.navbar a::after {
  display: none;
}

.navbar a:hover,
.navbar a.active{
  color: var(--main-color);
}

#menu-icon {
  position: relative;
  font-size: clamp(3rem, 5vw, 3.6rem);
  color: var(--text-color);
  cursor: pointer;
  display: none;
  /* Better touch target for mobile */
  min-height: 44px;
  min-width: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
}

#menu-icon:hover,
#menu-icon:focus {
  background-color: rgba(240, 0, 0, 0.1);
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

section{
  min-height: 100vh;
  padding: clamp(8rem, 12vw, 10rem) clamp(2%, 4vw, 9%) 2rem;
  /* Better mobile padding */
  padding: clamp(6rem, 10vh, 10rem) clamp(3%, 5vw, 9%) clamp(2rem, 4vh, 3rem);
}

.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(2%, 4vw, 9%);
  gap: clamp(2rem, 5vw, 5rem);
  flex-wrap: wrap;
  min-height: 100vh;
  /* Better mobile layout */
  padding: clamp(8rem, 12vh, 10rem) clamp(3%, 5vw, 9%) 2rem;
  min-height: 100vh;
}

.home-profile-img {
  width: clamp(16rem, 28vw, 34rem);
  height: clamp(16rem, 28vw, 34rem);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  margin-left: clamp(1rem, 3vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
}

.home-profile-img img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - .4rem); /* Ajuste para compensar a borda */
  height: calc(100% - .4rem);
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center center; /* Centraliza a imagem dentro do círculo */
  border-radius: 50%;
  border: .2rem solid var(--main-color);
  display: block;
  z-index: 1; /* Fica atrás do círculo animado */
}

@media (max-width: 991px) {
  .home-profile-img {
    margin-left: 2rem;
    width: clamp(18rem, 36vw, 32rem);
    height: clamp(18rem, 36vw, 32rem);
    margin: 0 auto; /* centraliza horizontalmente */
    aspect-ratio: 1/1;
  }
  .home { 
    justify-content: center;
    align-items: center; /* centraliza verticalmente também */
  }
}

@media (max-width: 768px) {
  .home {
    flex-direction: column;
  gap: 5rem; /* gap mobile aumentado */
    padding: 12rem 4% 2rem; /* mais espaço abaixo do header */
    align-items: center; /* centraliza todos os elementos */
  }
  .home-profile-img {
    margin-left: 0;
    width: clamp(16rem, 55vw, 30rem);
    height: clamp(16rem, 55vw, 30rem);
    order: 1; /* imagem primeiro em mobile */
    margin-bottom: .8rem; /* separação adicional antes do conteúdo */
    margin: 0 auto .8rem auto; /* centraliza horizontalmente */
    aspect-ratio: 1/1;
  }
  .home-content { 
    text-align: center;
    order: 2;
  }
  
  .home-content .text-animate {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }
  
  .home-content .text-animate h3 {
    text-align: center;
  }
  
  .home-sci { position: static; margin-top: 1.2rem; padding-bottom: 1rem; order: 3; width: 100%; justify-content: center; gap: 1.5rem; }
}

@media (max-width: 462px) {
  .home-profile-img {
    width: clamp(12rem, 70vw, 24rem);
    margin: 0 auto; /* centraliza horizontalmente */
  }
}


.home-content {
  max-width: min(60rem, 100%);
  z-index: 99;
  flex: 1;
  min-width: 0;
}


.home-content h1 {
  position: relative;
  display: inline-block;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  word-wrap: break-word;
}
.home-content h1 span {
  color: var(--text-color);
}

.home-content .text-animate{
  position: relative;
  width: 100%;
  max-width: 45rem;
  min-height: 4rem;
}

.home-content .text-animate h3{
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--main-color);
  position: relative;
  white-space: nowrap;
  min-width: fit-content;
  width: auto;
}

.home-content .text-animate h3::after {
  content: '|';
  position: relative;
  color: var(--main-color);
  animation: cursor-blink 1s infinite;
  margin-left: 2px;
}

.home-content p{
  position: relative;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: 2rem 0 4rem;
  line-height: 1.6;
}

.btn-box{
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 3.2rem;
  flex-wrap: wrap;
}

.btn-box .btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: clamp(12rem, 25vw, 15rem);
  height: clamp(4rem, 8vw, 5rem);
  background: rgba(255, 0, 0, 0.8);
  border: .2rem solid rgba(255, 0, 0, 0.8);
  border-radius: .8rem;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 600;
  letter-spacing: .1rem;
  color: var(--bg-color);
  z-index: 1;
  flex: 1;
  max-width: 20rem;
  transition: all 0.3s ease;
}

/* Estilo refinado para botões de CV */
.cv-btn {
  padding: 0 1.6rem;
  gap: .8rem;
  width: auto;
  min-width: clamp(13rem, 32vw, 15rem);
  background: linear-gradient(90deg, #ff4d4d 0%, #ffb366 100%) !important;
  border-color: #fff !important;
  box-shadow: 0 2px 12px rgba(255,77,77,0.10), 0 1px 4px #ffb366;
  color: #fff !important;
  transition: box-shadow .3s, transform .3s;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

.cv-btn:hover {
  background: linear-gradient(90deg, #ffb366 0%, #ff4d4d 100%) !important;
  border-color: #fff !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(255,77,77,0.15), 0 1px 8px #ffb366;
  transform: scale(1.02);
}

.cv-btn i {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  display: flex;
  align-items: center;
}

.cv-btn .btn-label {
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(255,0,0,0.25), 0 0px 2px #fff;
}

.cv-btn .btn-badge {
  background: var(--bg-color);
  color: rgba(255, 0, 0, 0.8);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  padding: .3rem .6rem;
  border-radius: .5rem;
  line-height: 1;
  border: .1rem solid rgba(255, 0, 0, 0.8);
  transition: background .35s, color .35s;
}

.cv-btn:hover .btn-badge {
  background: rgba(255, 0, 0, 0.8);
  color: var(--bg-color);
}

.btn-box .btn:hover{
  color: rgba(255, 0, 0, 0.9);
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.9);
}

.btn-box .btn:nth-child(2){
  background: transparent;
  color: rgba(255, 0, 0, 0.8);
  border-color: rgba(255, 0, 0, 0.8);
}

.btn-box .btn:nth-child(2):hover{
  color: var(--bg-color);
  background: rgba(255, 0, 0, 0.8);
}

.btn-box .btn:nth-child(2)::before{
  background: rgba(255, 0, 0, 0.8);
}

.btn-box .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(40, 40, 50, 0.9);
  z-index: 0;
  transition: .5s;
  border-radius: .8rem;
}

.btn-box .btn:hover::before{
  width: 100%;
}

.home-sci{
  position: absolute;
  bottom: 4rem;
  width: clamp(15rem, 30vw, 17rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.home-sci a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: clamp(3.2rem, 6vw, 4rem);
  height: clamp(3.2rem, 6vw, 4rem);
  background: var(--bg-color);
  border: .2rem solid var(--main-color);
  border-radius: 50%;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--text-color);
  z-index: 1;
  overflow: hidden;
}

.home-sci a:hover{
  color: var(--bg-color);
}

.home-sci a::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--main-color);
  z-index: -1;
  transition: .5s;
}

.home-sci a:hover::before{
  width: 100%;
}


.about {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
  background: var(--second-bg-color);
  padding-bottom: 6rem;
}

.heading{
  position: relative;
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 3rem;
  text-align: center;
}

span {
  color: var(--main-color);
}

.about-img{
  position: relative;
  width: clamp(16rem, 28vw, 34rem);
  height: clamp(16rem, 28vw, 34rem);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

.about-img img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - .4rem); /* Ajuste para compensar a borda */
  height: calc(100% - .4rem);
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center center; /* Centraliza a imagem dentro do círculo */
  border-radius: 50%;
  border: .2rem solid var(--main-color);
  display: block;
  z-index: 1; /* Fica atrás do círculo animado */
}

.about-img .circle-spin{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-top: .2rem solid var(--second-bg-color);
  border-bottom: .2rem solid var(--second-bg-color);
  border-left: .2rem solid var(--main-color);
  border-right: .2rem solid var(--main-color);
  animation: abountSpinner 8s linear infinite;
  z-index: 2; /* Fica na frente da imagem */
}

.about-content {
  text-align: center;
}

.about-content h3{
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.about-content p{
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: 2rem 0 3rem;
  line-height: 1.6;
  max-width: 80rem;
}

.btn-box.btns{
  display: inline-block;
  width: 15rem;
}

.btn-box.btns a::before {
  background: var(--second-bg-color);
}


.educcation {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: auto;
  padding-bottom: 5rem;
}

.education .education-row{
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 5rem);
}

.education-row .education-column{
  flex: 1 1 clamp(25rem, 45%, 40rem);
  min-width: 0;
}

.education-column .title{
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin: 0 0 1.5rem 2rem;
}

.education-column .education-box{
  border-left: .2rem solid var(--main-color);
}

.education-box .education-content{
  position: relative;
  padding-left: 2rem;
}

.education-box .education-content::before{
  content: '';
  position: absolute;
  top: 0;
  left: -1.1rem;
  width: 2rem;
  height: 2rem;
  background: var(--main-color);
  border-radius: 50%;
}

.education-content .content{
  position: relative;
  padding: 1.5rem;
  border: .2rem solid var(--main-color);
  border-radius: .6rem;
  margin-bottom: 2rem;
}

.education-content .content::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width:0;
  height: 100%;
  background: var(--second-bg-color);
  z-index: -1;
  transition: .5s;
}

.education-content .content:hover::before{
  width: 100%;
}

.education-content  .content .year{
  font-size: 1.5rem;
  color: var(--main-color);
  padding-bottom: .5rem;
}

.education-content .content .year i{
  padding-right: .5rem;
}

.education-content .content h3{
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.education-content .content p{
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: .5rem;
  line-height: 1.5;
}

.skills{
  min-height: auto;
  padding-bottom: 7rem;
  background: var(--second-bg-color);
}


.skills .skills-row{
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 3vw, 3rem);
  justify-content: center;
}

.skills-row .skills-column{
  flex: 1 1 clamp(25rem, 30%, 35rem);
  min-width: 25rem;
  max-width: 40rem;
}

.skills-column .title{
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  position: relative;
}

/* Texto motivacional que aparece durante a animação */
.skills-column .title::after {
  content: 'Carregando habilidades...';
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: var(--main-color);
  opacity: 0;
  font-style: italic;
  font-weight: normal;
}

.skills.reveal.active .skills-column .title::after {
  opacity: 1;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  20%, 80% { opacity: 1; }
}

/* Ícones para títulos das habilidades */
.skills-column .title::before {
  font-family: 'Boxicons';
  font-size: clamp(2.2rem, 4.5vw, 2.8rem);
  color: var(--main-color);
}

/* Ícone Frontend */
.skills-column:nth-child(1) .title::before {
  content: '\ea7b'; /* bx-code-alt */
}

/* Ícone Backend */
.skills-column:nth-child(2) .title::before {
  content: '\ea66'; /* bx-server */
}

/* Ícone Mobile */
.skills-column:nth-child(3) .title::before {
  content: '\ea0a'; /* bx-mobile-alt */
}

.skills-box .skills-content{
  position: relative;
  border: .2rem solid var(--main-color);
  border-radius: .6rem;
  padding: .5rem 1.5rem;
  z-index: 1;
  overflow: hidden;
}

.skills-box .skills-content::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: -1;
}

.skills-box .skills-content:hover::before{
  width: 100%;
}

.skills-content .progress{
  padding: 1rem 0;
}

.skills-content .progress h3{
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  display: flex;
  justify-content: space-between;
}

.skills-content .progress h3 span{
  color: var(--text-color);
}

.skills-content .progress .bar{
  height: 2.5rem;
  border-radius: .6rem;
  border: .2rem solid var(--main-color);
  padding: .5rem;
  margin: 1rem 0;
}

.skills-content .progress .bar span{
  display: block;
  height: 100%;
  border-radius: .3rem;
  background: linear-gradient(90deg, var(--main-color), #ff3333, var(--main-color));
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.8s ease-in-out;
  animation: none;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

/* Efeito de brilho que se move pela barra */
.skills-content .progress .bar span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 1s ease-in-out;
}

.skills.reveal.active .progress .bar span::after {
  left: 100%;
  transition-delay: 0.5s;
}

/* Animações específicas para cada habilidade quando a seção fica visível */

/* Frontend Skills */
.skills.reveal.active .skills-column:nth-child(1) .progress:nth-child(1) .bar span {
  animation: progress95 2s ease-in-out forwards;
  animation-delay: 0.2s;
}

.skills.reveal.active .skills-column:nth-child(1) .progress:nth-child(2) .bar span {
  animation: progress90 2s ease-in-out forwards;
  animation-delay: 0.4s;
}

.skills.reveal.active .skills-column:nth-child(1) .progress:nth-child(3) .bar span {
  animation: progress85 2s ease-in-out forwards;
  animation-delay: 0.6s;
}

.skills.reveal.active .skills-column:nth-child(1) .progress:nth-child(4) .bar span {
  animation: progress88 2s ease-in-out forwards;
  animation-delay: 0.8s;
}

/* Backend Skills */
.skills.reveal.active .skills-column:nth-child(2) .progress:nth-child(1) .bar span {
  animation: progress92 2s ease-in-out forwards;
  animation-delay: 0.2s;
}

.skills.reveal.active .skills-column:nth-child(2) .progress:nth-child(2) .bar span {
  animation: progress80 2s ease-in-out forwards;
  animation-delay: 0.4s;
}

.skills.reveal.active .skills-column:nth-child(2) .progress:nth-child(3) .bar span {
  animation: progress94 2s ease-in-out forwards;
  animation-delay: 0.6s;
}

.skills.reveal.active .skills-column:nth-child(2) .progress:nth-child(4) .bar span {
  animation: progress100 2s ease-in-out forwards;
  animation-delay: 0.8s;
}

/* Mobile Skills */
.skills.reveal.active .skills-column:nth-child(3) .progress:nth-child(1) .bar span {
  animation: progress90 2s ease-in-out forwards;
  animation-delay: 0.2s;
}

.skills.reveal.active .skills-column:nth-child(3) .progress:nth-child(2) .bar span {
  animation: progress88 2s ease-in-out forwards;
  animation-delay: 0.4s;
}

.skills.reveal.active .skills-column:nth-child(3) .progress:nth-child(3) .bar span {
  animation: progress78 2s ease-in-out forwards;
  animation-delay: 0.6s;
}

.skills.reveal.active .skills-column:nth-child(3) .progress:nth-child(4) .bar span {
  animation: progress85 2s ease-in-out forwards;
  animation-delay: 0.8s;
}

/* As barras agora são animadas pelo JavaScript - larguras removidas */

/* Projects Section */
.projects {
  background: var(--second-bg-color);
  padding-bottom: 7rem;
}

.projects .projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(24rem, 45vw, 26rem), 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}

.project-box {
  position: relative;
  background: var(--bg-color);
  border: .2rem solid var(--main-color);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .4s ease, box-shadow .4s ease;
}

.project-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 1.2rem 2.4rem rgba(0,0,0,.35);
}

.project-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.project-box:hover .project-img-wrapper img {
  transform: scale(1.08);
}

.project-content {
  padding: 1.8rem 1.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.project-content h3 {
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.project-content p {
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--text-color);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .4rem;
}

.project-tags span {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  padding: .4rem .7rem;
  background: var(--main-color);
  color: var(--bg-color);
  border-radius: .4rem;
  font-weight: 600;
  letter-spacing: .5px;
}

.project-links {
  margin-top: auto;
  display: flex;
  gap: 1rem;
}

.project-links a {
  width: 3.6rem;
  height: 3.6rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: .2rem solid var(--main-color);
  color: var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  position: relative;
  overflow: hidden;
  transition: background .4s, color .4s;
}

.project-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--main-color);
  z-index: -1;
  transition: .5s;
}

.project-links a:hover::before {
  width: 100%;
}

.project-links a:hover {
  color: var(--bg-color);
}

/* Certifications Section */
.certifications {
  min-height: auto;
  padding-bottom: 6rem;
  background: var(--bg-color);
}

.certifications .cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 5rem);
}

.cert-row .cert-column { 
  flex: 1 1 clamp(25rem, 45%, 40rem);
  min-width: 0;
}

.cert-box { border-left: .2rem solid var(--main-color); }

.cert-box .cert-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2.2rem;
}

.cert-box .cert-item::before {
  content: '';
  position: absolute;
  top: .4rem;
  left: -1.1rem;
  width: 2rem;
  height: 2rem;
  background: var(--main-color);
  border-radius: 50%;
}

.cert-item h3 { font-size: clamp(1.6rem, 3vw, 2rem); }
.cert-item p { font-size: clamp(1.2rem, 2.5vw, 1.4rem); margin: .4rem 0 .8rem; line-height: 1.5; }
.cert-item .cert-year { font-size: 1.5rem; color: var(--main-color); padding-bottom: .4rem; }
.cert-item .cert-year i { padding-right: .5rem; }
.cert-item .cert-meta span { font-size: 1.2rem; opacity: .75; }

@media (max-width: 768px) {
  .certifications .cert-row { gap: 3rem; }
}

.contact{
  min-height: auto;
  padding-bottom: 7rem;
}

.contact form{
  max-width: min(70rem, 95%);
  margin: 0 auto;
  text-align: center;
}

.contact form .input-box{
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact form .input-box .input-field{
  position: relative;
  width: 100%;
  margin: .8rem 0;
  flex: 1 1 clamp(20rem, 45%, 25rem);
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea{
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  color: var(--text-color);
  background: transparent;
  border-radius: .6rem;
  border: .2rem solid var(--main-color);
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea::placeholder{
  color: var(--text-color);
}

.contact form .focus {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%; 
  background-color: var(--second-bg-color);
  border-radius: .6rem;
  z-index: -1;
  transition: .5s;
}

.contact form .input-box .input-field input:focus ~ .focus,
.contact form .input-box .input-field input:valid ~ .focus,
.contact form .textarea-field textarea:focus ~ .focus,
.contact form .textarea-field textarea:valid ~ .focus{
  width: 100%;
}

.contact form .textarea-field{
  position: relative;
  margin: .8rem 0 2.7rem;
  display: flex;
}

.contact form .textarea-field textarea{
 resize: none;
}

.contact form .btn-box.btns .btn{
  cursor: pointer;
  background: linear-gradient(135deg, #ff0040 0%, #ff6600 100%) !important;
  border: .2rem solid #fff !important;
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  box-shadow: 0 4px 20px rgba(255,0,64,0.25), 0 2px 8px rgba(255,102,0,0.15);
  transition: all 0.3s ease;
}

.contact form .btn-box.btns .btn .btn-text{
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.contact form .btn-box.btns .btn:hover{
  background: linear-gradient(135deg, #ff6600 0%, #ff0040 100%) !important;
  border-color: #fff !important;
  color: #fff !important;
  box-shadow: 0 6px 28px rgba(255,0,64,0.35), 0 3px 12px rgba(255,102,0,0.25);
  transform: translateY(-2px);
}

.contact form .btn-box.btns .btn:hover .btn-text{
  color: #fff !important;
}

.contact form .btn-box.btns .btn:active{
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(255,0,64,0.3);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--second-bg-color);
  gap: 1rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: .2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  transition: .5s;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--main-color);
  color: var(--second-bg-color);
  box-shadow: 0 0 1rem var(--main-color);
  transform: translateY(-0.3rem);
}

.footer-text p{
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.footer-iconTop a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .8rem;
  background: var(--main-color);
  border: .2rem solid var(--main-color);
  border-radius: .6rem;
  z-index: 1;
  overflow: hidden;
}

.footer-iconTop a::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--second-bg-color);
  z-index: -1;
  transition: .5s;
}

.footer-iconTop a:hover::before{
  width: 100%;
}

.footer-iconTop a i{
  font-size: 3rem;
  color: var(--bg-color);
}

.footer-iconTop a:hover i{
  color: var(--main-color);
}

/* RESPONSIVE BREAKPOINTS */

/* Large tablets and small desktops */
@media (max-width: 1400px) {
  html {
    font-size: 58%;
  }
  
  .header {
    padding: clamp(1.5rem, 2.5vw, 2rem) clamp(4%, 7vw, 8%);
  }

  section {
    padding: clamp(8rem, 12vw, 10rem) clamp(4%, 7vw, 8%) 2rem;
  }

  .home {
    padding: 0 clamp(4%, 7vw, 8%);
  }

  .footer {
    padding: 2rem clamp(4%, 7vw, 8%);
  }
}

@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
  
  .header {
    padding: 2rem 6%;
  }

  section {
    padding: 10rem 6% 2rem;
  }

  .home {
    padding: 0 6%;
  }

  .footer {
    padding: 2rem 6%;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 4%;
  }

  section {
    padding: 10rem 4% 2rem;
  }

  .home {
    padding: 0 4%;
    justify-content: center;
    gap: 3rem;
  }
  
  .home-profile-img {
    margin-left: 2rem;
    width: clamp(18rem, 36vw, 32rem);
  }

  .footer {
    padding: 2rem 4%;
  }
  
  .btn-box {
    justify-content: center;
  }
  
  /* Better navigation for tablets */
  .navbar a {
    margin-left: clamp(1.5rem, 2.5vw, 3rem);
  }
  
  /* Improved project grid for tablets */
  .projects .projects-container {
    grid-template-columns: repeat(auto-fit, minmax(clamp(22rem, 40vw, 28rem), 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }
}

/* Tablets portrait */
@media (max-width: 900px) {
  html {
    font-size: 53%;
  }
  
  .home {
    gap: clamp(2.5rem, 4vw, 3.5rem);
  }
  
  .home-profile-img {
    width: clamp(16rem, 40vw, 28rem);
  }
  
  /* Better spacing for education/skills columns */
  .education .education-row,
  .skills .skills-row,
  .certifications .cert-row {
    gap: clamp(2rem, 4vw, 3rem);
  }
  
  /* Optimize form for tablets */
  .contact form .input-box .input-field {
    flex: 1 1 clamp(18rem, 40%, 22rem);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 52%;
  }

  .header {
    background: var(--bg-color);
    padding: 1.5rem 4%;
    /* Improve mobile header height */
    min-height: 7rem;
    flex-wrap: nowrap;
  }

  #menu-icon {
    display: flex;
    font-size: 3.2rem;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    padding: 2rem 4%;
    background: var(--bg-color);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    z-index: 1;
    transition: .25s ease;
    transition-delay: .25s;
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .navbar.active {
    left: 0;
    transition-delay: 0s;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 1.5rem 0;
    color: var(--text-color);
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }
  
  .navbar a:hover,
  .navbar a.active {
    background: var(--main-color);
    color: white;
  }

  .navbar .active-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-top: .1rem solid rgba(0, 0, 0, .2);
    z-index: -1;
    transition: .25s ease;
    transition-delay: .25s;
  }

  .navbar.active .active-nav {
    left: 0;
    transition-delay: .25s;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
    transform: translateX(0);
    transition: .25s ease;
    transition-delay: 0s;
    color: var(--text-color);
  }

  .home {
    flex-direction: column;
    gap: 4rem;
    padding: 12rem 4% 2rem;
    text-align: center;
  }
  
  .home-profile-img {
    margin-left: 0;
    width: clamp(16rem, 55vw, 30rem);
    order: 1;
    margin-bottom: .8rem;
  }
  
  .home-content { 
    text-align: center;
    order: 2;
  }
  
  .home-content .text-animate {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }
  
  .home-content .text-animate h3 {
    text-align: center;
  }
  
  .home-sci { 
    position: static; 
    margin-top: 2rem; 
    padding-bottom: 1rem;
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1.5rem;
  }

  .btn-box {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn-box .btn {
    max-width: 25rem;
    width: 100%;
  }

  .about-img {
    width: clamp(18rem, 36vw, 32rem);
    height: clamp(18rem, 36vw, 32rem);
    aspect-ratio: 1/1;
  }

  .education .education-row,
  .skills .skills-row,
  .certifications .cert-row {
    gap: 2rem;
  }

  .education-row .education-column,
  .cert-row .cert-column {
    flex: 1 1 100%;
  }

  /* Skills específico para 3 colunas */
  .skills-row .skills-column {
    flex: 1 1 calc(50% - 1rem);
    max-width: 100%;
  }

  .skills-row .skills-column:nth-child(3) {
    flex: 1 1 100%;
    max-width: 50rem;
    margin: 0 auto;
  }

  .projects .projects-container {
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 2.5rem;
  }

  .contact form .input-box .input-field {
    flex: 1 1 100%;
  }

  .footer-social {
    gap: 0.8rem;
  }

  .footer-social a {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.9rem;
  }
}

@media (max-width: 520px) {
  html{
    font-size: 50%;
  }

  .header {
    padding: 1.5rem 3%;
  }

  section {
    padding: 10rem 3% 2rem;
  }

  .home {
    padding: 12rem 3% 2rem;
    gap: 3rem;
  }

  .home-content h1 {
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .home-profile-img {
    width: clamp(14rem, 60vw, 26rem);
  }

  .home-sci {
    width: 100%;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.4rem;
  }

  .home-sci a {
    width: clamp(3rem, 8vw, 3.8rem);
    height: clamp(3rem, 8vw, 3.8rem);
  }

  .btn-box .btn {
    font-size: 1.4rem;
    height: 4.5rem;
  }

  .about-img {
    width: clamp(16rem, 55vw, 30rem);
    height: clamp(16rem, 55vw, 30rem);
    aspect-ratio: 1/1;
  }

  .projects .projects-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Skills mobile - todas as colunas empilhadas */
  .skills-row .skills-column {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .footer {
    padding: 2rem 3%;
  }
}

@media (max-width: 462px) {
  html {
    font-size: 50%;
  }
  
  .header {
    padding: 1rem 3%;
    min-height: 6rem;
  }
  
  .logo {
    font-size: 2.2rem;
  }
  
  #menu-icon {
    font-size: 2.8rem;
    min-height: 40px;
    min-width: 40px;
  }
  
  /* Improved mobile typography */
  .home-content h1 {
    font-size: clamp(3rem, 8vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .home-content .text-animate h3 {
    font-size: clamp(2rem, 6vw, 2.8rem);
  }
  
  .home-content p {
    font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    line-height: 1.6;
    margin: 1.5rem 0 2rem;
  }

  .home-profile-img {
    width: clamp(12rem, 70vw, 24rem);
    margin: 0 auto 2rem auto;
  }
  
  /* Better button spacing on small screens */
  .btn-box {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 25rem;
    padding: 1.2rem 2rem;
    font-size: 1.4rem;
  }

  .education {
    padding: 8rem 3% 4rem;
  }
  
  /* Improve form spacing */
  .contact {
    padding: 8rem 3% 4rem;
  }

  .contact form .input-box .input-field {
    width: 100%;
    margin: 0.8rem 0;
  }
  
  .contact form .input-box .input-field input,
  .contact form .input-box .input-field textarea {
    padding: 1.5rem;
    font-size: 1.4rem;
  }
  
  /* Better social media icons spacing */
  .home-sci {
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .home-sci a {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.8rem;
  }
  
  /* Improve section headings */
  .heading {
    font-size: clamp(3.5rem, 8vw, 4.5rem);
    margin-bottom: 4rem;
  }
  
  /* Better project cards for mobile */
  .projects .projects-container {
    gap: 1.5rem;
    padding: 0;
  }
  
  .project-box {
    padding: 2rem 1.5rem;
  }
  
  .project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .project-content p {
    font-size: 1.3rem;
    line-height: 1.5;
  }
}

  .footer {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-social a {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.8rem;
  }

  .footer p {
    margin-top: 2rem;
    text-align: center;
  }
}

@media (max-width: 371px) {
  html {
    font-size: 48%;
  }

  .home {
    justify-content: center;
    padding: 10rem 2% 2rem;
    gap: clamp(2rem, 5vw, 3rem);
  }
  
  .header {
    padding: 1rem 2%;
  }
  
  .logo {
    font-size: 2rem;
  }
  
  #menu-icon {
    font-size: 2.5rem;
    min-height: 36px;
    min-width: 36px;
  }
  
  .home-content h1 {
    font-size: clamp(2.5rem, 9vw, 4rem);
  }
  
  .home-content .text-animate h3 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  
  .home-profile-img {
    width: clamp(10rem, 75vw, 20rem);
  }
  
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1.3rem;
  }
  
  .heading {
    font-size: clamp(3rem, 9vw, 4rem);
  }
  
  /* Ultra-small screen optimizations */
  section {
    padding: clamp(6rem, 10vh, 8rem) 2% clamp(1.5rem, 3vh, 2rem);
  }
  
  .contact,
  .education,
  .portfolio-app {
    padding: 6rem 2% 2rem;
  }
}
  }

  .home-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .home-content h1 { 
    font-size: clamp(2.8rem, 11vw, 4.2rem); 
  }

  .home-profile-img {
    width: clamp(10rem, 75vw, 22rem);
  }

  .btn-box .btn {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    min-width: clamp(10rem, 85vw, 12rem);
    height: clamp(4rem, 10vw, 4.5rem);
    padding: 0.8rem 1rem;
  }

  section {
    padding: 10rem 2% 2rem;
  }
  
  /* Better spacing for very small screens */
  .home-sci {
    gap: clamp(1rem, 4vw, 1.5rem);
    margin-top: clamp(1.5rem, 4vw, 2rem);
  }
  
  .home-sci a {
    width: clamp(3rem, 8vw, 3.5rem);
    height: clamp(3rem, 8vw, 3.5rem);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
  }
  
  /* Improve form for very small screens */
  .contact form .input-box .input-field {
    flex: 1 1 100%;
    margin: 0.5rem 0;
  }
  
  /* Better project cards */
  .projects .projects-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Mobile landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .home {
    min-height: auto;
    padding: 8rem 4% 2rem;
    gap: 2rem;
  }
  
  .home-profile-img {
    width: clamp(12rem, 25vw, 18rem);
  }
  
  section {
    min-height: auto;
    padding: 6rem 4% 2rem;
  }
  
  .header {
    padding: 1rem 4%;
  }
  
  .navbar a {
    margin: 1.5rem 0;
    font-size: 1.6rem;
  }
}


@keyframes cursor-blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}


@keyframes abountSpinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.animate {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--main-color);
  z-index: 98;
}

.animate.home-img{
  width: 50%;
}

.logo .animate,
.navbar .animate,
#menu-icon .animate,
.home.show-animate .animate {
  animation: showRight 1s ease forwards;
  animation-delay: calc(.3s * var(--i));
}

.animate.scroll {
  transition: 1s ease;
  transition-delay: calc(.3s / var(--i));
  animation: none;
}

.abount.show-animate .animate.scroll{
  transition-delay: calc(.3s * var(--i));
  width: 0;
}

@keyframes showRight {
  100% {
    width: 0;
  }
}

/* Estilos do Formulário de Contato */
.input-field.error input,
.input-field.error textarea,
.textarea-field.error textarea {
  border-color: #ff4757;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.error-message {
  color: #ff4757;
  font-size: 1.2rem;
  display: block;
  margin-top: 0.5rem;
  animation: fadeIn 0.3s ease;
}

.form-status {
  margin-top: 2rem;
  text-align: center;
}

.status-message {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  animation: slideIn 0.5s ease;
}

.status-message.success {
  background: rgba(46, 213, 115, 0.1);
  color: #2ed573;
  border: 1px solid #2ed573;
}

.status-message.error {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  border: 1px solid #ff4757;
}

.status-message i {
  font-size: 2rem;
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-loader {
  color: var(--main-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animações das barras de progresso */
@keyframes progressAnimation {
  from {
    width: 0%;
  }
}

/* Frontend Skills Animations */
@keyframes progress95 {
  to { width: 95%; }
}

@keyframes progress90 {
  to { width: 90%; }
}

@keyframes progress85 {
  to { width: 85%; }
}

@keyframes progress88 {
  to { width: 88%; }
}

/* Backend Skills Animations */
@keyframes progress92 {
  to { width: 92%; }
}

@keyframes progress80 {
  to { width: 80%; }
}

@keyframes progress94 {
  to { width: 94%; }
}

@keyframes progress100 {
  to { width: 100%; }
}

/* Mobile Skills Animations */
@keyframes progress78 {
  to { width: 78%; }
}

/* Efeito de partículas nas barras */
@keyframes sparkle {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0);
  }
}

.progress .bar::before {
  content: '✨';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0;
  z-index: 10;
}

.skills.reveal.active .progress .bar::before {
  animation: sparkle 1s ease-out;
  animation-delay: 2.2s;
}

/* Portfolio App Section */
.portfolio-app {
  padding: 10rem 9% 2rem;
  background: var(--second-bg-color);
}

.app-container {
  max-width: 120rem;
  margin: 0 auto;
}

/* App Tabs */
.app-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-color);
  color: var(--text-color);
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 2.5rem;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.2), transparent);
  transition: left 0.5s ease;
}

.tab-btn:hover::before {
  left: 100%;
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--main-color);
  color: white;
  border-color: var(--main-color);
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(255, 0, 0, 0.3);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Demo Content */
.app-demo-content {
  padding: 2rem;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
}

.demo-header {
  margin-bottom: 2rem;
}

.demo-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.demo-time {
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
}

.demo-indicators {
  display: flex;
  gap: 0.5rem;
  color: white;
}

.demo-app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}

.demo-app-content h4 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.demo-app-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  line-height: 1.5;
}

.demo-launch-btn {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 1.5rem 2rem;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto;
}

.demo-launch-btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(255, 0, 0, 0.3);
}

/* Screenshots Grid */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.screenshot-item {
  text-align: center;
}

.phone-frame {
  width: 18rem;
  height: 32rem;
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border-radius: 2rem;
  padding: 1.5rem 1rem;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}

.screenshot-item h4 {
  color: var(--text-color);
  font-size: 1.6rem;
  margin-top: 1rem;
}

/* Video Section */
.video-container {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}

.video-placeholder {
  background: var(--bg-color);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 6rem 3rem;
  transition: all 0.3s ease;
}

.video-placeholder:hover {
  border-color: var(--main-color);
  transform: translateY(-5px);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.2);
}

.video-placeholder i {
  font-size: 6rem;
  color: var(--main-color);
  margin-bottom: 2rem;
}

.video-placeholder h4 {
  color: var(--text-color);
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.video-placeholder p {
  color: var(--text-color);
  font-size: 1.4rem;
  margin-bottom: 3rem;
  opacity: 0.8;
}

.video-play-btn {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 1.5rem 3rem;
  border-radius: 0.8rem;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.video-play-btn:hover {
  background: #cc0000;
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(255, 0, 0, 0.3);
}

#appVideo {
  width: 100%;
  max-width: 60rem;
  border-radius: 1.5rem;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.3);
}

.app-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 6rem;
}

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

.phone-mockup {
  width: 25rem;
  height: 50rem;
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border-radius: 3rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.3);
  position: relative;
  transform: perspective(800px) rotateY(-15deg);
  transition: all 0.3s ease;
}

.phone-mockup:hover {
  transform: perspective(800px) rotateY(0deg);
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 6rem;
  height: 0.5rem;
  background: #333;
  border-radius: 1rem;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
}

.app-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 2rem;
  transform: scale(0.3);
  transform-origin: top left;
  width: calc(100% / 0.3);
  height: calc(100% / 0.3);
}

.app-content h3 {
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  margin-bottom: 2rem;
  color: var(--text-color);
}

.app-content p {
  font-size: clamp(1.4rem, 2.5vw, 1.6rem);
  margin-bottom: 3rem;
  line-height: 1.6;
  color: var(--text-color);
}

.app-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: var(--main-color);
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(255, 0, 0, 0.2);
}

.feature-item i {
  font-size: 2rem;
  color: var(--main-color);
}

.feature-item:hover i {
  color: white;
}

.feature-item span {
  font-weight: 600;
  color: var(--text-color);
}

.feature-item:hover span {
  color: white;
}

.app-actions {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 2.5rem;
  background: var(--main-color);
  color: white;
  text-decoration: none;
  border-radius: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--main-color);
}

.app-btn:hover {
  background: transparent;
  color: var(--main-color);
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(255, 0, 0, 0.3);
}

.app-btn.secondary {
  background: transparent;
  color: var(--main-color);
  border: 2px solid var(--main-color);
}

.app-btn.secondary:hover {
  background: var(--main-color);
  color: white;
}

.app-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.stat-card {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-color);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.2);
  border-color: var(--main-color);
}

.stat-card i {
  font-size: 4rem;
  color: var(--main-color);
  margin-bottom: 1.5rem;
}

.stat-card h4 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.stat-card p {
  font-size: 1.4rem;
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 991px) {
  .portfolio-app {
    padding: 8rem 4% 2rem;
  }
  
  .app-showcase {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }
  
  .phone-mockup {
    width: 20rem;
    height: 40rem;
    transform: none;
    margin: 0 auto;
  }
  
  .app-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .app-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .app-stats {
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  }
}

@media (max-width: 768px) {
  .portfolio-app {
    padding: 6rem 3% 2rem;
  }
  
  .phone-mockup {
    width: 18rem;
    height: 36rem;
    padding: 1.5rem 1rem;
  }
  
  .app-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }
  
  .app-content p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
  }
  
  .app-features {
    margin-bottom: 2rem;
  }
  
  .feature-item {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .feature-item i {
    font-size: 1.8rem;
  }
  
  .feature-item span {
    font-size: 1.3rem;
  }
  
  .app-stats {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stat-card {
    padding: 2rem 1.5rem;
  }
  
  .stat-card i {
    font-size: 3rem;
  }
  
  .stat-card h4 {
    font-size: 1.8rem;
  }
  
  .stat-card p {
    font-size: 1.3rem;
  }
}

@media (max-width: 462px) {
  .portfolio-app {
    padding: 5rem 4% 2rem;
  }
  
  .phone-mockup {
    width: 16rem;
    height: 32rem;
  }
  
  .app-content h3 {
    font-size: 2rem;
  }
  
  .app-content p {
    font-size: 1.3rem;
  }
  
  .app-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .app-btn {
    width: 100%;
    justify-content: center;
    max-width: 25rem;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  .stat-card {
    padding: 1.5rem 1rem;
  }
}

/* Responsividade para mensagens */
@media (max-width: 768px) {
  .status-message {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 1.2rem;
  }
  
  .error-message {
    font-size: 1.1rem;
  }
}