/* ----- MAIN PAGE STYLES ----- */

/* ----- HEADER ----- */

.header {
    z-index: 20;
}

.header__button {
    display: none;
}

.header__title {
    color: var(--text-color);
    margin: 0;
    padding: 0;
    text-align: left;
}

.header__title h2, .header__title h4 {
    padding: 0;
    margin: 0;
    text-wrap: nowrap;
    overflow: hidden;
}

.header__title h2 {
    animation: header-h2-appear 1s;
}

.header__title h4 {
    font-weight: 200;
    position: relative;
    overflow: hidden;
}

.header__title h4::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--box-color);
    animation: header-h4-appear 1s both;
}


/* ANIMATIONS */

@keyframes header-h2-appear {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}
@keyframes header-h4-appear {
    0% {
        left: 0;
    }
    100% {
        left: -100%;
    }
}

/* ----- MAIN-WRAPPER ----- */


.main-wrapper {
    height: 100%;
    overflow: auto;
    align-items: center;
    flex-direction: column;
}


/* ----- MENU ----- */

.side-menu {
    background-color: #efe;
    width: 48px;
    height: calc(100dvh - 70px);
    padding: 0;
    box-sizing: border-box;
    transition: width 0.6s;
    display: none;
    flex-direction: column;
}

.menu__list {
    list-style: none;
    display: flex;
    flex-direction: inherit;
    padding: 0;
    margin: 0;
    padding-top: 20px;
    justify-content: start;
    align-items: right;
    box-sizing: border-box;
    height: 100%;
}

.list__item {
    user-select: none;
    border-radius: 15px 0 0 15px;
    padding: 0px;
    margin: 0;
    display: flex;
    justify-content: start;
    align-items: center;
    position: relative;
    text-align: left;
    z-index: 10;
    margin: 10px 0 10px 3px;
    box-sizing: border-box;
    border-top: 3px solid transparent;
}

.list__item:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
    border-top: 3px solid var(--text-color)
    
}

.list__item:hover::after {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    background-color: transparent;
    right: 0;
    z-index: -1;
}


.list__item span{
    margin-right: 11px;
    margin-left: 0;
    padding: 0;
}

.item--menu label{
    width: 100%;
    text-align: center;
    padding: 7px 0;
}

/* ----- SETTINGS -----  */

.item--settings {
    margin-top: auto;
    position: relative;
}

.item--settings label {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-wrap: nowrap;
    padding: 10px;
    padding-left: 5px;
    margin-left: 5px;
    text-decoration: none;
    color: inherit;

}

/* ----- SETTINGS MENU ----- */
.item--settings input {
    display: none;
}

#settings__background {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 30;
    background-color: transparent;
}

.settings__menu {
    width: 120px;
    height: 150px;
    position: absolute;
    left: 50%;
    bottom: 50%;
    background-color: var(--box-color);
    border-radius: 8px;
    box-shadow: 0 0 15px 0 #0006;
    border-right: 3px solid var(--text-color);
    z-index: 40;
}

.settings__menu input {
    display: none;
}

.settings__list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
}

.settings__item {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.settings__label {
    display: flex;
    margin: 5px 0;
    gap: 5px;
    color: var(--text-color);
    user-select: none;
}

.settings__label:hover {
    filter: opacity(0.7)
}

.settings__toggle {
    width: 50px;
    height: 20px;
    border: 2px solid var(--text-color);
    border-radius: 13px;
    position: relative;
    padding: 2px;
    overflow: hidden;
    background-color: var(--bg-color);
}

.settings__toggle::before {
    content: "";
    padding: 10px;
    position: absolute;
    background-color: var(--text-color);
    border-radius: 100%;
    transition: right 0.5s;
    right: 32px;
    box-shadow: 0 0 15px 0 #0006;
}

.settings__toggle:has(input[type="checkbox"]:checked)::before {
    background-color: var(--text-color);
    right: 2px;
} 

/* open settings from side-bar */
body:has(#open-settings:checked) #settings__background {
    display: block;
}

body:has(#open-settings:checked) .settings__menu {
    animation: settings-appear 0.7s both;
    bottom: 40px;
    left: 50px;
}

@keyframes settings-appear {
    from {
        translate: 0 50px;
        opacity: 0.6;
    }
    to {
        translate: 0;
        opacity: 1;
    }
    
}

/* LINKS HIDDEN */

.list__item a {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-wrap: nowrap;
    padding: 10px;
    padding-left: 5px;
    margin-left: 5px;
    text-decoration: none;
    color: inherit;
}

/* LINKS SHOWN */

.side-menu:has(#open-menu:checked) {
    width: 140px;
}

.side-menu:has(#open-menu:checked) .list__item:hover::after {
    bottom: -20px;
    border-top-right-radius: 10px;
    box-shadow: 4px -4px 2px var(--bg-color);
}

#open-menu {
    display: none;
}

/* ----- MOBILE MENU ----- */

#mobile-menu__checkbox {
    display: none;
}

.header__mobile-menu {
    color: var(--text-color);
    background-color: transparent;
    padding: 20px;
    transition: transform 0.3s;
    user-select: none;
}

body:has(#mobile-menu__checkbox:checked) .header__mobile-menu {
    transform: rotate(-90deg);
    transition: transform 0.5s;
} 

.mobile-menu {
    position: absolute;
    right: 0;
    display: flex;
    background-color: #efe;
    flex-direction: column;
    margin-top: 3px;
    border-radius: 0 0 0 8px;
    z-index: 10;
    height: 0px;
    overflow: hidden;
    transition: height 0.7s;
    box-shadow: 0 0 15px 0 #0006;
    z-index: 10;
}

.mobile-menu:has(#mobile-menu__checkbox:checked) {
    height: 240px;
    border-bottom: 3px solid var(--text-color);
}

.mobile-menu__list {
    width: 100%;
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: space-evenly;
    color: var(--box-color);
    flex-direction: inherit;
}

.mobile-menu__item {
    padding: 0;
    margin: 0;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #222;
    padding: 10px 15px;
    margin: 0;
}

/* ----- MOVILE MENU SETTINGS ----- */

#settings-mobile {
    display: none;
}

/* open settings from mobile menu */

body:has(#settings-mobile:checked) #settings__background {
    display: block;
}

body:has(#settings-mobile:checked) .settings__menu {
    animation: settings-appear 1s;
}


/* ----- MAIN ----- */

.sections__container {
    overflow-y: scroll;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ----- SUMMARY ----- */

.summary__title {
    margin: 0;
}

.summary__content {
    padding: 0 20px;

}

.summary__arrow {
    margin-top: auto;
    margin-bottom: 15px;
    animation: arrow-movement 1s infinite alternate both;
}


@keyframes arrow-movement {
    to {
        translate: 0 20px;
    }
}

/* ----- SKILLS ----- */

.skills__info {
    text-decoration: none;
    color: inherit
}

.skills__info:hover {
    color: var(--bg-color);
}

.skills__content {
    margin: 20px;
    margin-top: 0;
}

.skills__wrapper {
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: min-content 1fr min-content;
    align-items: center;
    gap: 8px 10px;
    padding: 10px
}

.skill__container{
    width: 100%;
    box-sizing: border-box;
    display: inline-block;
    background-color: transparent;
    padding: 3px;
    border: 2px solid var(--text-color);
    border-radius: 12px;
}

.skill__bar {
    background-color: var(--text-color);
    padding: 12px;
    border-radius: 7px;
    color: var(--box-color);
    text-align: left;
    font-weight: bold;
    box-sizing: border-box;
}


/* ----- PROJECTS ----- */

.projects {
    padding: 20px;
    padding-top: 0;
}

.projects__list {
    margin: 0;
    margin-top: auto;
    display: grid;
    list-style: none;
    padding: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
    "noted blueonda"
    "numchat numchat";
    gap: 10px;
    width: 100%;
}

.projects__link {
    padding: 20px;
    display: block;
    color: #fff;
    text-decoration: none;
    backdrop-filter: brightness(0.9);
}

.projects__item {
    display: inline-block;
    text-align: center;
    background-image: conic-gradient(var(--text-color), var(--bg-color));
    color: #fff;
    font-weight: bold;
}

.projects__item:hover {
    outline: 2px solid var(--text-color);
}

/* ----- MEDIA QUERIES ----- */

@media screen and (min-width: 520px) {
    .header__button{
        display: block;
    }

    .header__mobile-menu {
        display: none !important;
    }


    .side-menu {
        display: flex;
    }


    .main-wrapper {
        display: flex;
        height: calc(100dvh - 70px);
        overflow: hidden;
        flex-direction: row;
    }
}
