@import url('https://fonts.googleapis.com/css2?family=Arbutus&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root{
    --primary-color: #7353ff;
    --secondary-color: #f4f4f4;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --main-font: 'Nunito', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--main-font);
    line-height: 1.6;
    font-size: 16px;
    background: var(--light-color);
    color: var(--dark-color);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: grid;
    grid-template-rows: 140px min-content 1fr;
}

header {
    width: clamp(300px, 100dvw);
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, .5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, .25);
    z-index: 1;    
    overflow: hidden;
}

nav menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav menu li {
    list-style: none;
}

nav menu li a {
    display: block;
    text-decoration: none;
}

nav menu li .logo {
    height: 60px;
    vertical-align: middle;
}

nav menu li .avatar {
    height: 120px;
    vertical-align: middle;
    overflow: hidden;
}

main {
    padding: 0px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    overflow: hidden;
    gap: 1em;
    max-width: 1920px;

}

.cta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 1em;
    margin: 20px 0;
    box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset, rgba(0, 0, 0, 0.15) 0px -36px 30px 0px inset, rgba(0, 0, 0, 0.1) 0px -79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}

.cta:hover {
    box-shadow: rgba(0, 0, 0, 0.17) 0px 23px 25px 0px inset, rgba(0, 0, 0, 0.15) 0px 36px 30px 0px inset, rgba(0, 0, 0, 0.1) 0px 79px 40px 0px inset, rgba(0, 0, 0, 0.06) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}

#links {
    padding: 20px;
    margin-left: 20px;
}

#images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    height: 100%;
    overflow: hidden;
    overflow-y: scroll;
}

#images figure {
    margin: 0;
    padding: 0;
    width: 30%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 1em;
    box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    transition: all .5s ease-in-out;
}

#images figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 1em;
    background-color: rgba(0, 0, 0, .5);
    color: var(--secondary-color);
    font-size: .75em;
    max-height: 0;
    transition: all .5s ease-in-out;
}

#images figure:hover {
    box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, .5);
    cursor: pointer;
    transform: scale(1.05);
    z-index: 1;
}

#images figure:hover figcaption {
    max-height: 100%;
    padding: 1em;
}

#images img, #images video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#images #profile {
    display: flex;
    gap: 10px;
    width: 100%;
    position: sticky;
    top: 0;
    padding: 1em 2em;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-bottom-left-radius: 1em;
    align-content: end;
    align-items: end;
    z-index: 2;
    box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, .5);
}

#images #profile img{
    max-width: 120px;
    border-radius: 50%;
}

#images #profile #label {
    padding: 1em;
}

#images #profile #label a {
    color: var(--secondary-color);
    text-decoration: none;
}

#images #profile #label a:hover {
    text-decoration: underline;
}

#gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 0;
}

@media screen and (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        height: auto;
        overflow: auto;
    }

    #images {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1em;
        height: auto;
        overflow-y: visible;
        overflow: visible;
    }

    /* make images profile shorter */

    #images #profile {
        padding: .5em;
        position: relative;
        align-items: start;
    }

    #images #profile img {
        max-width: 60px;
        max-height: 60px;
    }

    #images #profile #label {
        padding: 1.5em;
    }

    #images img, #images video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #images figure figcaption {
        display: none;
    }
    
}