/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}

/* ===== Paleta de Cores ===== */
:root {
  --cor-primaria: #16a085;
  --cor-secundaria: #1abc9c;
  --cor-escura: #2c3e50;
  --cor-clara: #ffffff;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

header {
  background: var(--cor-escura);
  color: var(--cor-clara);
  padding: 20px 0;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
}

header nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

header nav a {
  text-decoration: none;
  color: var(--cor-clara);
  transition: 0.3s;
}

header nav a:hover {
  color: var(--cor-secundaria);
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 40px 0;
}

h2 {
  font-size: 26px;
  color: var(--cor-primaria);
  margin-bottom: 15px;
}

/* Sobre */
.sobre h2 {
  display: flex;
  justify-content: center;
}
.sobre-conteudo {
  display: flex;
  align-items: stretch;
  gap: 30px;
}

.sobre-conteudo p {
  font-size: 18px;
}

.sobre-conteudo img {
  width: 50%;
  height: 250px;
  max-width: 250px;
  border-radius: 10px;
}

.sobre-texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.sobre-texto span {
  font-size: 16px;
  font-weight: 600;
  color: var(--cor-escura);
  margin-left: 20px;
}

.btn-projetos {
  display: inline-block;
  background: var(--cor-primaria);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: 0.3s ease;
  max-width: 180px;
  margin-left: 25px;
}

.btn-projetos:hover {
  color: #222;
  background: var(--cor-secundaria);
  transform: translateY(-2px);
}

/* ===== Projetos ===== */
.projetos h2 {
  display: flex;
  justify-content: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--cor-clara);
  padding: 60px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: auto;
  max-width: 300px;
  max-height: 150px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.card h3 {
  color: var(--cor-primaria);
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--cor-primaria);
  text-decoration: none;
  font-weight: 600;
}

.card a:hover {
  color: var(--cor-secundaria);
}

/* ===== Contato ===== */
.contato h2 {
  display: flex;
  justify-content: center;
}
.social-links {
  display: flex;
  gap: 25px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 24px;
  text-decoration: none;
  overflow: visible;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.icon-btn span {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  color: #fff;
  background: rgba(0, 0, 0, 0.85);
  padding: 5px 12px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

/* Criando a setinha para o tooltip */
.icon-btn span::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.85);
}

.icon-btn:hover {
  transform: scale(1.1);
}

.icon-btn:hover span {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Cores personalizadas */
.github:hover {
  background: #333;
}

.linkedin:hover {
  background: #0077b5;
}

.email:hover {
  background: #d93025;
}

/* Responsividade */
@media (max-width: 600px) {
  .social-links {
    gap: 15px;
  }

  h2 {
    font-size: 1.8rem;
  }
}

.code-reference {
  margin-top: 40px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  text-align: left;
  font-size: 0.9rem;
}

.code-reference h3 {
  margin-bottom: 10px;
  color: #fff;
}

/* ===== Rodapé ===== */
footer {
  text-align: center;
  padding: 20px;
  background: var(--cor-escura);
  color: var(--cor-clara);
  margin-top: 20px;
}

/* ===== Responsividade ===== */
@media (max-width: 768px) {
  .sobre-conteudo {
    flex-direction: column;
    text-align: center;
  }

  .sobre-conteudo img {
    width: 70%;
    max-width: 280px;
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }

  header nav ul {
    flex-direction: column;
    gap: 10px;
  }
}
