:root {
    color: hsl(0, 0%, 30%);
    --link-hover-color: hsl(0, 0%, 10%);
    --box-shadow: 2px 2px 2px hsl(0, 0%, 90%);
    padding: 0;
    margin: 0;
}  

/* @media (prefers-color-scheme: dark) {
    :root {
        background-color: hsl(0, 0%, 10%);
        color: hsl(0, 0%, 90%);
    }
} */

.darkmode {
    background-color: hsl(0, 0%, 10%);
    color: hsl(0, 0%, 90%);
    --link-hover-color: hsl(0, 0%, 95%);
    --box-shadow: 2px 2px 2px hsl(0, 0%, 95%);
}

* {
    font-family: Palatino, Lucida Sans Unicode, Lucida Grande, Lucida Sans, Arial, sans-serif;
    line-height: 1.5;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

nav {
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid hsl(0, 0%, 30%);
}


ul {
    display: flex;
    align-items: baseline;
    /* cosmetic */
    gap: 16px;
    padding: 0;
    margin: 0;
    justify-content: space-between;
    list-style-type: none;
    flex-wrap: wrap;
    align-content: flex-start;
}

a {
    color: inherit;
    text-decoration: none;
}

li.name {
    margin-right: 50px;
    display: flex;
    flex-shrink: 0;
    /* cosmetic */
    font-weight: 800;
    font-size: 2.5rem;

} 

.essay-title {
    font-weight: 600;
    font-size: 2rem;
}

.home {
    display: flex;
    gap: 10px;
    align-items: center;
}

.essay {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px;
}

.dark-mode-toggle {
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
    color: hsl(0, 0%, 30%);
}

/* icon color follows text color; make it white in dark mode */
body.darkmode .dark-mode-toggle {
    color: hsl(0, 0%, 90%);
}

.links {
    display: flex;
    gap: 16px;
}

li.link{
    font-size: 1.5rem;
}

a:hover {
    color: var(--link-hover-color);
}


.intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px;
}

.essays {
    display: flex;
    flex: 1;
    justify-content: space-evenly;
    align-items: stretch;
    align-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
}

.box {
    border: 1px solid hsl(0, 0%, 90%);
    box-shadow: var(--box-shadow);
    padding: 15px;
    width: 250px;
    text-align: center;
    flex: 1 0 auto;
    border-radius: 10px;
}

.box p{
    text-align: left;
}

.essay-link {
    text-decoration: underline;
}


footer {
    border: 1px solid hsl(0, 0%, 90%);
    padding: 10px;
    border-radius: 10px;
    margin: 0 10px;
}

footer ul {
    display: flex;
    justify-content: space-between;
}