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

body {
    margin: 0;
    font-family: "Outfit", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

nav {
    display: flex;
    justify-content: start;
    align-items: center;
    position: sticky;
    top: 0;
    width: 100%;
    height: 4rem;
    z-index: 100;
    padding: 1em;
    box-shadow: 0 2px 2px 2px #00000020;
    background: #f1f1f1;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

main {
    margin: 1em;
    max-width: 30rem;
}

#create-post {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding: 1em;
    background: #f1f1f1;
    border-radius: 0.2em;
}

#create-post label {
    font-size: 1.25rem;
    font-weight: 600;
}

#create-post input {
    margin-bottom: 0.5em;
    font-weight: 600;
}

#create-post textarea {
    margin-bottom: 1em;
}

#create-post button {
    font-family: inherit;
    font-weight: 700;
    font-size: 1em;
    padding: 0.5em;
    background: #fff;
    border: none;
    box-shadow: 0 0 3px 1px #00000020;
    border-radius: 0.2em;
}

#create-post button:focus {
    background: #f1f1f1;
}

@media(hover: hover) {
    #create-post button:hover {
        background: #f1f1f1;
    }
}

.post-input {
    font-family: inherit;
    padding: 0.5em;
    border: none;
    box-shadow: 0 0 3px 1px #00000020;
    border-radius: 0.2em;
}

#post-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
    margin-top: 2em;
}

.post {
    box-shadow: 0 0 3px 1px #00000020;
    border-radius: 0.2em;
    padding: 0.5em;
    width: 100%;
}

.post * {
    margin: 0;
}

.post h2 {
    font-size: 1rem;
    margin-bottom: 0.5em;
}

.post p {
    font-size: .875rem;
}

@media (min-width: 480px) {
    nav {
        padding: 1em 1.5em;
    }

    main {
        margin: 2em;
    }

    #create-post label {
        font-size: 1rem;
    }

    .post {
        padding: 1em;
    }

    .post h2 {
        font-size: 1.125rem;
    }

    .post p {
        font-size: 1rem;
    }
}