/* ===== Container principal ===== */
.container {
  display: flex;
  min-height: 100vh;
  background-color: #0d1117;
  color: #c9d1d9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  height: 100vh;
  overflow-y: auto;
  /* adiciona scroll interno se necessário */
  width: 380px;
  background-color: #161b22;
  padding: 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 0;
}

.sidebar .avatar img {
  width: 220px;
  border-radius: 50%;
  margin-bottom: 0;
  margin-top: 30px;
}

.sidebar h2 {
  margin: 10px 0 0 0;
  color: #ffffff;
}

.sidebar p {
  font-size: 16px;
  text-align: center;
  margin-bottom: -6px;
  margin-top: 2px;

  color: #8b949e;
}

.sidebar .contact-links a {
  display: inline-block;
  margin: 5px;
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.skills-badges img {
  height: 22px;
  border-radius: 10px;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: -9px;
  margin-bottom: -10px;
}

.header-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.header-icon:hover {
  background-color: #355A83;
}

/* ===== Conteúdo principal ===== */
.content {
  flex-grow: 1;
  padding: 20px;
  max-width: 100%;
  margin: 15px auto;
}

/* ===== Tema Escuro ===== */
body {
  margin: 0;
  line-height: 1.6;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}



pre,
code {
  background-color: #141B23 !important;
  color: #c9d1d9;
  border-radius: 6px;
  display: block;
  overflow-x: auto;
  font-size: 15px;
}

h1>code.python {
  font-size: 15px !important;
}

.badge-container {
  background-color: #141B23;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

img[src*="img.shields.io"] {
  border-radius: 6px;
}

/* Para o highlight.js não sobrescrever */
.hljs {
  background: #141B23 !important;
  color: #c9d1d9;
}

img {
  max-width: 100%;
}

.project-badges {
  position: absolute;
  bottom: 3px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.project-badges-screen {
  position: absolute;
  bottom: 0px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.right {
  text-align: right;
}

.right img {
  margin-bottom: -7px;
}

.center {
  text-align: center;
}

.justify {
  text-align: justify;
}

.spacer {
  margin-top: 20px;
  margin-bottom: 20px;
}


.activity-graph {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  text-align: center;
}

.activity-graph img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

.separador {
  border: none;
  border-top: 1px solid rgba(139, 148, 158, 0.3);
  /* mesma cor, mas com 30% de opacidade */
  margin: 15px 0;
  width: 100%;
}

.separador2 {
  border: none;
  border-top: 4px solid rgba(139, 148, 158, 0.3);
  /* mesma cor, mas com 30% de opacidade */
  margin-top: 30px;
  margin-bottom: 30px;
  width: 100%;
}

.separador3 {
  border: none;
  border-top: 1px solid rgba(139, 148, 158, 0.3);
  /* mesma cor, mas com 30% de opacidade */
  margin: 25px 0;
  width: 100%;
}

.project-grid {
  width: 95%;
  border-collapse: collapse;
  border: none;
  margin-bottom: 6px 0 6px 0;
  table-layout: fixed;
  /* força colunas de largura igual */
}

.project-grid td {
  width: 33.33%;
  /* divide igualmente em 3 colunas */
  vertical-align: top;
  border: none;
  padding: 8px 6px 4px 8px;
  /* espaçamento interno apenas entre as células */
}

/* remove o padding nas bordas externas */
.project-grid tr:first-child td {
  padding-top: 0;
}

.project-grid tr:last-child td {
  padding-bottom: 0;
}

.project-grid td:first-child {
  padding-left: 0;
}

.project-grid td:last-child {
  padding-right: 0;
}

/* remove espaço do último item */
.project-grid tr:last-child td:last-child {
  padding-bottom: 0 !important;
}

/* neutraliza o width="33%" no HTML */
.project-grid td[width],
.project-grid [width] {
  width: 100% !important;
  max-width: 100% !important;
}

/* Garante que apenas as imagens principais dos projetos fiquem 100% */
.project-grid td>div>a>img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Garante 100% real das imagens internas, sem causar overflow */
.project-grid td>div>a>img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 5px !important;
}

/* Corrige possíveis pixels extras de margem vertical */
.project-grid td>div {
  position: relative !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* ===== Responsividade para telas pequenas ===== */
@media (max-width: 900px) {

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  .container {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sidebar .avatar img {
    width: 180px;
    height: auto;
  }

  .skills-badges {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .skills-badges img {
    height: auto;
  }


  .separador {
    border: none;
    border-top: 1px solid rgba(139, 148, 158, 0.3);
    /* mesma cor, mas com 30% de opacidade */
    margin-top: 15px;
    margin-bottom: 15px;
    width: 100%;
  }

  .separador2 {
    border: none;
    border-top: 4px solid rgba(139, 148, 158, 0.3);
    /* mesma cor, mas com 30% de opacidade */
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
  }

  .separador3 {
    border: none;
    border-top: 1px solid rgba(139, 148, 158, 0.3);
    /* mesma cor, mas com 30% de opacidade */
    margin: 25px 0 0;
    width: 100%;
  }

  .content {
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    margin-top: 0;
  }

  .content>* {
    max-width: 100%;
    overflow-x: auto;
  }

  .right,
  .center.spacer {
    text-align: center;
    overflow-x: auto;
    margin-top: 5px;
    margin-bottom: 5px;
  }

  .center.spacerr {
    text-align: center;
    overflow-x: auto;
    margin-top: -5px;
    margin-bottom: 10px;
    font-size: small;
  }

  .project-badges {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 0.3px;
  }

  .project-badges-screen {
    position: absolute;
    bottom: 2px;
    right: 15px;
    display: flex;
  }

  .project-badges-screen a {
    margin-right: -10px;
  }


  .right img,
  .center.spacer img {
    max-width: 90%;
    height: auto;
    margin: 2.8px;
  }

  pre {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0;
    font-size: 14px;
  }

  pre code {
    display: block;
    white-space: pre;
    font-size: 13px;
  }

  h1>code.python {
    font-size: 13.5px !important;
  }

  .justify.spacer {
    text-align: justify;
    width: 100%;
  }

  table {
    width: 100% !important;
    table-layout: auto;
  }

  table td {
    width: 100% !important;
    display: block;

  }

  table td div {
    text-align: center !important;
  }

  table td div img {
    max-width: 90%;
    height: auto;
  }

  .activity-graph {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    text-align: center;
  }

  .activity-graph img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;

  }

  /* ==== Tabela de projetos responsiva ==== */
  .project-grid {
    width: 100% !important;

  }

  .project-grid tr {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .project-grid td {
    display: block !important;
    width: 100% !important;
    border: none !important;
    padding: 0 0 16px 0 !important;
    /* 8px de espaço vertical entre blocos */
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* remove espaço do último item */
  .project-grid tr:last-child td:last-child {
    padding-bottom: 0 !important;
  }

  /* neutraliza o width="33%" no HTML */
  .project-grid td[width],
  .project-grid [width] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Garante que apenas as imagens principais dos projetos fiquem 100% */
  .project-grid td>div>a>img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* Garante 100% real das imagens internas, sem causar overflow */
  .project-grid td>div>a>img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto 0 auto !important;
    /* mantém seu espaçamento */
    border-radius: 5px !important;
  }

  /* Corrige possíveis pixels extras de margem vertical */
  .project-grid td>div {
    position: relative !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

}