@font-face {
    font-family: Nunito;
    font-weight: 100;
    src: url(fonts/Nunito.ttf);
}

input:focus,
textarea:focus {
    outline: none;
}

:root {
    --background-color: hsl(148, 13%, 19%);
    --foreground-color: rgb(253, 251, 226);
    --text-color: hsl(202, 37%, 87%);
    --font-family: Nunito;
}

*:not(html) {
    margin: 0;
    border: none;
    box-sizing: border-box;
    font-family: Nunito;
    /* border: 1px solid white; */
}


h1,
h2,
h3,
h4,
h5,
h6,
p {
    color: var(--text-color);
}

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

html {
    width: 100dvw;
    height: 100dvh;
}

body {
    height: 100dvh;
    width: 100dvw;
    background-color: var(--background-color);
    overflow-x: hidden;
}

header {
    border-bottom: 0.5px solid var(--foreground-color);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 48px;
}

#nav {
    margin-right: 32px;
    color: var(--text-color);
}

.nav-link {
    font-size: 18px;
    margin: 0 8px 0 8px;
    position: relative;
    transition: 0.2s;
}

.nav-link:hover {
    color: hsl(216, 49%, 100%)
}

.nav-link::after,
.nav-link::before {
    content: '';
    position: absolute;
    background-color: wheat;
    height: 1px;
    width: 0%;
    transition: 0.15s;
}

.nav-link::after {
    bottom: -1px;
    left: 0px;
}

.nav-link::before {
    top: -1px;
    right: 0;
}

.nav-link:hover::after,
.nav-link:hover::before {
    width: 100%;
}

main {
    padding: 16px;
    width: 100dvw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

#avatar {
    background-image: url(assets/images/me.jpg);
    background-position: center;
    display: inline-block;
    border: 1px solid white;
    border-radius: 100%;
    width: 360px;
    height: 360px;
    margin: 32px 0 0 0;
}

#name {
    margin: 16px 0 16px 0;
}

#description {
    text-align: center;
}

#description>p {
    margin: 4px 0 0 0;
}


.diary-container {
    border: 1px solid hsl(147, 5%, 62%);
    border-radius: 16px;
    margin: 16px 0 16px 0;
    padding: 32px;
    width: 80dvw;
    min-height: 60dvh;
    display: flex;
    flex-direction: column;
}

@media only screen and (max-width: 600px) {
    .diary-container {
        border-top: 1px solid whitesmoke;
        border-bottom: 1px solid whitesmoke;
        margin: 32px 0;
        width: 90dvw;
        padding: 16px 8px;
    }
}

.diary-container>p {
    text-align: justify;
    font-weight: 300;
    white-space: pre-wrap;
    margin: 16px 0
}

/* .diary-container img {
    float: right;
    border: 1px dotted hsl(39, 16%, 66%);
    border-radius: 8px;
    min-height: 64px;
    min-width: 64px;
    max-height: min(512px, 32dvw);
    margin: 8px 0 16px 16px;
} */

#new-diary-form {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 80dvw;
    height: 80dvh;
    border: 1px solid wheat;
    border-radius: 16px;
}

#new-diary-form>h1 {
    margin-top: 64px;
}

#new-diary-form>input {
    width: clamp(256px, 32dvw, 768px);
    height: 48px;
    padding: 0 16px 0 16px;
    border-radius: 16px;
    margin: 16px;
    font-weight: bold;
}

#new-diary-form>textarea {
    width: clamp(256px, 32dvw, 768px);
    height: 128px;
    max-height: 512px;
    border-radius: 16px;
    padding: 16px;
    font-weight: bold;
}

#new-diary-form>button {
    margin-top: 128px;
    width: 256px;
    height: 48px;
    border-radius: 8px;
    background-color: hsl(33, 100%, 88%);
    color: rgb(28, 87, 26);
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

#new-diary-form>button:hover {
    background-color: hsl(33, 100%, 82%);
    box-shadow: 0 0 4px rgb(104, 255, 129);
}

#adminLoginForm {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    height: 80dvh;
    width: clamp(360px, 40dvw, 512px);
    border: 1px solid wheat;
    border-radius: 16px;
}

#adminPassField {
    height: 48px;
    width: 75%;
    padding: 8px;
    border-radius: 16px;
    font-weight: bold;
}

#adminLoginButton {
    margin: 16px;
    width: 256px;
    height: 48px;
    border-radius: 16px;
    font-weight: bold;
    cursor: pointer;
    background-color: hsl(60, 56%, 91%);
    transition: 0.2s;
}

#adminLoginButton:hover {
    box-shadow: 0 0 8px hsl(56, 46%, 61%);
    background-color: hsl(60, 56%, 81%);
}

#contact-container {
    height: 80dvh;
    display: grid;
    grid-template-columns: min-content min-content;
}

@media only screen and (max-width: 600px) {
    #contact-container {
        grid-template-columns: min-content;
    }
}

.contact-card {
    height: 256px;
    width: 256px;
    border: 1px solid wheat;
    border-radius: 16px;
    margin: 8px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.social-btn {
    width: 50%;
    height: 48px;
    border-radius: 8px;
    background-color: rgb(27, 99, 63);
    color: var(--text-color);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.social-btn:hover {
    opacity: 0.9;
    box-shadow: 0 0 8px hsl(64, 84%, 70%);
}