/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

/* Variaveis */
:root {
    --bg-color: #111111;
    --second-bg-color: #151515;
    --text-color: white;
    --main-color: rgba(155, 11, 155, 0.795);
}

html {
    font-size: 62.5%;
    overflow-x: hidden; /* Ocultando a barra de rolagem */
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3rem 9%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 3rem;
    color: var(--text-color);
    font: 800;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.logo:hover{
    transform: scale(1.1);
}

.navbar a{
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease-in-out;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

/* home */
section {
    min-height: 100vh;
    padding: 10rem 9% 10rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}

.home-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    margin-top: 3rem;
}

span {
    color: var(--main-color);
}

.logo span {
    color: var(--main-color);
}

.home-content h3 {
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3.5rem;
}

.home-content h1 {
    font-size: 7rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
}

.home-img {
    border-radius: 50%;
}

.home-img img {
    position: relative;
    top: 3rem;
    width: 22vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

.home-img img:hover {
    box-shadow: 0 0 50px var(--main-color),
                0 0 100px var(--main-color);
}

.home-content p {
    font-size: 1.6rem;
    font-weight: 500;
    max-width: 1000px;
}

.social a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    font-size: 2.5rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}

.social a:hover {
    color: var(--text-color);
    transform: scale(1.3)translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--text-color);
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-color);
}

.text-animation {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.text-animation span {
    position: relative;
}

.text-animation span::before {
    content: 'Python';
    color: var(--main-color);
    animation: words 20s infinite;
}

.text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
    to {
        border-left: 2px solid var(--main-color);
    }
}

@keyframes words{
    0%,
    20%{
        content: 'Python';
    }
    21%,
    40%{
        content: 'Django';
    }
    41%,
    60%{
        content: 'C/C++';
    }
    61%,
    80%{
        content: 'Advpl/TL++';
    }
    81%,
    100%{
        content: 'Html/Css/Js';
    }
}

@keyframes typing { 
    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90%,
    95% {
        width: 0;
    }

    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85% {
        width: calc(100% + 8px);
    }
}

/* sobre */
.sobre {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10rem;
    background: var(--second-bg-color);
    color: var(--main-color);
}

.sobre h2 span {
    color: var(--main-color);
    text-shadow: 0 0 50px var(--main-color);
}

.sobre-img {
    border-radius: 50%;
}

.sobre-img img {
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    top: 1rem;
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

.sobre-img img:hover {
    box-shadow: 0 0 50px var(--main-color),
                0 0 100px var(--main-color);
}

.heading {
    text-align: center;
    font-size: 8rem;
}

.sobre-content h2 {
    text-align: left;
    line-height: 1.5;
}

.sobre-content h3 {
    font-size: 2.6rem;
}

.sobre-content p {
    font-size: 2rem;
    margin: 2rem 0 3rem;
}

.sobre-content p span {
    color: var(--main-color);
    text-shadow: 0 0 2px var(--main-color);
    font-weight: bold;
}

.sobre-content .text-animation span::before {
    content: 'Python';
    color: var(--main-color);
    animation: words 20s infinite;
}

.sobre-content .text-animation span::after {
    content: "";
    background-color: var(--second-bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--second-bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

/* barra de rolagem */
::-webkit-scrollbar {
    width: 15px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-color);
}

::-webkit-scrollbar-track {
    background-color: var(--bg-color);
    width: 50px;
}

/* Projetos */
.projetos {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.projetos h2 {
    margin-bottom: 5rem;
    color: var(--text-color);
}

.projetos-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
}

.projetos-box {
    background-color: var(--main-color);
    color: black;
    height: 250px;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.projetos-box:hover {
    background: var(--text-color);
    color: var(--main-color);
    transform: scale(1.03);
}

.projetos-box .projetos-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    max-height: 200px;
    justify-content: center;
    align-items: baseline;
    padding: 5em;
}

.projetos-info h4 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid black;
    width: 100%;
}

.projetos-info p {
    font-size: 2rem;
    font-weight: 400;
    max-height: 100px;
    margin: auto;
}

/* Contato */
.contato {
    background-color: var(--second-bg-color);
}

.contato h2 {
    margin-bottom: 3rem;
    color: var(--text-color);
}

.contato span {
    color: var(--main-color);
    text-shadow: 0 0 50px var(--main-color);
}

.contato form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contato form .input-box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contato form .input-box input,
.contato form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border-radius: 0.8rem;
    border: 2px solid var(--main-color);
    margin: 1rem 0;
    resize: none;
}

.contato form btn {
    margin-top: 2rem;
}

/* Footer */
.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
    background-color: var(--bg-color);
}

.footer .social {
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
}

.footer .social a {
    font-size: 25px;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 42px;
    height: 42px;
    line-height: 42px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s ease-in-out;
}

.footer .social a:hover {
    transform: scale(1.2)translateY(-10px);
    background-color: var(--main-color);
    color: var(--text-color);
    box-shadow: 0 0 25px var(--main-color);
}

.footer ul {
    margin-top: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.footer ul li a {
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}

.footer ul li a:hover {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

.footer ul li {
    display: inline-block;
    padding: 0 15px;
}

.footer .copyright {
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: var(--text-color);
}

/* Loader */

.div-loader {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: transparent;
    border: 3px solid #3c3c3c;
    border-radius: 50%;
    text-align: center;
    line-height: 150px;
    font-family: sans-serif;
    font-size: 20px;
    color: rgba(155, 11, 155, 0.795);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(155, 11, 155, 0.795);
    box-shadow: 0 0 20px rgba(0, 0, 0, .5);
}

.ring:before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid rgba(155, 11, 155, 0.795);
    border-right: 3px solid rgba(155, 11, 155, 0.795);
    border-radius: 50%;
    animation: animateC 2s linear infinite;
}

.span-loader {
    display: block;
    position: absolute;
    top: calc(50% - 2px);
    left: 50%;
    width: 50%;
    height: 4px;
    background: transparent;
    transform-origin: left;
    animation: animate 2s linear infinite;
}

.span-loader:before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(155, 11, 155, 0.795);
    top: -6px;
    right: -8px;
    box-shadow: 0 0 20px rgba(155, 11, 155, 0.795);
}

@keyframes animateC {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate {
    0% {
        transform: rotate(45deg);
    }

    100% {
        transform: rotate(405deg);
    }
}

/* Responsividade */
@media(max-width:1285px) {
    html {
        font-size: 55%;
    }
    .projetos-container {
        padding-bottom: 7rem;
        grid-template-columns: repeat(2, 1fr);
        margin: 0 5rem;
    }
}

@media(max-width:991px) {
    header {
        padding: 2rem 3%;
    }
    section {
        padding: 10rem 3% 2rem;
    }
    .projetos {
        padding-bottom: 7rem;
    }
    .footer {
        padding: 2rem 3%;
    }
}

@media(max-width:895px) {
    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3%;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px);
        border-bottom-left-radius: 2rem;
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        display: none;
    }
    .navbar.active {
        display: block;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }
    .home {
        flex-direction: column;
        margin: 5rem 4rem;
    }
    .home-content h3{
        font-size: 2.6rem;
    }
    .home-content h1 {
        font-size: 8rem;
        margin-top: 3rem;
    }
    .home-content p {
        max-width: 600px;
        margin: 0 auto;
    }
    .home-img img {
        width: 56vw;
        margin-top: -2rem;
    }
    .sobre {
        flex-direction: column-reverse;
    }
    .sobre-content {
        margin: 0 2rem 4rem;
    }
    .about img {
        width: 52vw;
        margin-top: 1rem;
        margin-bottom: 3rem;
    }
    .projetos h2 {
        margin-bottom: 3rem;
    }
    .projetos-container {
        grid-template-columns: repeat(1, 1fr);
    }
}