@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --header-height: 3rem;
    --font-medium: 500;

    --first-color: #5361ff;
    --white-color: #fafaff;
    --dark-color: #2a3b47;
    --text-color: #697477;

    --body-font: 'Montserrat', sans-serif;
    --big-font-size: 6.25rem;
    --h2-font-size: 1.25rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;

    --mb1: .5rem;
    --mb2: 1rem;
    --mb3: 1.5rem;
    --mb4: 2rem;

    --z-fixed: 100;
}

@media screen and (min-width: 768px) {
    :root {
        --big-font-size: 10.5rem;
        --h2-font-size: 2rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { text-decoration: none; color: var(--text-color); }
img { max-width: 100%; height: auto; display: block; }

.section { padding: 3rem 0; }

.section-title {
    position: relative;
    font-size: var(--h2-font-size);
    color: var(--dark-color);
    margin: var(--mb4) 0;
    text-align: center;
}

    .section-title::after {
        position: absolute;
        content: '';
        width: 32px;
        height: 0.18rem;
        left: 0;
        right: 0;
        margin: auto;
        top: 2rem;
        background-color: var(--first-color);
    }

.bd-grid {
    max-width: 1024px;
    display: grid;
    grid-template-columns: 100%;
    grid-column-gap: 2rem;
    width: calc(100% - 2rem);
    margin-left: var(--mb2);
    margin-right: var(--mb2);
}

/*HEADER*/

.l-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--first-color);
}



.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item { margin-bottom: var(--mb4); }
.nav-link { position: relative; color: var(--dark-color); }
    .nav-link:hover { color: var(--first-color); }
.nav-logo { color: var(--white-color); }
.nav-toggle { color: var(--white-color); font-size: 1.5rem; cursor: pointer; }

.active::after {
    position: absolute;
    content: '';
    width: 100%;
    height: 0.18rem;
    left: 0;
    top: 2rem;
    background-color: var(--first-color);
}

@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 80%;
        height: 100%;
        padding: 2rem;
        background-color: rgba(255, 255, 255, .3);
        transition: .5s;
        backdrop-filter: blur(10px);
    }

    .show { right: 0; }
}

/*HOME*/

.home { position: relative; background-color: var(--first-color); overflow: hidden; }
.home-container { height: calc(100vh - var(--header-height)); row-gap: 5rem; }
.home-title { 
    align-self: flex-end; 
    font-size: var(--big-font-size); 
    color: var(--white-color);
    line-height: 0.8;
}
    .home-title span { text-shadow: 0 20px 25px rgba(0, 0, 0, .5); }

.home-scroll { align-self: flex-end; padding-bottom: var(--mb4); }
.home-scroll-link { writing-mode: vertical-lr; transform: rotate(-180deg); color: var(--white-color); }

.home-img {
    position: absolute;
    right: 100px;
    bottom: 100px; /* Move mais para baixo */
    width: 295px;
    overflow: hidden;
}

/*ABOUT*/

.about-container { justify-items: center; row-gap: 2rem; text-align: center; }

.about-img {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    width: 120px;
    height: 120px;
    background-color: var(--first-color);
    border-radius: 50%;
    overflow: hidden;
}

    .about-img img { width: 100px; }

.about-subtitle { font-size: var(--h2-font-size); color: var(--first-color); margin-bottom: var(--mb1); }
.about-text { margin-bottom: var(--mb4); }
.about-profession { display: block; margin-bottom: var(--mb4); }
.about-social-icon { font-size: 1.4rem; margin: 0 var(--mb1); }
    .about-social-icon:hover { color: var(--first-color); }

/*SKILLS*/

.skills-container { row-gap: 2rem; }
.skills-subtitle { color: var(--first-color); margin-bottom: var(--mb3); }

.skills-name {
    display: inline-block;
    font-size: var(--small-font-size);
    margin-right: var(--mb2);
    margin-bottom: var(--mb3);
    border-radius: .25rem;
    transition: .5s;
}

    .skills-name:hover { background-color: var(--first-color); color: var(--white-color); }

.skills-img img { border-radius: .5rem; }

/*Certificados*/

.certifications-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.certifications-container {
    display: flex;
    gap: 10px;
    width: max-content;
    
    /* Cria a animação infinita */
    animation: scrollInfinite 15s linear infinite;
}

/* Ajuste de tamanho das imagens */
.certifications-img {
    flex: 0 0 auto;
    width: 250px;
}

.certifications-img img {
    width: 100%;
    border-radius: .5rem;
}

/* Animação contínua sem recomeçar visivelmente */
@keyframes scrollInfinite {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/*CONTACT*/

/* Seção de contato */
.contact {
    padding: 50px;
    max-width: 900px;
    margin: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 24px;
    color: #333;
}

/* Container flexível para dividir os lados */
.contact-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Lado esquerdo: Informações */
.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-subtitle {
    font-size: 18px;
    font-weight: bold;
    color: #0077B5;
    margin-top: 15px;
}

.contact-text {
    display: block;
    font-size: 16px;
    color: #333;
}

/* Lado direito: Formulário */
.contact-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-input {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* Botão de enviar */
.contact-button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #0077B5;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
}

.contact-button:hover {
    background-color: #005f8e;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Modal Content */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: white;
}

/* Ativação da animação */
.modal-show {
    opacity: 1;
    visibility: visible;
}

.modal-zoom {
    transform: scale(1);
}

/*MEDIA QUERIES*/

@media screen and (min-width: 768px) {
    body { margin: 0; }
    .section { padding-top: 4rem; }
    .section-title { margin-bottom: 3rem; }
    .section-title::after { width: 64px; top: 3rem; }

    .nav { height: calc(var(--header-height) + 1rem); }
    .nav-list { display: flex; }
    .nav-item { margin-left: var(--mb4); margin-bottom: 0; }
    .nav-toggle { display: none; }
    .nav-link { color: var(--white-color); }
        .nav-link:hover { color: var(--white-color); }
    .active::after { background-color: var(--white-color); }

    .home-container { height: 100vh; grid-template-rows: 1.7fr 1fr; row-gap: 0; }
    .home-img { width: 524px; right: 10%; }

    .about-container { grid-template-columns: repeat(2, 1fr); align-items: center; text-align: initial; padding: 4rem 0; }
    .about-img { width: 200px; height: 200px; }
        .about-img img { width: 165px; }

    .skills-container { grid-template-columns: repeat(2, 1fr); align-items: center; }

    .portfolio-container { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); column-gap: 2rem; }

    .contact-container { grid-template-columns: repeat(2, 1fr); justify-items: center; }
    .contact-form { width: 380px; }

    .footer-container { grid-template-columns: repeat(3, 1fr); justify-items: center; } 

} 

@media screen and (min-width: 1024px) {
    .bd-grid { margin-left: auto; margin-right: auto; }
}