:root {
    /* COLOR PALETTE */
    --light: #ffffff;
    --dark: #000000;
    --accent: #1600e0;
    --accent-soft: hsla(246, 100%, 44%, 0.1);
    --grey-light: #E5E5E5;
    --grey-medium: #8d8d8d;

    /* TYPOGRAPHY */
    --font-primary: "Sora", sans-serif;
    --font-secondary: "Source Code Pro", monospace;
    
    --fs-base: 1rem;       /* 16px */
    --fs-small: 0.625rem;  /* 10px - Footer */
    --fs-button: 1.25rem;  /* 20px - Buttons */
    --fs-sub: 2rem;        /* 32px - Sub Headings */
    --fs-heading: 2.5rem; /* 40px - Main Headings */
    
    --lh-base: 2;    
    --lh-tight: 1.2;

    --lsp: 1px;

    /* SPACING & SIZING */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;

    /* UI ELEMENTS */
    --btn-radius: 15px;
    --radius: 30px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

header {
    padding: var(--space-lg);
    text-align: center;
}

section {
    padding: var(--space-lg);
    text-align: center;
    overflow: hidden;
}

h1, h2 {
    text-transform: capitalize;
    font-size: var(--fs-heading);
    font-weight: 600;
    line-height: var(--lh-tight);
}

p {
    line-height: var(--lh-base);
}

.flex-gap {
    display: flex;
    gap: var(--space-md);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.button {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--btn-radius);
    text-transform: uppercase;
    font-family: var(--font-secondary);
    color: var(--light);
    background-color: var(--dark);
    text-decoration: none;
    letter-spacing: var(--lsp);
    z-index: 10;
    transition: var(--transition);
    border: 2px solid var(--dark);
}

#menu-list.is-active {
    display: flex;
    z-index: 200;
}

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

header #logo {
    display: block;
    line-height: 0;
}

header #logo img {
    width: 50px;
    height: auto;
}

header #menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
}

header #menu-list {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    text-align: center;
    list-style-type: none;

    border-radius: var(--radius);
    box-shadow: var(--shadow);

    background-color: var(--light);

    width: 80%;
    height: 70%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: var(--space-lg);

    display: none;
}

header #menu-list li a {
    font-family: var(--font-secondary);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--dark);
    padding: var(--space-md);
    letter-spacing: var(--lsp);
}

header #menu-list li a:hover {
    font-weight: 700;
}

main {
    padding: var(--space-lg);
    text-align: center;
}

main a {
    color: var(--dark);
    font-family: var(--font-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

#empty-state {
    display: contents;
}

#library-view {
    padding-block: 0;
    display: none;
}

#library {
    padding-top: var(--space-lg);
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, 350px);
    gap: 2rem;
}

#library li {
    border-radius: var(--radius);
    background-color: var(--card-color, var(--accent));
    box-shadow: 0 4px 50px var(--card-shadow, rgba(22, 0, 224, 0.3));
    padding: var(--space-md);
    color: var(--light);

    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#library li .card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

#library li .card-top h2 {
    font-size: var(--fs-sub);
    text-align: left;
}

#library li p {
    text-align: left;
}

#library li .card-top button {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50em;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
}

#library li .card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;

    margin-top: auto;
}

#library li .card-bottom span {
    border-radius: var(--radius);
    font-family: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
}

#library li .card-bottom span:first-child {
    background-color: var(--light);
    color: var(--card-color, var(--accent));
}

#library li .card-bottom span:last-child {
    background-color: var(--card-accent, hsl(246, 100%, 48%));
}

@media screen and (min-width: 700px) {

    .wrapper {
        display: flex;
        min-height: 100vh;
        width: 100%;
    }

    header {
        height: 100vh;
        width: 25%;
    }

    header nav {
        flex-direction: column;
        justify-content: center;
        height: 100%; 
        width: 100%;
        background: var(--light);
        border-radius: 0;
        box-shadow: none;
        gap: 5rem;
    }

    header #menu-toggle {
        display: none;
    }

    header #menu-list {
        padding-block: var(--space-lg);

        transform: none;
        width: 100%;
        box-shadow: var(--shadow);

        display: flex;
        position: static;
    }

    #menu-list li {
        width: 100%;
    }

    header #menu-list li a {
        display: block;
        padding: 0;
    }

    main {
        flex-grow: 1;
    }
    
    #library {
        grid-template-columns: repeat(auto-fill, 400px);
    }

    #library-view {
        margin-top: var(--space-lg);
        width: 100%;
    }

}