/* Root */
:root {
  /* Base */
  --background: rgb(250, 251, 251);
  --foreground: rgb(48, 52, 60);

  /* Primary / Accent */
  --primary: rgb(58, 138, 91);
  --primary-glow: rgb(110, 184, 130);

  /* Secondary / Muted */
  --secondary: rgb(241, 243, 244);
  --muted-foreground: rgb(110, 114, 122);

  /* UI Elements */
  --border: rgb(224, 227, 230);

  /* States */
  --destructive: rgb(204, 50, 38);

    --filtro-icones: brightness(0) saturate(100%) invert(44%) sepia(17%) saturate(1478%) hue-rotate(94deg) brightness(97%) contrast(83%);
    --img-color: brightness(0) saturate(100%) invert(18%) sepia(11%) saturate(574%) hue-rotate(182deg) brightness(94%) contrast(89%);

  --transicao-modo: background-color 0.3s ease, color 0.3s ease;

}

/* Gerais */

html{
    scroll-behavior: smooth;
}

html.dark-mode{
    --background: rgb(48, 52, 60);
    --foreground: rgb(250, 251, 251);
    --img-color: brightness(0) saturate(100%) invert(100%) sepia(3%) saturate(1215%) hue-rotate(170deg) brightness(101%) contrast(100%);
}

body{
    font-family: 'Inter', sans-serif;
    background: var(--background);
    padding: 0.8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--foreground);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(110, 184, 130, 0.45),
    rgba(110, 184, 130, 0.2) 30%,
    transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.destaque{
    color: var(--primary-glow);
}

/* Header */

header{
    width: 100%;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo{
    display: flex;
    gap: 0.8rem;
    align-items: center;

}

.circulo-logo{
    font-size: 1.5rem;
    color: var(--primary);
    filter: 
        drop-shadow(0 0 5px var(--primary-glow))
        drop-shadow(0 0 10px var(--primary-glow))
        drop-shadow(0 0 20px var(--primary-glow));

    animation: piscar 1s infinite;
    
}

.logo-texto{
    font-weight: 700;
}

.logo-texto span{
    color: white;
    opacity: 0.5;
    animation: revelar 0.4s forwards;
}

.logo-texto span:nth-child(1){ animation-delay: 0s; }
.logo-texto span:nth-child(2){ animation-delay: 0.15s; }
.logo-texto span:nth-child(3){ animation-delay: 0.30s; }
.logo-texto span:nth-child(4){ animation-delay: 0.45s; }
.logo-texto span:nth-child(5){ animation-delay: 0.60s; }
.logo-texto span:nth-child(6){ animation-delay: 0.75s; }
.logo-texto span:nth-child(7){ animation-delay: 0.90s; }
.logo-texto span:nth-child(8){ animation-delay: 1.05s; }
.logo-texto span:nth-child(9){ animation-delay: 1.20s; }
.logo-texto span:nth-child(10){ animation-delay: 1.35s; }
.logo-texto span:nth-child(11){ animation-delay: 1.50s; }

.destaque,
.destaque-3{
    color: var(--primary) !important;
}

.destaque-3{
    animation:
        revelar3 0.4s forwards,
        blink3 0.25s 1.7s 3;
}

.menu-lista ul{
    display: flex;
    gap: 1rem;
    font-weight: 300;
    font-size: 0.9rem;
}

.menu-lista ul a{
    transition: ease-in 0.2s;
}
.menu-lista ul a:hover{
    color: var(--primary-glow);
}

.botao-modo img{
    width: 2rem;
    transition: ease-in-out 0.2s;
}

.botao-modo img:hover,
.projetos-card a:hover img,
.contato-container img:hover{
    cursor:pointer;
    filter: var(--filtro-icones) !important;
    opacity: 1;
}

.botao-modo img,
.projetos-links a img, 
.contato-container img,
.formacao-container img,
.hero-box img,
.menu-toggle img{
    filter: var(--img-color);
    transition: filter 0.3s ease-in-out, transform 0.3s ease-in-out;
    
}

#menu-check, 
.checkbox,
.menu-toggle{
    display: none;
}


/* Hero */

#hero{
    width: 100%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content:space-around;
    margin-bottom: 7rem;

}

.hero-box{
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--primary);
    border-radius: 2rem;
    padding: 0.2rem 1rem;
    color: var(--primary-glow);
}

.hero-box img{
    width: 2rem;
    filter: brightness(0) saturate(100%) invert(44%) sepia(17%) saturate(1478%) hue-rotate(94deg) brightness(97%) contrast(83%);
}

#hero h1{
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900 ;
    line-height: 1.1;
}

.cta{
    display: flex;
    gap: 1.5rem;
    
}
.cta a{
    display: flex;
    gap: .8rem;
    justify-content: center;
    border: 1px solid var(--primary-glow);
    padding: 0.8rem 1.5rem;
    border-radius: 1rem;
    font-weight: 400;
    color: var(--secondary);
    transition: 
        color 250ms ease,
        box-shadow 250ms ease,
        transform 200ms ease;
    position: relative;
    overflow: hidden;
}

.cta a::before{
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary-glow);
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.5s ease;
    border-radius: inherit;
    z-index: -1;
}

.cta a:hover::before{
    transform: scale(1.5);
}

.cta a:nth-child(1){
    background-color: var(--primary-glow);
}

.cta a:nth-child(2){
    color: var(--primary-glow);
}

.cta img{
    width: 1.5rem;
    transform: rotate(270deg);
    filter: brightness(0) invert(1);
}

.cta a:hover{
    box-shadow:
        0 0 10px var(--primary-glow),
        0 0 20px var(--primary-glow),
        0 0 40px var(--primary-glow);
        color: var(--secondary);

}

/* Sobre */
#sobre{
    width: 100%;
    min-height: 50vh;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    
}

.titulo{
   margin-bottom: 1rem;
}

.titulo h2{
    font-size: 2.5em;
}

.titulo p{
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-weight: 300;
    font-size: 0.9rem;
}

.sobre-descricao{
    width: 100%;
}

.sobre-descricao p,
.sobre-stack ul{
    padding: 0 3.5rem;
    text-align: justify;
    margin: 1rem 0;
}

.sobre-stack ul{
    display: flex;
    gap: 2rem;   
}

.sobre-stack ul li{
    padding: .6rem 1rem;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(58, 138, 91, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 999px;
    color: var(--primary);
    font-size: .9rem;
    font-weight: 500;
    box-shadow:
        0 4px 20px rgba(58, 138, 91, 0.08),
        inset 0 1px 1px rgba(255,255,255,0.35);
    transition:
        transform .3s ease,
        border-color .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}

.sobre-stack ul li:hover{
    transform: translateY(-2px);
    background: rgba(110, 184, 130, 0.12);
    border-color: rgba(110, 184, 130, 0.4);
    box-shadow:
        0 8px 30px rgba(110, 184, 130, 0.18),
        0 0 20px rgba(110, 184, 130, 0.12);
}


/* Projetos */
.projetos-container{
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.projetos-card{
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    backdrop-filter: blur(14px);
    transition:
        transform .45s ease,
        border-color .45s ease,
        box-shadow .45s ease,
        background .45s ease;

}

.projetos-card::before{
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top right,
            rgba(110, 184, 130, 0.18),
            transparent 45%
        );
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.projetos-card:hover{
    transform:
        translateY(-8px)
        rotateX(2deg)
        rotateY(-2deg);
    border-color: rgba(110, 184, 130, 0.25);
    box-shadow:0 20px 40px rgba(0,0,0,.08), 0 0 30px rgba(110,184,130,.08);
}

.projetos-card:hover::before{
    opacity: 1;
}

.projetos-card img{
    width: 100%;
    max-width: 15rem;
    border-radius: 1rem;
      transition:
        transform .6s ease,
        filter .6s ease;
}

.projetos-card:hover img{
    transform: scale(1.04);
    filter: saturate(2);
}

.projeto-detalhes{
    display: flex;
    flex-direction: column;
}

.projeto-detalhes h3{
    font-weight: 800;
}

.projeto-detalhes p{
    font-weight: 300;
}

.projeto-stack ul{
    display: flex;
    gap: 0.8rem;
    font-weight: 300;
    color: var(--primary);
    margin-top: 1rem;
     transition:
        transform .3s ease,
        background .3s ease;

}

.projetos-card:hover .projeto-stack li{
    transform: translateY(-2px);
}

.projetos-links{
    display: flex;
}

.projetos-card:hover .projetos-links a{
    opacity: 1;
    transform: translateY(-2px);
}

.projetos-card .projetos-links{
    align-self: center;
    margin-left: auto;

}

.projetos-card a img{
    width: 2.8rem;
    margin-right: 1rem;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 1s ease, opacity 1s ease;;
}

html.dark-mode .projetos-card a img{
    filter: brightness(0) invert(1);
}

.projetos-links a:nth-child(2) img{
    transform: rotate(225deg);
}

/* Formação */
#formacao{
    margin-top: 2rem;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.formacao-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
} 

.formacao-cards{
    border: 1px solid var(--muted-foreground);
    border-radius: 1rem;
    padding: 1rem;
    flex: 1;
    transition: ease-in-out 0.2s;
    position: relative;
    width: 100%;
    padding: 2rem;
    border-radius: 2rem;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(58,138,91,.08);
    backdrop-filter: blur(14px);
    overflow: hidden;
    transition:
        transform .45s ease,
        border-color .45s ease,
        box-shadow .45s ease,
        background .45s ease,
        
}

.formacao-cards:hover{
    color: var(--primary);
    border: 1px solid var(--primary);
    transform:scale(1.1);
}

.formacao-cards:hover img{
    filter: var(--filtro-icones);
    transform:
        translateY(-4px)
        scale(1.08);
}

.formacao-cards::before{
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary-glow),
        transparent
    );
    transition: width .5s ease;
}

.formacao-cards::after{
    content: "";
    position: absolute;
    inset: 0;

    background: radial-gradient(
            circle at top,
            rgba(110,184,130,.15),
            transparent 60%
        );

    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
}

.formacao-cards:hover{
    transform:
        translateY(-8px)
        scale(1.01);
    border-color: rgba(110,184,130,.2);
    background: rgba(255,255,255,0.72);
    box-shadow:
        0 15px 40px rgba(0,0,0,.06),
        0 0 25px rgba(110,184,130,.08);
}

.formacao-cards:hover::before{
    width: 80%;
}

.formacao-cards:hover::after{
    opacity: 1;
}
.formacao-cards h3{
       transition:
        color .3s ease,
        transform .3s ease;
}

.formacao-cards:hover h3{
    color: var(--primary);

    transform: translateY(-2px);
}

.formacao-cards p{
    font-weight: 200;

    transition: color .3s ease;
}


#formacao img{
    width: 2rem;
     transition:
        transform .5s ease,
        filter .5s ease;
}


/* Contato */
#contato{
    display: flex;
    height: 20rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 2rem;
}

.contato-container{
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.contato-container a{
    position: relative;

    width: 60px;
    height: 60px;

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

    border: 1px solid var(--primary-glow);
    border-radius: 16px;

    overflow: hidden;

    transition: all .3s ease;
}

.contato-container a::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: 0;
    height: 0;

    background: var(--primary-glow);

    border-radius: 50%;

    transform: translate(-50%, -50%);

    transition: width .5s ease, height .5s ease;

    z-index: 1;
}

.contato-container a:hover::before {
    width: 150px;
    height: 150px;
}

.contato-container a:hover {
    transform: translateY(-5px);

    box-shadow:
        0 0 10px var(--primary-glow),
        0 0 20px var(--primary-glow),
        0 0 40px var(--primary-glow);
}

.contato-container a:hover img {
    transform: scale(1.15);
}

.contato-container img{
     width: 28px;
    height: 28px;

    position: relative;
    z-index: 2;

    transition: transform .3s ease;
}

footer{
    height: 10rem;
    display: flex;
    align-items: end;
    color: var(--primary);
    justify-content: center;
}


@media (min-width: 768px) {
  /* No computador, aumentamos o espaçamento lateral */
  body {
    padding: 1.5rem 4rem;
  }

  /* O Hero ganha um pouco mais de respiro */
  #hero {
    height: 75vh;
    justify-content: center;
    gap: 3rem;
  }

  /* O Sobre volta a ficar lado a lado */
  #sobre {
    flex-direction: row;
    justify-content: space-between;
  }
  .sobre-descricao {
    flex: 0 0 50%;
  }

  /* Os projetos voltam a ficar lado a lado (imagem na esquerda, textos na direita) */
  .projetos-card {
    flex-direction: row;
    align-items: center;
  }
}

/* Media Query */
@media screen and (max-width: 1000px) {

    body{
        padding: .5rem;
    }

    header{
        justify-content: center;
    }

    nav {
        display: flex;
        align-items: center;
        position: relative; 
        padding: 10px 20px;
    }

    .menu-toggle{
        display: block;
        margin-left: auto;
    }
  
    .menu-toggle img{
        width: 2rem;
        cursor: pointer;
    }

    .botao-modo{
        display: none;
    }

    .menu-lista{
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        height: 80vh;
        margin: 0;
        padding: 1rem;
        z-index: 10;
        background: rgba(255, 255, 255, 0.35);
        border: 1px solid rgba(58, 138, 91, 0.18);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 2rem;

        box-shadow:
            0 4px 20px rgba(58, 138, 91, 0.08),
            inset 0 1px 1px rgba(255,255,255,0.35);
       
    }

    .menu-lista ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items:end;
    }

    .menu-lista li a {
        display: block;
        padding: 15px;
         color: var(--primary);
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 700;
    }

    .checkbox:checked ~ .menu-lista {
        display: block;
        
    }
    
    .checkbox:checked ~.menu-toggle img{
        filter: brightness(0) saturate(100%) invert(44%) sepia(17%) saturate(1478%) hue-rotate(94deg) brightness(97%) contrast(83%);
    }

    .cta{
        flex-direction: column;
    }

    #sobre{
        flex-direction: column;
    }

    .titulo{
        margin: 0;
        text-align: center;
    }

    .sobre-stack ul{
       flex-direction: column;
       gap: 0.2rem;
    }

    .projetos-card{
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 2rem;
    }

    .projeto-stack ul{
        justify-content: center;
    }
}

@media screen and (max-width: 1000px) {
    .formacao-container{
        display: flex;
        flex-direction: column;
    }

    .formacao-cards{
        text-align: center;
    }

    .formacao-cards img{
        display: none;
    }
}

/* Animações */

@keyframes piscar{
    0%, 100%{
        opacity: 1;
    }

    50%{
        opacity: 0.3;
    }
}

@keyframes revelar{
    to{
        opacity: 1;
        color: var(--muted-foreground);
    }
}

@keyframes revelar3{
    from{
        opacity: 0.5;
    }

    to{
        opacity: 1;
        color: var(--primary);
    }
}

@keyframes blink3{
    0%, 100%{
        opacity: 1;
    }

    50%{
        opacity: 0;
    }
}