:root {
    --header-bg: url('images/header.png');
    --site-bg: url("images/flowertile.png");
    --accent-color: #f55cc0;
    --select-color: #ffc1e9;
    --link-color: #5083C1;
    --bg-color: #CEEAFF;
    --bg-color2: white;
    --text-color: #191919;
    --border-color: #215697;
    --post-header-color: white;
    --post-shadow-color: #21569760;
    --outline-color: #6EAAD6;
    --outline-color2: #CEEAFF;
}

* {
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

::selection {
    background: var(--select-color);
    color: var(--border-color);
}

body {
    background-color: var(--bg-color);
    background-image: var(--site-bg);
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
}

p {
    line-height: 1.5em;
}

h1 {
    font-size: 1.5em;
    color: var(--post-header-color);
    filter:
        drop-shadow(2px 0 0 var(--outline-color))
        drop-shadow(0 2px 0 var(--outline-color))
        drop-shadow(-2px 0 0 var(--outline-color))
        drop-shadow(0 -2px 0 var(--outline-color))
        drop-shadow(0 1px 1px var(--outline-color2))
        drop-shadow(1px 0 1px var(--outline-color2));
}

h4,
h5,
h6 {
    color: var(--border-color);
}

header {
    background-color: var(--accent-color);
    background: var(--header-bg);
    background-size: 100%;
    background-position: center;
    min-height: 200px;
    margin: 0 auto;
    border-top: 12px solid var(--bg-color2);
    border-bottom: 12px solid var(--bg-color2);
}

header > h1 {
    background-color: var(--bg-color2);
    color: var(--border-color);
    margin: 1em auto;
    font-size: 2em;
    max-width: 600px;
    padding: 6px 12px;
    border-radius: 1em;
    border: 4px double var(--outline-color);
    filter: none;
    text-align: center;
}

li {
    list-style-image: url("images/flower.png");
}

nav {
    margin: 1em;
}

nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 960px;
    margin: auto;
    padding: 0;
    gap: 12px;
    line-height: 3rem;
    list-style: none;
}

nav li {
    list-style: none;
    list-style-image: none;
    text-align: center;
    margin: 0;
}

nav li > a {
    font-weight: bold;
    background-color: var(--bg-color);
    border: 4px double var(--outline-color);
    border-radius: .3em;
    padding: .5em 3em;
    text-decoration: none;
}

nav li > a:visited {
    color: var(--link-color);
}

nav li > a:hover {
    color: var(--accent-color);
    background-color: var(--select-color);
    border-color: var(--accent-color);
}

a {
    color: var(--link-color);
    border-radius: .3em;
    transition: .2s ease-out;
}

a:visited {
    color: var(--text-color);
}

a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transition: .2s ease;
}

/* Кнопка скачивания */
.download-btn {
    font-weight: bold;
    color: var(--link-color);
    background-color: var(--bg-color);
    border: 4px double var(--outline-color);
    border-radius: .3em;
    padding: .5em 3em;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: .2s ease-out;
}

.download-btn:hover {
    color: var(--accent-color);
    background-color: var(--select-color);
    border-color: var(--accent-color);
    transition: .2s ease;
}

.download-btn:active {
    transform: scale(.97);
}

.download-btn:focus {
    outline: none;
}

#sidebar {
    background-color: var(--bg-color2);
    color: var(--border-color);
    height: fit-content;
    min-width: 320px;
    margin-top: 1em;
    margin-right: 2em;
    border-radius: .5em;
    text-align: center;
}

.small-box {
    max-width: 240px;
    margin: auto;
    border: 2px solid var(--bg-color);
    font-size: 11px;
    line-height: 1.5rem;
}

#avatar {
    display: flex;
    justify-content: center;
    margin: .5em;
    max-width: 320px;
}

.flower {
    display: block;
    width: 320px;
    aspect-ratio: 1;
    margin: auto;
    --g: 37.02% 37.02% radial-gradient(#000 calc(71% - 1px), #0000 71%) no-repeat;
    mask:
        90.078% 79.895% var(--g),
        33.953% 97.355% var(--g),
        0.004% 49.372% var(--g),
        35.148% 2.257% var(--g),
        90.817% 21.121% var(--g),
        radial-gradient(100% 100%, #000 25.476%, #0000 calc(25.476% + 1px));
}

#bio {
    margin: 20px;
    padding: .2em;
    background: var(--bg-color);
    border: 4px double var(--bg-color2);
    border-radius: 2em;
    font-size: small;
}

#bio p {
    margin: 1em;
}

#content {
    display: flex;
    max-width: 960px;
    margin: auto;
}

main {
    padding: 1em;
}

#top {
    background-color: var(--bg-color);
}

#top section {
    background-color: var(--bg-color2);
    border-radius: .5em;
    margin-bottom: 10px;
    padding: .2em 1em;
    width: fit-content;
}

article {
    background-color: var(--bg-color2);
    padding: 1em;
    border: 2px solid var(--border-color);
    border-radius: .3em;
    margin-bottom: 1em;
    box-shadow: var(--post-shadow-color) 5px 5px;
}

article img {
    max-width: 100%;
}

details > summary {
    cursor: pointer;
}

.readmore summary {
    font-weight: bold;
    color: var(--border-color);
    list-style: none;
}

.readmore summary::-webkit-details-marker {
    display: none;
}

.readmore[open] > summary {
    border-bottom: 2px dashed var(--bg-color);
    padding-bottom: .6em;
    margin-bottom: .6em;
}

.post-header {
    color: var(--border-color);
    font-weight: bold;
    padding: .5rem 0;
    border-bottom: 4px double var(--outline-color);
}

.timestamp {
    float: right;
    font-weight: normal;
    font-size: smaller;
    margin: .2em;
}

.photosetx2,
.photosetx3 {
    display: grid;
    gap: 4px;
    align-items: center;
}

.photosetx2 {
    grid-template-columns: 1fr 1fr;
}

.photosetx3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.cropped {
    width: 156px;
    height: 156px;
    overflow: hidden;
    object-position: 25% 25%;
}

.photosetx2 img,
.photosetx3 img {
    object-fit: cover;
}

.center {
    text-align: center;
}

.img-right {
    float: right;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.small-text {
    font-size: 11px;
    text-shadow: var(--bg-color) 1px 1px;
}

footer {
    text-align: center;
    font-size: small;
    margin: auto;
    padding: .5em;
    background: var(--bg-color2);
}

@media only screen and (max-width: 800px) {
    #content {
        flex-wrap: wrap;
    }

    #sidebar {
        margin: 0;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        border: none;
        border-radius: 0;
    }

    header {
        min-height: 160px;
    }

    header > h1 {
        width: fit-content;
        padding: .3em 1em;
    }

    nav ul {
        flex-wrap: wrap;
        flex-direction: row;
    }

    #bio {
        width: 50%;
    }

    #sidebar ul {
        line-height: 2em;
        display: flex;
        flex-wrap: wrap;
        gap: 1em;
    }

    #sidebar li {
        margin: .3em 1em;
    }
}