:root {
    --bg: #006d77;
    --btn-rad: 6px;
    --fg: #edf6f9;
    --bghl: #DFF6FF20;
    --accent-2: #00ff99;
    --accent-1: #ffffff;
    --red: #FF0000;
}



.md-content{
    hr{
        border: none;
        height: 1px;
        background-image: linear-gradient(to right, transparent,var(--fg),transparent);
        width: 90%;

    }
    table{
        /* width: 80%; */
        margin: 32px 0;
        &,th,td,tr{
            border-collapse:collapse;
        }
        td,th{
            padding: 2px;
        }
        tr:nth-child(even){
            background-color: color-mix(in srgb, var(--fg) 10%,transparent 90%);
        }
        th{
            border-bottom: 1px solid currentColor;
        }
    }
}


body,
html {
    font-family: sans;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
}

a {
    color: currentcolor;
}

footer,nav,main{
    margin: 24px 12px;
}

nav{
    position: relative;

    .glow,
    .menu {
        border-radius: calc(var(--btn-rad) * 2);
    }

    .glow {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to right, cyan, yellow);
        pointer-events: none;
        /* filter: blur(6px); */
        filter: blur(12px);
    }

    .menu {
        /* border: 2px solid transparent; */
        border: none;
        background:
            linear-gradient(to right, var(--bg), var(--bg)),
            linear-gradient(to right, var(--accent-1), var(--accent-2));
        background-clip: padding-box, border-box;
        background-origin: padding-box, border-box;
        position: relative;

        padding: 3px 6px;

        ul {
            margin: 6px;
            display: flex;
            flex-direction: row;
            list-style-type: none;
            padding: 0;
            gap: 12px;
            align-items: center;

            li {
                display: block;
                a {
                    padding: 6px;
                    /* border: 2px solid var(--accent-2); */
                    border: none;
                    border-radius: var(--btn-rad);
                    text-decoration: none;
                    display: inline-block;
                    /* display: block;  GALLO AVEVA FATTO COSI*/
                    transition-property: transform, color, background-color;
                    transition-duration: .3s, .3s, .3s;
                    transition-timing-function: ease, ease, ease;

                    &:hover {
                        transform: scale(1.05);
                        color: var(--accent-2);
                        background-color: var(--bghl);
                    }
                }
            }

            .nav-title {
                font-size: 1.4rem;
                flex: 1 1 auto;
                font-weight: bold;
                /*1: flexGrow 2:flexShrink 3:flexBasis*/
            }
        }
    }

    @media only screen and (max-width: 790px){
        .menu {
            ul{
                display: grid;
                grid-template-columns: 1fr 1fr;
                justify-items: center;
                gap: 6px;
                li {
                    text-align: center;
                    width: 100%;
                    height: 100%;
                    font-size: .95em;
                    a{
                        padding: 6px;
                        margin: 0 12px;
                        border: none;
                        border-radius: var(--btn-rad);
                        text-decoration: none;
                        display: block;
                        transition: all 0.3s;
                    }
                }
                .nav-title{
                    /* display: none; */
                    grid-column: 1 / -1;
                    flex-grow: 1;
                }
            }
        }
    }
}


.business-card {
    margin: 48px 12px;
    gap: 12px;
    display: flex;
    flex-direction: row;

    .index-image {
        border-radius: 12px;
        display: block;
        max-width: 300px;
        height: fit-content;
        box-shadow: 0 0 15px rgba(0, 0, 0, .3);
        /* -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%); */
        /* mask-image: linear-gradient(to right, black 70%, transparent 100%); */
    }
    @media only screen and (max-width: 790px){
        flex-direction: column;
        .index-image{
            margin: auto;
            max-width: 240px;
        }
        h1,h2{
            text-align:center;
        }
        .link-list{
            justify-content: center;
        }
    }
}

.business-card-info {
    display: flex;
    flex-direction: column;

    h1,
    h2 {
        margin: 0;
    }

}

.icon-button {
    text-decoration: none;
    padding: 6px;
    border-radius: 100%;
    border: 2px solid var(--accent-2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;

    &:hover {
        border: 2px solid transparent;
        background-color: var(--accent-2);

        svg {
            fill: var(--bg);
        }
    }

    svg {
        width: 24px;
        height: 24px;
        fill: currentcolor;
        display: block;
        transition: all 0.3s;
    }
    @media only screen and (max-width: 790px){
        padding: 9px;
        svg{
            width: 32px;
            height: 32px;
        }
    }
}

.link-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    align-items: end;
}


.content {
    max-width: 1200px;
    margin: auto;
}

footer {
    text-align: center;
    margin-top: 128px;
}



.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin: 24px 12px;
    gap: 12px;

    .skill-card {
        padding: 18px;
        border-radius: var(--btn-rad);
        background-color: var(--bghl);
        box-shadow: 0 0 15px rgba(0, 0, 0, .3);

        .skill-card-title-container {
            gap: 12px;
            display: flex;
            flex-direction: row;
            align-items: center;

            img {
                /* border-radius: 100%; */
                object-fit: cover;
                width: 84px;
                height: 84px;
            }
        }

        .skill-card-content {
            /* margin: 48px; */
        }
    }
}

.proj-sub-title{
    color:color-mix(in srgb, var(--fg) 40%,transparent 60%);
}

.lightbox{
    display: grid;
    grid-template-columns: repeat(auto-fill, 120px);
    gap: 8px;
    margin: 18px 0;
    justify-content: center;
    > img {
        width: 120px;
        height: 120px;
        display: block;
        object-fit: cover;
        border-radius: 6px;
        cursor:pointer;
        transition-property: transform, filter;
        transition-duration: .3s, .3s;
        transition-timing-function: ease, ease;
        &:hover{
            transform: scale(1.1);
            filter: brightness(.8);
        }
    }
    .overlay{
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background-color: rgba(0,0,0,.6);
        z-index: 9000;
        > * {
            position: absolute;
        }
        .shade{
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            z-index: 10;
        }
        > img{
            z-index: 20;
            max-width: 80%;
            max-height: 80%;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            border-radius: 12px;
        }
        button{
            z-index: 30;
            top: 50%;
            transform: translateY(-50%);
            border: none;
            color: currentColor;
            background-color: rgba(0,0,0,.3);
            width: 64px;
            height: 64px;
            border-radius: 100%;
            cursor:pointer;
            &::before{
                content: "";
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
                background-size: cover;
                display: block;
                width: 100%;
                height: 100%;
                padding: 12px;
                box-sizing: border-box;
            }
            &:hover{
                background-color: rgba(0,0,0,.6);
            }
            &.fwd{
                right: 12px;
            }
            &.back{
                left: 12px;
                &::before{
                    transform: rotateY(180deg);
                }
            }
        }
        &[data-visible="true"]{
            display: block;
        }
    }
}

