/* Variáveis de cores */
:root {
  --color-bg: #222; /* Fundo principal */
  --color-bg-dark: #000; /* Fundo escuro para gradiente */
  --color-primary: #111; /* Primeira cor do gradiente */
  --color-white: #fff;
  --color-off-white: #f0f0f0;
  --color-gray-light: #ccc;
  --color-gray: #ddd;
  --color-dark: #1a1a1a;
  --color-medium: #444;
  --color-medium-dark: #333;
  --color-hover: #555;
  --color-link: #a4a4eb;
  --color-link-hover: #fff;
  --color-tech-primary: #1E90FF;
  --color-tech-hover: #4682B4;
  --color-transparent-white: rgba(255, 255, 255, 0.1);
}

/* Reset global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

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

body {
  background: linear-gradient(135deg, var(--color-bg-dark), var(--color-bg));
  color: var(--color-white);
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

.section h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 28px;
  font-weight: 600;
  color: var(--color-off-white);
}

/* Sidebar */
.sidebar {
  width: 320px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-bg));
  padding: 25px;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out;
  justify-content: center;
}

.sidebar.hidden {
  transform: none;
}

.sidebar-toggle {
  display: none;
}

.sidebar-toggle i {
  font-size: 20px;
}

.profile-pic {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
  border: 2px solid var(--color-white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease-in-out;
}

.profile-pic:hover {
  transform: scale(1.05);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar h2 {
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 600;
  word-wrap: break-word;
  width: 180px;
}

/* Botão de informações */
.info-toggle {
  background: var(--color-bg);
  color: var(--color-white);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.3s ease-in-out;
  width: 100%;
  justify-content: center;
}

.info-toggle:hover {
  background: var(--color-medium);
}

/* Seção de informações */
.info {
  margin-top: 5px;
  display: none;
  width: 100%;
  text-align: left;
  padding: 10px;
  background: var(--color-dark);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(255, 255, 255, 0.1);
}

.info p {
  margin: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info i {
  color: var(--color-link);
  font-size: 16px;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Contatos */
.contact {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.contact a {
  color: var(--color-white);
  font-size: 22px;
  text-decoration: none;
  background: var(--color-medium-dark);
  padding: 12px;
  border-radius: 50%;
  transition: 0.3s ease-in-out;
  box-shadow: 0 0px 8px rgba(255, 255, 255, 0.1);
}

.contact a:hover {
  background: var(--color-hover);
  transform: scale(1.15);
  box-shadow: 0 0px 12px rgba(255, 255, 255, 0.3);
}

/* Conteúdo */
.content {
  flex: 1;
  padding: 60px;
  padding-top: 40px;
  margin-right: 340px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  margin-bottom: 10px;
}

.content::-webkit-scrollbar {
  display: none;
}

/* Menu */
.menu {
  display: flex;
  gap: 25px;
  margin-bottom: 35px;
}

.menu button {
  background: var(--color-bg);
  border: 2px solid transparent;
  color: var(--color-white);
  padding: 12px 25px;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.3s ease-in-out;
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0 3px 6px rgba(255, 255, 255, 0.1);
}

.menu i {
  color: var(--color-link);
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.menu button:hover {
  background: var(--color-medium);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

/* Seções */
.section {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.section.active {
  display: block;
}

/* Botão do menu */
.button-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 40px;
  justify-content: center;
  align-items: center;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.project-card {
  background: var(--color-transparent-white);
  border-radius: 10px;
  overflow: hidden;
  max-width: 350px;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease-in-out;
}

.project-card:hover {
  transform: scale(1.05);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 15px;
  text-align: center;
  cursor: pointer;
}

.project-content h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.project-content p {
  font-size: 14px;
  color: var(--color-gray);
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: max-height 0.3s ease-in-out;
}

.project-content p.expanded {
  max-height: none;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.project-link {
  display: block;
  margin-top: 10px;
  text-decoration: none;
  color: var(--color-link);
  font-weight: bold;
  transition: color 0.3s ease-in-out;
}

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

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    justify-content: center;
    max-width: 600px;
  }

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

@media (max-width: 768px) {
  .projects-container {
    grid-template-columns: 1fr;
    max-width: 90%;
  }

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

@media (max-width: 480px) {
  .projects-container {
    padding: 10px;
  }

  .project-content h2 {
    font-size: 18px;
  }

  .project-content p {
    font-size: 13px;
  }
}

/* Animação */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilização da introdução */
.tech-intro {
  text-align: center;
  font-size: 18px;
  color: var(--color-gray-light);
  max-width: 800px;
  margin: 10px auto 30px;
  padding: 0 20px;
}

/* Estilização dos cards */
.tech-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
  gap: 6px;
}

.tech-card:hover {
  transform: scale(1.05);
  background: var(--color-medium-dark);
}

.tech-card i {
  font-size: 45px;
  color: var(--color-tech-primary);
  transition: color 0.3s ease;
}

.tech-card:hover i {
  color: var(--color-tech-hover);
}

.tech-card span {
  font-size: 16px;
  font-weight: bold;
  color: var(--color-white);
}

/* Responsividade */
@media (max-width: 1024px) {
  .tech-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .tech-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-card i {
    font-size: 35px;
  }
}

@media (max-width: 480px) {
  .tech-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-card i {
    font-size: 30px;
  }

  .tech-card span {
    font-size: 14px;
  }

  .tech-intro {
    font-size: 16px;
  }
}

.about-container {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-top: 30px;
}

.about-text {
  flex: 2;
  max-width: 1000px;
}

.about-text p {
  font-size: 16px;
  color: var(--color-gray);
  line-height: 1.6;
}

@media (max-width: 768px) {
  #about p {
    font-size: 16px;
  }

  .about-container {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .about-text {
    max-width: 90%;
  }

  .about-image {
    max-width: 150px;
  }

  .contact-btn {
    width: 100%;
    font-size: 14px;
  }
}

@media (max-width: 376px) {

  .about-container {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .about-text {
    padding: 0 15px;
  }

  .contact-btn {
    font-size: 12px;
    padding: 8px 15px;
  }
}

/* Responsividade */

/* Celulares (até 768px) */
@media (max-width: 830px) {
  .section h1 {
    font-size: 24px;
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar {
    left: 0;
    width: 260px;
    transform: translateX(0);
    position: fixed;
    top: 60px;
    bottom: 0;
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.hidden {
    transform: translateX(-100%);
  }

  .profile-pic {
    width: 130px;
    height: 130px;
  }

  .sidebar h2 {
    font-size: 18px;
  }

  .info-toggle {
    font-size: 12px;
    padding: 8px;
    background: var(--color-bg);
    color: var(--color-white);
  }

  .info p {
    font-size: 12px;
  }

  .contact {
    justify-content: center;
  }

  .contact a {
    font-size: 18px;
    padding: 8px;
    color: var(--color-white);
    background: var(--color-medium-dark);
  }

  .menu {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 30px;
    position: fixed;
    top: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-bg));
    width: 100%;
    padding: 10px;
    height: 60px;
    z-index: 10;
  }

  .content {
    margin-top: 60px;
    padding: 0;
    margin-right: 0;
    padding-right: 20px;
  }

  .menu button {
    padding: 8px;
    box-shadow: none;
    align-items: center;
    background: var(--color-bg);
    color: var(--color-white);
  }

  .section {
    padding-left: 20px;
    text-align: center;
  }

  .section.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
  }
}

@media (max-width: 376px) {
  .sidebar {
    top: 50px;
    width: 220px;
    height: calc(100vh - 50px);
  }

  .profile-pic {
    width: 100px;
    height: 100px;
  }

  .sidebar h2 {
    font-size: 16px;
  }

  .info-toggle {
    font-size: 10px;
    padding: 6px;
    background: var(--color-bg);
    color: var(--color-white);
  }

  .info p {
    font-size: 10px;
  }

  .contact a {
    font-size: 16px;
    padding: 6px;
    color: var(--color-white);
    background: var(--color-medium-dark);
  }

  .menu {
    height: 50px;
    padding: 5px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-bg));
  }

  .content {
    margin-top: 60px;
    padding-right: 10px;
  }

  .section {
    padding-left: 10px;
  }

  .section.active {
    margin-top: 5px;
  }
}

/* Telas grandes (acima de 1620px) */
@media (min-width: 1620px) {
  .sidebar {
    width: 380px;
    padding: 30px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-bg));
  }

  .profile-pic {
    width: 200px;
    height: 200px;
  }

  .sidebar h2 {
    font-size: 24px;
  }

  .info p {
    font-size: 16px;
  }

  .contact a {
    font-size: 26px;
    padding: 15px;
    color: var(--color-white);
    background: var(--color-medium-dark);
  }

  .content {
    margin-right: 400px;
    padding: 80px;
  }

  .menu button {
    font-size: 18px;
    padding: 14px 30px;
    background: var(--color-bg);
    color: var(--color-white);
  }
}

/* Widescreen (acima de 1920px) */
@media (min-width: 1920px) {
  .sidebar {
    width: 420px;
    padding: 35px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-bg));
  }

  .profile-pic {
    width: 220px;
    height: 220px;
  }

  .sidebar h2 {
    font-size: 26px;
  }

  .info p {
    font-size: 18px;
  }

  .contact a {
    font-size: 30px;
    padding: 18px;
    color: var(--color-white);
    background: var(--color-medium-dark);
  }

  .content {
    margin-right: 450px;
    padding: 100px;
  }

  .menu button {
    font-size: 20px;
    padding: 16px 35px;
    background: var(--color-bg);
    color: var(--color-white);
  }
}
