/* ===============================
   RESET + CONFIGURAÇÕES GLOBAIS
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');

:root {
    --primary-red: #e63946;
    --dark-red: #a80000;
    --bg-hero: #0f0000;
    --text-white: #ffffff;
    --text-black: #000000;
    --neon: black --text-body: #333333;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
   BASE
================================ */
body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    letter-spacing: 0.3px;
    overflow-x: hidden;
}

h1,
h2,
.titulo3 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--text-black);
}

h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

p {
    color: var(--text-black);
    font-size: 16px;
}

a {
    font-family: 'Merriweather', serif;
    color: #a80000;
    font-weight: 600;
    position: relative;
    text-decoration: none;
}

a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: var(--text-black);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* ===============================
   HEADER
================================ */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.hamburger {
    display: none;
}

.links {
    display: flex;
    gap: 40px;
}

.links a {
    color: var(--text-black);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.links a:hover {
    color: var(--primary-red);
}

.links a:active {
    opacity: 0.6;
}

.contact {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.contact:hover {
    background: var(--primary-red);
    color: white;
}

/* ===============================
   TOPO
================================ */

.topo {
    position: fixed;
    width: 90px;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 2;
}

.topo:hover {
    width: 95px;
}

.topo:active {
    width: 85px;
    opacity: 0.8;
}

/* ===============================
   SEÇÃO PERFIL
================================ */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 8% 60px;
    min-height: 80vh;
    background: radial-gradient(circle at top left, #2b0000, var(--bg-hero));
    color: white;
    gap: 40px;
}

.hero .projeto {
    background: var(--dark-red);
    color: #fff;
    border: none;
    width: 100px;
    height: 40px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero .projeto:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.hero .projeto:active {
    transform: translateY(2px);
    opacity: 0.8;
}

.hero .git {
    background-color: white;
    color: black;
    border: none;
    width: 100px;
    height: 40px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero .git:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.hero .git:active {
    transform: translateY(2px);
    opacity: 0.8;
}

.subtitle {
    color: var(--primary-red);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-text h1 {
    color: white;
    font-size: 52px;
    line-height: 1.2;
    margin: 20px 0;
}

.hero-text p {
    color: #cbd5e1;
    font-size: 16px;
    margin-top: 20px;
}

.gradient {
    background: linear-gradient(90deg, #ff4d4d, #a80000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-image img {
    width: 320px;
    border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(255, 0, 0, 0.4);
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* ===============================
   SOBRE MIM
================================ */

.section-sobre-mim {
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: center;
    margin-top: 20px;
}

.sobre-mim p {
    text-align: left;
}

.sobre-mim h4 {
    display: flex;
    align-items: center;
    justify-content: left;
    animation: fadeUp 0.8s ease both;
    color: var(--primary-red);
}

.sobre-mim h2 {
    display: flex;
    align-items: center;
    justify-content: left;
    animation: fadeUp 0.8s ease both;
    color: black;
}

.titulo4 {
    display: flex;
    align-items: left;
    justify-content: center;
    animation: fadeUp 0.8s ease both;
    color: #333333;
}

.sobre-mim img {
    width: 400px;
    height: auto;
    margin-top: 60px;
}

.sobre-mim {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: center;
    padding: 40px;
    gap: 40px;
    margin: 80px;
    animation: fadeUp 0.8s ease both;
}

/* ===============================
   PROJETOS (CARDS)
================================ */

.title-projects {
    max-width: 1200px;
    margin: 20px auto 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title-text span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary-red);
}

.title-text h1 {
    font-size: 48px;
    font-weight: 700;
    margin-top: 8px;
    color: #111111;
}

.projects-github {
    background-color: var(--dark-red);
    color: #fff;
    border: none;
    padding: 14px 26px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.projects-github:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.projects-github:active {
    transform: translateY(2px);
    opacity: 0.8;
}

.projetos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.projetos>div {
    background: #fff;
    border-radius: 18px;
    border: 0.1px solid black;
    padding: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projetos>div:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.2);
}

.projetos img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
}

.projeto .tech {
    font-weight: bolder;
}

/* ===============================
   HABILIDADES
================================ */
.skills {
    margin-top: 100px;
    text-align: center;
    padding: 80px 20px;
}

.skills h2 {
    font-size: 42px;
    margin-bottom: 60px;
}

.subtitle {
    color: var(--primary-red);
    font-weight: 600;
    letter-spacing: 2px;
}

.stack-icons {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.stack-icons div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stack-icons i {
    font-size: 64px;
    transition: transform 0.3s ease;
}

.stack-icons .tecnologias:hover {
    transform: scale(1.1);
}

.stack-icons span {
    margin-top: 12px;
    font-size: 16px;
    color: #000;
}

.stack-icons i {
    font-size: 64px;
    color: initial;
}

/* ===============================
   CERTIFICADOS
================================ */

.titulo3 {
    display: flex;
    justify-content: center;
    text-align: center;
    margin: 5rem 0;
    color: #333333;
}

.certificados {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px;
    margin-bottom: 10vh;
}

.certificados img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.certificados img:hover {
    transform: scale(1.05);
}

/* ===============================
   FOOTER
================================ */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #350000;
    padding: 60px 20px;
    gap: 40px;
    color: white;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
}

footer h3 {
    font-family: 'Merriweather', sans-serif;
    color: white;
}

footer p {
    margin-top: 3%;
    font-size: 14px;
    color: #888;
    padding: 20px;
    text-align: center;
}

.contact-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    gap: 15px;
    transition: transform 0.3s ease;
}

footer img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.contact-item a:hover {
    color: var(--primary-red);
    transform: translateY(-5px);
}

.contact-item a:active {
    transform: translateY(2px);
    opacity: 0.8;
}

footer h3 {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

@media (max-width: 1024px) {
    .sobre-mim {
        flex-direction: column;
        padding: 60px;
        margin: 5% 0 30% 0;
        gap: 0;
    }

    .sobre-mim img {
        display: none;
    }

    .hero {
        flex-direction: column-reverse;
        padding: 100px 10px 40px;
        text-align: center;
    }

    .hero img {
        margin-top: 10%;
        margin-bottom: 15%;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .subtitle {
        margin-top: 0;
    }

    .certificados img {
        max-width: 400px;
    }

    .topo {
        width: 45px;
    }

    .topo:hover {
        width: 50px;
    }

    .topo:active {
        width: 40px;
        opacity: 0.8;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1100;
        margin-left: 0;
    }

    .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--primary-red);
        transition: 0.3s;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #000000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .links {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 30px;
    }

    .nav-menu .links a {
        color: whitesmoke;
        font-size: 1.2rem;
    }

    .nav-menu .links a:hover {
        color: var(--primary-red);
    }

    .nav-menu .links a::after {
        background-color: var(--text-white);
    }

    .nav-container .links a:active {
        opacity: 0.6;
    }

    .nav-container {
        justify-content: flex-start;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 5px;
        width: 100%;
    }
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 828px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .hero {
        flex-direction: column-reverse;
        padding: 180px 40px;
        text-align: center;
        gap: 20px;
    }

    .hero-text h1 {
        font-size: 28px;
        line-height: 1.1;
        width: 100%;
    }

    .hero-image img {
        width: 250px;
        margin-bottom: 20px;
    }

    .subtitle {
        margin-top: 0;
        font-size: 12px;
    }

    .contact {
        padding: 8px 12px;
        font-size: 12px;
    }

    .hero .projeto {
        width: 80px;
        height: 20px;
        font-size: 10px;
        min-height: 30px;
    }

    .hero .git {
        width: 80px;
        height: 20px;
        font-size: 10px;
        min-height: 30px;
    }

    .contact-links {
        margin-top: 10px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 15px;
        padding: 50px;
        width: 100%;
    }

    .contact-item img {
        width: 35px;
        height: 35px;
    }

    .contact-item span {
        font-size: 10px;
    }
}

@media (max-width:510px) {
    .contact-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        justify-items: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .titulo4 {
        display: flex;
        align-items: left;
    }

    .sobre-mim {
        display: flex;
        flex-wrap: wrap;
        padding: 20px;
    }
}

@media (max-width: 410px) {
    .hero img {
        width: 250px;
    }
}