* {
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
}

:root {
    background-color: #DDB5E8;
    height: 100%;
    font-size: 1rem;
}

html {
  scroll-behavior: smooth;
}

header {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    display: flex;
    padding: 2rem;
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    background-color: #cb6ce6;
    border-bottom: 0.1rem solid white;
}

header img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #fff;
    display: flex;
    grid-template-columns: repeat(1, 1fr);
}

header h1 {
    padding-top: 20px;
    font-size: 50px;
}

header p {
    padding-top: 20px;
}

/* mobile menu button (hidden on desktop) */
.mobile-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.25rem;
    position: absolute; /* positioned in header */
    top: 1rem;
    right: 1rem;
    z-index: 1300;
}

.mobile-menu div {
    width: 32px;
    height: 2px;
    background: #fff;
    margin: 8px;
}

/* bars inside the button */
.mobile-menu .bar {
    display: block;
    width: 28px;
    height: 3px;
    background: #fff;
    margin: 6px 0;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* animate hamburger -> X when .open */
.mobile-menu.open .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.mobile-menu.open .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu.open .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu:focus {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.nav-list {
    display: flex;
}

.nav-list li {
    list-style: none;
}

.nav-list a {
    display: flex;
    padding-top: 2rem;
    margin-left: 100px;
    margin-right: 100px;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all .55s ease;
}

.nav-list a:hover {
    border-bottom: 3px solid white;
    transition: all .55s ease;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

main {
    margin: 0px;
}

.about {
    display: flex;
    padding: 4rem;
    align-items: center;
    border-bottom: 0.1rem solid white;
    gap: 3rem;
}

.about img {
    border-radius: 100px;
    width: 470px;
    height: 470px;
}

.descricao { 
    align-items: center;
}

.descricao h2 {
    font-size: 40px;
}

.descricao p {
    padding-top: 10px;
    font-size: 1.1rem;
}

.skill {
    border-bottom: 0.1rem solid white;
    padding: 4rem;
    align-items: center;
}

.skill h2 {
    font-size: 40px;
    text-align: center;
}

.skill p {
    padding-top: 20px;
}

.skill div img{
    background-color: white;
    margin-top: 30px;
    padding: 30px;
    align-items: center;
}

.items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
    justify-content: center;
    gap: 1rem;
}

.items-box {
    margin-top: 30px;
    padding: 20px;
    width: 200px;
    display: flex;
    flex-direction: column; 
    text-align: center;
    border-radius: 0.5rem;
    border-bottom: 2px solid #4a00e0;
    box-shadow: 0 2px 7px rgb(14 55 54 / 100%);
}

.items-box h3 {
    margin: 0.7rem 0 0.4rem;
}

.portfolio {
    padding-top: 4rem;
    font-size: 26px;
    text-align: center;
}

.projetos {
    display: grid;
    margin: 0px;
    padding-right: 4rem;
    padding-left: 4rem;
    border-bottom: 2px solid white;
    padding-bottom: 4rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, auto));
    gap: 1rem;
}

.memory {
  text-decoration: none;
}

.memory img {
    padding: 0px;
    margin: 0px;
    width: 100%;
    height: 100%;
    gap: 3px;
    border-radius: 8px;
    object-fit: cover;
    animation: entering 0.7s ease-in-out;
    transition: transform 0.3s ease-in-out;
}

.memory:hover img {
    transform: scale(1.1);
}

.memory h3 {
    color: black;
    margin-top: 1.5rem;
    padding: 0.5rem;
    text-align: center;
}

.memory div {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.memory p {
  color: black;
  line-height: 28px;
}

aside {
    display: flex;
    margin: 5px;
    justify-content: center;
}

footer {
    background-color: #633bbc;
    display: flex;
    padding: 1rem;
    gap: 5rem;
    justify-content: center;
}

@media (max-width: 640px ) {

    header h1 {
        font-size: 35px;
    }

    header p {
        font-size: 15px;
    }

    .mobile-menu {
        display: block;
        /* fix to viewport top-right so header size doesn't affect placement */
        position: fixed;
        top: 12px;
        right: 12px;
        margin: 0;
        z-index: 1400;
    }

    .close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 100;
}

    .mobile-menu div {
        width: 32px;
        height: 2px;
        background: #fff;
        margin: 8px;
    }

    .nav {
        position: relative;
    }

    /* slide-in panel from left */
    .nav-list {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #cb6ce6; /* same as header */
        flex-direction: column;
        text-align: left;
        justify-content: flex-start;
        padding-top: 1rem;
        padding-left: 1rem;
        transform: translateX(-110%); /* hide left */
        transition: transform 0.28s ease-in-out;
        z-index: 1200;
        box-shadow: 4px 0 18px rgba(0,0,0,0.18);
        overflow-y: auto;
    }

    .nav-list a {
        padding: 1rem 0;
        color: white;
        font-size: 1.15rem;
        display: inline-block;
    }

    .nav-top {
        display: flex;
        justify-content: flex-end;
        padding: 0.5rem 0.5rem 0 0;
    }

    .close-btn {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
    }

    .close-btn:focus {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }

    /* backdrop overlay */
    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1100;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .nav-backdrop.visible {
        opacity: 1;
    }

    .nav-list.active {
        transform: translateX(0);
    }

    /* animate each link (fade + slide) */
    .nav-list a {
        opacity: 0;
        transform: translateX(20px);
    }

    .nav-list.active a {
        opacity: 1;
        transform: translateX(0);
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    .about {
        display: block;
        padding: 1.5rem;
        margin-top: 2rem;
        margin: 0.5rem;
        
    }

    .about img {
        margin-top: 1rem;
        border-radius: 50px;
        width: 300px;
        height: 300px;
        
    }

    .imgSobre {
        display: flex;
        justify-content: center;
    }

    .descricao h2 {
        padding-top: 20px;
        text-align: center;
    }

    .descricao p {
        padding-top: 20px;
        margin: 0px;
        font-size: small;
    }

    .skill {
        padding: 2rem;
        padding-top: 2rem;
    }

    .skill h2{
        text-align: center;
    }

    .items {
        grid-template-columns: repeat(auto-fit, minmax(150px, auto));
        gap: 1rem;
    }

    .items-box {
    margin-top: 30px;
    padding: 20px;
    width: 170px;
    display: flex;
    flex-direction: column; 
    text-align: center;
    border-radius: 0.5rem;
    border-bottom: 2px solid #4a00e0;
    box-shadow: 0 2px 7px rgb(14 55 54 / 100%);
    }

    .projetos {
        padding: 1.5rem;
        border-bottom: 2px solid white;
        padding-bottom: 4rem;
    }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    } 
    to {
        opacity: 1;
        transform: translateX(0);
    }
} 

