:root {

    --lilac: rgb(182, 162, 181);
    --pink: rgb(253, 236, 240);
    --dark: rgb(168, 114, 152);
    --light: rgb(245, 239, 233);
    --periwinkle: rgb(243, 229, 233);
    --white: #ffffff;
    --script: 'League Script', 'Brush Script MT', cursive;
    --type: 'Lora', 'Georgia', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--type);
    font-weight: 400;
    font-size: 1.3125em;
    line-height: 1.6;
    width: 100%;
}

a {
    text-decoration: none;
    color: black;
    font-weight: 600;
}

header {
    background-color: var(--lilac);
    position: relative;
    top: 0;
    width: 100%;
    height: 8rem;
    padding: 1rem;
    line-height: 0.75;
}

/* top "keri sen" logo */
h1 {
    text-align: center;
    font-family: var(--script);
    font-size: 3.5rem;
    line-height: 40%;
    padding-top: 1rem;
}

/* sidebar "about me" */
h2 {
    font-family: var(--script);
    line-height: 1;
    font-size: 2.5rem;
    margin: auto;
}

/* app titles */
h3 {
    font-size: 2rem;
    position: relative;
}

.responsive {
    width: 50%;
    height: auto;
    margin: auto;
}

.stretchimage {
    width: 100%;
    height: 100%;
    position: relative;
}

/* container for logo and navigation */
.split {
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: column;
}

.split>* {
    flex-basis: 100%;
}

.topnav {
    display: flex;
    justify-content: center;
    margin: 0;
    color: black;
    font-size: 0.75em;
}

.topnav a {
    margin: 0 0.5rem;
}

.topnav a.active {
    background-color: var(--white);
    opacity: 0.7;
    border-radius: 50px;
}

.topnav a:hover {
    color: var(--dark);
}

/* Main grid that holds the body of the page */
.grid {
    margin: 2rem 0;
    display: grid;
    width: 100%;
    grid-template-columns: 100%;
    gap: 3rem;
    grid-auto-rows: minmax(100px, auto);
}

.sidebar {
    grid-column: 1;
    grid-row: 1;
    /* use linear-gradient() function to create a fading background  */
    background-image: linear-gradient(rgba(182, 162, 181, 0.3) 0%,
            rgba(182, 162, 181, 0.6) 100%);
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    text-align: left;
    align-items: flex-start;
}

article {
    opacity: .4;
    transition: opacity 0.5s;
    border-radius: 8px;
    transition: all 0.5s ease-in-out;
}

article:hover {
    opacity: 1;
    box-shadow: inset 0px 0px 8px rgba(182, 162, 181, 1), 0 0 15px rgba(182, 162, 181, 1);
}

.spotlight {
    grid-column: 1;
    grid-row: 2;
    position: relative;
}

.project {
    position: relative;
}

.app-title {
    position: absolute;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    z-index: 2;
    border-radius: 0px 50px 50px 0px;
    background-color: var(--white);
    opacity: 0.7;
    max-width: 23rem;
}

.caption {
    position: absolute;
    width: 100%;
    height: 2rem;
    bottom: 8px;
    background-color: var(--white);
    text-align: center;
    z-index: 2;
    opacity: 0.7;
    font-family: var(--script);
    text-transform: lowercase;
    font-size: 1.5em;
}

footer {
    position: relative;
    bottom: 0;
    width: 100%;
    background-color: var(--lilac);
    height: 5rem;
    font-size: 1rem;
    margin-top: 2rem;
    text-align: center;
    padding-top: 0.75rem;
}

/* Large devices (tablets in landscape mode and small laptops, min-width 768px) */

@media only screen and (min-width: 768px) {
    .topnav {
        padding-top: 0.5rem;
        margin: auto;
    }

    .topnav a {
        padding: 5px;
    }

    .grid {
        margin-top: 2rem;
        grid-template-columns: 50%;
    }

    .sidebar {
        grid-column: 2;
        grid-row: 1 / 4;
    }

    .spotlight {
        grid-column: 1;
        grid-row: 1;
    }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    header {
        position: fixed;
        z-index: 1;
        height: 8rem;
        padding: 2rem;
    }

    body {
        padding-bottom: 5rem;
    }

    h1 {
        size: 5rem;
    }

    h2 {
        size: 3.5rem;
    }

    .split {
        justify-content: space-between;
        flex-wrap: nowrap;
        flex-direction: row;
    }

    .topnav {
        font-size: 1rem;
    }

    .grid {
        margin: 12rem 6rem 6rem 6rem;
        width: 90%;
        grid-template-columns: repeat(3, 1fr);
        gap: 4rem;
    }


    .sidebar {
        grid-column: 3;
        grid-row: 1 / 5;
    }

    .spotlight {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .project {
        position: relative;
    }

    footer {
        position: fixed;
        padding: 3rem 5rem;
    }
}