* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
  width: 100%;
  overflow-x: hidden;
}
img-comparison-slider {
  border-radius: 10px;
  border: none;
}
img-comparison-slider img {
  width: 100%;
}
.capa {
  background: #ddd;
  height: 100vh;
  width: 100%;
  color: #fff;
}
.capa-texto {
  padding: 0px;
  position: relative;
  top: 70%;
  text-align: right;
}
.capa-portfolio {
  position: relative;
  padding: 15px;
  background: #555;
  animation-name: slideRight;
  animation-duration: 1s;
}
.capa-nome {
  position: relative;
  background: #222;
  padding: 10px;
  animation-name: slideLeft;
  animation-duration: 1s;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.container2 {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.contorno {
  position: absolute;
  left: 5%;
  top: -350px;
  max-width: 1300px;
  min-width: 800px;
  width: 80%;
}
.capa-projeto {
  position: relative;
  background: #555;
  height: 100vh;
  width: 100%;
}
.capa-projeto img {
  position: absolute;
  bottom: 0;
  left: 10%;
  max-width: 750px;
  width: 100%;
}
.projeto-nome {
  color: #fff;
  position: absolute;
  text-align: right;
  bottom: 300px;
  background: #222;
  padding: 10px 10% 10px 0;
  width: 100%;
  right: 0;
}
.pagina-branco {
  background: #fff;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.pagina-branco img {
  max-width: 1200px;
  width: 100%;
}
.descricao {
  width: 50%;
  margin: 20px;
  font-weight: 200;
  line-height: 1.8;
}
.perfil {
  margin: 50px;
}
.foto {
  width: 200px;
  border-radius: 50%;
  filter: grayscale(100%);
}
.header-perfil {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.perfil-fundo {
  background: #ddd;
  padding: 10px;
  font-weight: 300;
  position: relative;
  margin: 70px 0;
  line-height: 1.8;
}
.perfil-titulo {
  letter-spacing: 0.4rem;
  position: absolute;
  /* top: -100%; */
  transform: translateY(-105%);
  font-weight: 600;
  font-size: large;
}
.contato p {
  font-weight: 300;
  display: flex;
  padding: 5px;
}
.contato p img {
  padding-right: 10px;
}
.contato a {
  text-decoration: none;
  color: inherit;
  outline: none;
}
.container-software {
  display: flex;
  margin: 10px;
}
.nome-software {
  text-align: right;
  font-weight: 700;
  width: 50%;
}
.skill {
  display: flex;
  position: relative;
  align-items: flex-end;
}
.skill p {
  position: absolute;
  font-size: smaller;
  left: 5px;
  top: -5px;
}
.skill-bar {
  width: 50px;
  height: 4px;
  margin: 5px;
}
.skill-bar-on {
  background: #222;
}
.skill-bar-off {
  background: #fff;
}

/* Three.js Section Styles */
.threejs-section {
  background: #f8f8f8;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 50px 0;
}

.threejs-container {
  width: 100%;
  max-width: 1200px;
  height: 70vh;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#sun-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.threejs-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 10px;
  min-width: 200px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.threejs-controls h4 {
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
}

.control-group {
  margin-bottom: 10px;
}

.control-group label {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-weight: 500;
}

.control-group input[type='range'] {
  width: 100%;
  margin-bottom: 5px;
}

.control-group input[type='date'],
.control-group input[type='time'] {
  width: 100%;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.sun-info {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 10px;
  min-width: 150px;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.sun-info h4 {
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
}

.info-item {
  margin-bottom: 5px;
  color: #555;
}

.threejs-iframe {
  width: 100%;
  height: 80vh;
  border: none;
  border-radius: 15px;
}

.slide-x-r {
  animation: linear slide-x-r both;
  animation-range: entry 5% cover 30%;
  animation-timeline: view(block);
}
.slide-x-l {
  animation: linear slide-x-l both;
  animation-range: entry 5% cover 30%;
  animation-timeline: view(block);
}
.slide-y {
  animation: linear slide-y both;
  animation-range: entry 20% cover 30%;
  animation-timeline: view(block);
}
@keyframes slideRight {
  0% {
    left: -100%;
  }
  100% {
    left: 0px;
  }
}

@keyframes slideLeft {
  0% {
    right: -100%;
  }
  100% {
    right: 0px;
  }
}
@keyframes slide-x-r {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slide-x-l {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slide-y {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media only screen and (max-width: 600px) {
  .contorno {
    left: -160px;
    top: -250px;
  }
  .capa-projeto img {
    left: auto;
    margin: auto;
  }
  .descricao {
    width: 80%;
  }
  .skill-bar {
    width: 20px;
  }
  .perfil {
    margin: 5px;
  }
  .projeto-nome {
    bottom: 500px;
    z-index: 10;
  }
  .threejs-controls,
  .sun-info {
    position: relative;
    margin: 10px;
    width: calc(100% - 20px);
  }
  .threejs-container {
    height: 50vh;
    margin: 0 10px;
  }
}

.cta-section {
  background: linear-gradient(135deg, #222 0%, #555 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 1.2em;
  font-weight: 300;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
}

.cta-button img {
  width: 20px;
  height: 20px;
  filter: brightness(1) invert(1);
}

.cta-button.primary {
  background: #fff;
  color: #222;
}

.cta-button.primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.cta-button.secondary:hover {
  background: #fff;
  color: #222;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.cta-button.secondary:hover img {
  filter: brightness(0);
}

.cta-button.cta-button.primary:hover img {
  filter: brightness(1);
}

.cta-info {
  font-size: 0.9em;
  opacity: 0.8;
  font-weight: 300;
}

.cta-info p {
  margin: 5px 0;
}
.cta-info a {
  text-decoration: none;
  color: #fff;
}
.cta-info a:hover {
  text-decoration: underline;
}
/* Mobile responsiveness */
@media only screen and (max-width: 600px) {
  .cta-title {
    font-size: 1.8em;
  }

  .cta-subtitle {
    font-size: 1em;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-button {
    width: 100%;
    max-width: 280px;
  }
}

/* Language switcher */
.lang-switcher {
  position: fixed;
  top: 20px;
  left: calc(100vw - 120px);
  z-index: 9999;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 5px;
  backdrop-filter: blur(10px);
}

.lang-switcher a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 3px;
  transition: all 0.3s ease;
  display: inline-block;
}

.lang-switcher a:hover {
  background: #333;
  color: #fff;
}

.lang-switcher a.active {
  background: #222;
  color: #fff;
}
@media only screen and (max-width: 600px) {
  .lang-switcher {
    z-index: 10000; /* Even higher for mobile */
    padding: 12px 16px; /* Larger touch areas */
  }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0 20px 0;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.social-link:hover svg {
  fill: #222;
}

/* Individual social media brand colors on hover */
.social-link[title='GitHub']:hover {
  background: #333;
  border-color: #333;
}

.social-link[title='GitHub']:hover svg {
  fill: #fff;
}

.social-link[title='Instagram']:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #e6683c;
}

.social-link[title='Facebook']:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.social-link[title='X (Twitter)']:hover {
  background: #000;
  border-color: #000;
}

.social-link[title='LinkedIn']:hover {
  background: #0077b5;
  border-color: #0077b5;
}
