@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&family=Funnel+Display:wght@300..800&family=Oswald:wght@200..700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Cabin, sans-serif;
  background-color: #1a1a1a;
  color: #f0f0f0;
  line-height: 1.6;
}

/* --- HEADER --- */
header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #2c2c2c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
}

.redes {
  display: flex;
  gap: 1.2rem;
}

.redes a {
  color: #aaaaaa;
  font-size: 2.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.redes a:hover {
  color: #00aaff;
  transform: scale(1.2);
}

/* --- HERO SECTION --- */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
  text-align: center;
}

.textos h1 {
  font-size: 5rem;
  color: #f0f0f0;
}

.textos h1 span {
  color: #00aaff;
}

.textos h1 span.vermelho {
  color: #ff4c4c;
}

.textos p {
  color: #aaaaaa;
}

.Opa {
  font-size: 2rem;
}

.desc {
  font-size: 1.2rem;
  padding-bottom: 2rem;
}

.vermelho {
  color: #ff4c4c;
}

/* --- BOTOES --- */
.botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.botoes a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  background-color: #00aaff;
  font-size: 1.2rem;
  padding: 1.2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.botoes a:hover {
  background-color: #00c0ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* --- FOTO DE PERFIL --- */
.foto-externa {
  position: relative;
  width: min(80vw, 345px);
  height: min(80vw, 345px);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.borda-giratoria {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 0.6rem;
  background: conic-gradient(from 90deg, #00aaff 180deg 360deg);
  box-shadow: 0 0 30px #00aaff, 0 0 40px #00aaff;
  transition: box-shadow 0.4s ease;
  z-index: 1;
}

.foto {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  pointer-events: none;
  user-select: none;
}

.foto-externa:hover .borda-giratoria {
  box-shadow: 0 0 60px #00aaff, 0 0 80px #00aaff, 0 0 100px #00aaff;
}

/* --- PROJETOS --- */
#projetos {
  scroll-margin-top: -100px;
}

.projetos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10rem 7rem;
  gap: 2rem;
}

.titulo {
  font-family: Oswald, sans-serif;
  font-size: 2.5rem;
  color: #00aaff;
  margin-bottom: 2rem;
  width: 100%;
}

.titulo span {
  color: #f0f0f0;
}

/* --- GRID DE CARDS --- */
.all-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
  width: 100%;
  padding: 0 1rem;
}

.card-item {
  background: #2c2c2c;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.card-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.card-item.software {
  border: 3px solid #00aaff;
}

.card-item.software:hover {
  box-shadow: 0 15px 40px rgba(0, 170, 255, 0.6);
}

.card-item.software .card-info h2 {
  color: #00aaff;
}

.card-item.hardware {
  border: 3px solid #ff4c4c;
}

.card-item.hardware:hover {
  box-shadow: 0 15px 40px rgba(255, 76, 76, 0.6);
}

.card-item.hardware .card-info h2 {
  color: #ff4c4c;
}

/* --- CARD ELEMENTS --- */
.card-image {
  position: relative;
  overflow: hidden;
  height: 200px;
  background-color: #3a3a3a;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-image:hover img {
  transform: scale(1.15);
}

.card-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-info h2 {
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
  font-family: Oswald, sans-serif;
}

.card-info p {
  color: #aaaaaa;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.card-actions {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #444;
  margin-top: auto;
}

.card-actions a {
  font-size: 2rem;
  color: #aaaaaa;
  transition: color 0.3s ease;
}

.card-actions a:hover {
  color: inherit;
}

/* --- SOBRE MIM --- */
.sobre-mim {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4rem 7rem;
  gap: 2rem;
}

.sobre-mim p {
  font-size: 1.4rem;
  color: #aaaaaa;
  padding-bottom: 2rem;
}

/* --- MODAL DE DETALHES --- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 2rem;
}

.modal-content {
  background-color: #2c2c2c;
  color: #f0f0f0;
  margin: auto;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 800px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: aparecerModal 0.3s ease-out;
}

@keyframes aparecerModal {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content h2 {
  color: #00aaff;
  margin-bottom: 1rem;
  font-family: Oswald, sans-serif;
}

.modal-content.hardware h2,
.modal-content.hardware a {
  color: #ff4c4c;
}

.modal-content.hardware a:hover {
  color: #ff7777;
}

.modal-content p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #aaaaaa;
}

.modal-content a {
  color: #00aaff;
  text-decoration: underline;
  font-weight: bold;
}

.modal-content img,
.modal-content iframe {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
  object-fit: contain;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #00aaff;
}

.galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.galeria img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid #444;
  max-height: 300px;
}

/* --- EXTRA RESPONSIVE FIX --- */
@media (max-width: 360px) {
  .textos h1 {
    font-size: 1.8rem;
  }

  .botoes a {
    padding: 0.8rem;
    font-size: 1rem;
  }

  .foto-externa {
    width: 150px;
    height: 150px;
  }

  .titulo {
    font-size: 1.5rem;
  }
}
@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 6rem 7rem;
  }

  .textos {
    max-width: 50%;
    align-items: flex-start;
  }

  .botoes {
    justify-content: flex-start;
  }
}
/* Adicione esta classe ao seu arquivo style.css */
body.modal-open {
  overflow: hidden;
}