body {
  font-family: 'Inter', Arial, sans-serif;
  background-image: url('img/background.avif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #222;
}

header {
  background: transparent;
  padding: 40px 0 0 0;
  text-align: center;
}

nav {
  background: #fff;
  border-radius: 16px;
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

nav a {
  margin: 0 24px;
  text-decoration: none;
  color: #444;
  font-weight: 500;
  font-size: 1.3em;
  padding: 24px 0;
  display: inline-block;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-bottom 0.2s;
}

nav a.active, nav a:hover {
  color: #9c81bb;
  border-bottom: 3px solid #9c81bb;
}

.container {
  display: flex;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.sidebar {
  width: 320px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px 30px 30px 30px;
  margin-right: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.sidebar h1 {
  font-size: 2em;
  margin-bottom: 8px;
  font-weight: 700;
}

.sidebar h2 {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 24px;
  font-weight: 400;
}

.info-block {
  font-size: 1em;
  color: #2bb4c0;
  text-align: left;
  margin-top: 12px;
}

.info-block a {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #9c81bb;
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
}

.info-block span {
  color: #444;
  margin-top: 8px;
  display: block;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 15px;
}

.main-section {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px 40px 30px 40px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 700px;
}

.section-title {
  color: #222;
  font-size: 1.6em;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-hr {
  border: none;
  border-top: 3px solid #ee874e;
  width: 60px;
  margin: 0 0 24px 0;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: middle;
}

.highlight{
  color: #ee874e;
  font-weight: bold;
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  text-align: center;
}

.project-image {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.project-info h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
}

.project-link {
  margin-top: 10px;
  display: inline-block;
  background-color: #9c81bb;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.project-link:hover {
  background-color: #7b5ea2;
}

.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  position: relative;
}

.carousel-images {
  width: 600px;
  height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.carousel-img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: absolute;
  left: 0;
  top: 0;
}

.carousel-img.active {
  display: block;
}

.carousel-arrow {
  background: #fff;
  border: none;
  font-size: 2em;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 0 12px;
  transition: background 0.2s;
}

.carousel-arrow:hover {
  background: #ee874e;
}

.btn-container{
  display: flex;
  justify-content: center;
  margin-top: 8px; 
  gap: 16px;
}

.btn-projeto{
  display: block;
  margin: 0;
  padding: 10px;
  background-color: #ee874e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-width: 120px;
}

.btn-projeto:hover {
  background-color:  #df611e;
}

.tech-list {
  display: flex;
  gap: 32px;
  margin: 18px 0 24px 0;
  padding: 0;
  list-style: none;
  align-items: center;
}

.tech-list li {
  display: flex;
  align-items: center;
  font-size: 1.1em;
}

.icon-tools{
  width: 28px;
  height: 28px;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;

}


.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.skill-tag {
  background-color: #f1f1f1;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #333;
  border: 1px solid #ccc;
  transition: background-color 0.3s ease;
}

.skill-tag:hover {
  background-color: #ee874e;
}

.website-img{
  display: block;
  margin: 20px auto;
  justify-content: center;
  width: 500px;
  height: 300px;
}

/* ====== AJUSTES GLOBAIS (melhoram Safari iOS) ====== */
html {
  -webkit-text-size-adjust: 100%;
}
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}
.carousel-images { position: relative; } /* garante contexto pros slides */
.main-section { contain: layout paint; } /* evita jumps ao redimensionar */

/* ====== TABLET / LANDSCAPE PHONES ====== */
@media (max-width: 1024px) {
  nav { padding: 0 20px; }
  nav a { font-size: 1.15em; padding: 18px 0; }

  .container { max-width: 980px; padding: 0 16px; gap: 20px; }

  .sidebar { margin-right: 24px; padding: 32px 22px; }
  .profile-photo { width: 140px; height: 140px; }

  .main-section { max-width: 820px; padding: 32px 28px; }

  /* carousel um pouco menor no tablet */
  .carousel-images { width: 100%; aspect-ratio: 16/9; height: auto; }
}

/* ====== TELEFONES (iPhone 16 Pro Max incluso) ====== */
@media (max-width: 768px) {

  /* layout em coluna + centrado */
  .container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 12px;
  }

  .sidebar,
  .main-content {
    width: 100%;
    padding: 0;
    border: none;
    margin-right: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  }

  .sidebar {
    margin-bottom: 20px;
    text-align: center;
    border-radius: 16px;
    padding: 24px 16px;
  }

  header { padding: 20px 0 0 0; }

  /* navegação empilhada e clicável */
  nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
  }
  nav a {
    display: block;
    margin: 4px 8px;
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    padding: 10px 0;
    border-bottom-width: 2px;
  }

  .profile-photo {
    width: 120px; height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    object-fit: cover;
  }

  .main-section {
    padding: 22px 16px;
    border-radius: 16px;
    max-width: 100%;
  }

  .section-title { font-size: 1.25em; }
  .section-hr { width: 48px; margin-bottom: 14px; }

  .tech-list {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .project { margin-bottom: 24px; text-align: center; }

  .project-image, .website-img {
    width: 100%; max-width: 100%;
    height: auto; border-radius: 12px;
  }

  /* ===== CARROSSEL ===== */
  .carousel { flex-direction: column; gap: 12px; margin: 16px 0; }
  .carousel-images {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;  /* mantém proporção bonita */
    overflow: hidden;
  }
  .carousel-img {
    display: none;
    width: 100%; height: 100%;
    object-fit: contain; /* sem cortar imagem no mobile */
    position: absolute; inset: 0;
  }
  .carousel-img.active { display: block; position: relative; }
  .carousel-arrow {
    width: 36px; height: 36px;
    font-size: 1.35em; margin: 6px 0;
  }

  .btn-container { flex-wrap: wrap; gap: 10px; }
  .btn-projeto { min-width: 48%; padding: 10px 12px; font-size: 0.95em; }

  ul { padding-left: 18px; }
  li { font-size: 1em; margin-bottom: 8px; }

  /* ===== SKILLS – grid fluída em chips ===== */
  #skills .skill-category { margin-bottom: 14px; }
  #skills .skill-category h3 {
    font-size: 1.05em; margin: 0 0 10px 0; font-weight: 600; color: #222;
  }
  #skills .tags-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    align-items: stretch;
  }
  #skills .skill-tag {
    display: inline-flex;
    align-items: center; justify-content: center;
    padding: 10px 12px; min-height: 38px;
    border-radius: 999px;
    background: #f7f7f8; border: 1px solid #e6e6e6;
    font-size: 0.92rem; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}

/* ====== TELEFONES PEQUENOS (Galaxy A, iPhone SE/Zoom UI) ====== */
@media (max-width: 480px) {
  nav a { font-size: 0.95rem; }
  .sidebar h1 { font-size: 1.5rem; }
  .sidebar h2 { font-size: 1rem; }
  .section-title { font-size: 1.15em; }
  .btn-projeto { min-width: 100%; }
  #skills .tags-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ====== MUITO ESTREITO (<=360px) — 1 coluna nos chips ====== */
@media (max-width: 360px) {
  #skills .tags-container { grid-template-columns: 1fr; }
}
