/* ==================================================
   VARIÁVEIS GLOBAIS
================================================== */
:root {
    --cor-principal: #f0f0f0;
    --cor-fundo: #382000;
    --cor-fundo2: #99713D;
    --cor-fundo3: #664314;
    --cor-ativo: #CCA97A;
}

/* ==================================================
   RESET / BASE
================================================== */
*{
    font-family: "Roboto", sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--cor-fundo2);
    color: var(--cor-fundo);
}
html {
    scroll-behavior: smooth;
}
a{
    text-decoration: none;
    color: currentColor;
}

/* ==================================================
   LAYOUT – CABEÇALHO
================================================== */
.cabecalho {
    position: fixed;
    z-index: 1000;
    top: 0;

    width: calc(100% - 40px);
    height: 80px;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background-color: var(--cor-fundo);
    color: var(--cor-principal);
}

.logo{
    width: 20%;
}

.nav{
    height: 100%; 
    width: 80%;
}

/* ==================================================
   MENU SUPERIOR
================================================== */
.menu-sup {
    height: 100%;
    margin: 0;
    padding: 0;

    list-style: none;

    display: flex;
    align-items: center;
}

.menu-sup-item {
    margin: 0 10px;
}

.menu-sup-item a {
    display: inline-block;
    font-size: 1.25rem;
    color: var(--cor-principal);

    transition: color 0.3s ease;
}

.traco {
    width: 0%;
    height: 2px;
    background-color: currentColor;

    transition: width 0.4s ease;
}

.menu-sup-item a:hover > .traco {
    width: 100%;
}

.menu-sup-item a:focus-visible {
    outline: 2px solid var(--cor-ativo);
    outline-offset: 4px;
}

.menu-sup-item-ativo a {
    color: var(--cor-ativo);
}

/* ==================================================
   CONTEÚDO PRINCIPAL
================================================== */
.corpo {
    width: calc(100% - 20px);
    margin: 100px 10px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 1024px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==================================================
   GRID / FLEX
================================================== */
.row {
    display: flex;
    flex-wrap: wrap;
}

.row > div, .row > .projeto {
    flex: 1;
    width: auto;
}

.col{
    display: flex;
    flex-direction: row;
}

/* ==================================================
   IMAGENS
================================================== */
.img-content {
    width: auto;
}
.img-auto{
  width: 90%;
  height: 90%;
  object-fit: cover;     
}

.img-media {
    width: 300px;
}

.img-pequena {
    width: 100px;
}

/* ==================================================
   SEÇÕES
================================================== */
section {
    min-height: calc(100svh - 80px);
    scroll-margin-top: 80px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ==================================================
   TEXTOS
================================================== */
.saudacao {
    font-size: 3rem;
    color: var(--cor-fundo);
}

.titulo {
    font-size: 3rem;
    color: var(--cor-principal);
    text-decoration: underline;
}

/* ==================================================
   BOTÕES
================================================== */
.btn-principal {
    padding: 8px 16px;

    font-size: 1.5rem;
    cursor: pointer;

    background-color: var(--cor-fundo);

    border: none;
    border-radius: 8px;
    color: var(--cor-principal);

    transition: color 0.3s ease;
}

.btn-principal a {
    color: var(--cor-principal);

    transition: color 0.3s ease;
}

.btn-principal:hover a, .btn-principal:hover {
    color: var(--cor-ativo);
}


/* ==================================================
   SAUDAÇÃO
================================================== */

.subtitulo {
    font-size: 1.5rem;
    color: var(--cor-ativo);
    font-weight: 500;
}

.hero-descricao {
    max-width: 420px;
    font-size: 1rem;
    line-height: 1.6;
    color: #f2f2f2;
}

.destaque {
    color: var(--cor-principal);
}


/* ==================================================
   HABILIDADES
================================================== */

#habilidades > div {
    max-width: 1024px;
    width: calc (100% - 40px);
    padding: 20px;
}

.habilidades {
    background-color: var(--cor-fundo3);
    border: none;
    border-radius: 12px;
    color: var(--cor-principal);

    padding: 20px;
    margin-bottom: 20px;

    display: flex;
    gap: 16px;

    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    transition: transform .3s ease, box-shadow .3s ease;
}

.habilidades:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.25);
}
.habilidades h2 {
    margin: 0;
}
.habilidades > i {
    width: 60px;
    font-size: 3.5rem;
    color: var(--cor-ativo);
}
.habilidades p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 6px 0 12px;
    color: #f5f5f5;
}

.dados{
    width: calc(90% - 60px);
}

.barra-status {
    width: 100%;
    height: 11px;
    background-color: rgba(0,0,0,.3);
    border-radius: 20px;
    overflow: hidden;
}

.barra-preenchida {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 0;

    background: linear-gradient(
        90deg,
        var(--cor-ativo),
        var(--cor-principal),
        var(--cor-ativo)
    );
    background-size: 200% 100%;

    border-radius: 20px;

    animation:
        carregar 1.5s ease forwards,
        gradiente-movel 2s linear infinite;
}
.barra-preenchida::after {
    content: attr(data-nivel);
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);

    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(0,0,0,.6);
    pointer-events: none;
}

@keyframes carregar {
    to {
        width: var(--nivel);
    }
}
@keyframes gradiente-movel {
    0% {
        background-position: 200% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==================================================
   CONTATO
================================================== */
.row-projetos {
    justify-content: center;
    width: 100%;
    gap: 20px;
}

.row > .projeto {
    position: relative;
    min-width: 256px;
    min-height: 192px;

    cursor: pointer;

    border-radius: 12px;
    overflow: hidden;

    transition: transform 0.35s ease, box-shadow 0.35s ease;
    
    text-decoration: none;
    color: inherit;
}

.projeto:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(0,0,0,.25);
}

.projeto::after {
  content: "Ver no GitHub";
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 12px;

  font-size: 0.85rem;
  color: #fff;
  opacity: 0;

  transition: opacity 0.3s ease;
}
.projeto:hover::after {
  opacity: 1;
}

.projeto img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-base {
    z-index: 1;
}

.img-top {
    z-index: 2;
    animation: fade 21s ease-in-out infinite;
}

@keyframes fade {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}



/* ==================================================
   CONTATO
================================================== */

#contato {
    gap: 30px;
}

.form-contato {
    width: calc(100% - 60px);
    max-width: 480px;

    display: flex;
    flex-direction: column;
    gap: 20px;

    background-color: var(--cor-fundo3);
    padding: 30px;
    border-radius: 16px;

    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo label {
    font-size: 0.9rem;
    color: var(--cor-principal);
}

.campo input,
.campo textarea {
    padding: 12px 14px;
    font-size: 1rem;

    border-radius: 8px;
    border: none;
    outline: none;

    background-color: var(--cor-principal);
    color: var(--cor-fundo);
}

.campo input::placeholder,
.campo textarea::placeholder {
    color: #666;
}

.campo input:focus,
.campo textarea:focus {
    outline: 2px solid var(--cor-ativo);
}

.form-contato button {
    align-self: flex-end;
}

.form-feedback {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-feedback.display-none {
  display: none;
}
.form-feedback.sucesso {
  color: #2ecc71;
}
.form-feedback.erro {
  color: #e74c3c;
}


/* ==================================================
   LAYOUT – RODAPÉ
================================================== */

.rodape {
    width: 100%;
    background-color: var(--cor-fundo);
    color: var(--cor-principal);

    padding: 40px 0 0 0px;
}

.rodape-conteudo {
    max-width: 1024px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    text-align: center;
}

.rodape-identidade h2 {
    margin: 0;
    font-size: 1.6rem;
}

.rodape-identidade p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--cor-ativo);
}

.redes {
    display: flex;
    gap: 20px;
}

.redes a {
    font-size: 2rem;
    color: var(--cor-principal);

    transition: transform .3s ease, color .3s ease;
}

.redes a:hover {
    color: var(--cor-ativo);
    transform: translateY(-4px);
}

.rodape-copy p {
    font-size: 0.85rem;
    opacity: .8;
}


/* ==================================================
   RESPONSIVO – MOBILE
================================================== */
@media (max-width: 768px) {

    /* HEADER */
    .cabecalho {
        flex-direction: column;
        height: auto;
        width: calc(100% - 20px);
        padding: 10px;
    }

    .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .menu-sup {
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu-sup-item {
        margin: 5px 8px;
    }

    /* CONTEÚDO */
    .row {
        flex-direction: column;
        align-items: center;
    }

    .row > div, .row > .projeto{

        width: 100%;
        text-align: center;
    }

    .habilidades {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .habilidades > i {
        width: auto;
    }

    /* IMAGENS */
    .img-media {
        width: 220px;
        margin-top: 20px;
    }

    .img-auto {
        width: 100%;
        height: auto;
    }

    /* TEXTOS */
    .saudacao {
        font-size: 2.2rem;
    }

    .titulo {
        font-size: 2.2rem;
    }

    /* BOTÃO */
    .btn-principal {
        font-size: 1.2rem;
        padding: 10px 20px;
    }

    /* HABILIDADES */
   #habilidades > div {
      width: calc (100% - 20px);
      padding: 10px;
   }
   
    /* CONTATO */
    .form-contato button {
        align-self: stretch;
        text-align: center;
    }

    /* FOOTER */
    .rodape {
        height: auto;
        width: calc(100% - 20px);
        padding: 20px 10px;
        text-align: center;
    }
}
