body[data-theme="light"],
:root {
    --background: whitesmoke;
    --foreground: #0e1a1a;
    --archived: yellow;
    --link-home: black;
    --link: darkslategray;
    --link-decoration: royalblue;
    --header-border-width: 1px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0e1a1a;
        --foreground: rgb(212, 212, 212);
        --archived: rgb(204, 204, 7);
        --archived-foreground: var(--background);
        --link-home: var(--foreground);
        --link: rgb(120, 202, 202);
        --link-decoration: rgb(127, 146, 204);
        --header-foreground: var(--foreground);
        --header-background: var(--background);
        --header-border-color: var(--foreground);
    }
}

body[data-theme="dark"]  {
    --background: #0e1a1a;
    --foreground: rgb(212, 212, 212);
    --archived: rgb(204, 204, 7);
    --archived-foreground: var(--background);
    --link-home: var(--foreground);
    --link: rgb(120, 202, 202);
    --link-decoration: rgb(127, 146, 204);
    --header-foreground: var(--foreground);
    --header-background: var(--background);
    --header-border-color: var(--foreground);
}

body {
    margin: 3rem;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.5;
    background-color: var(--background);
    color: var(--foreground);
}

img,
video {
    max-width: 100%;
    height: auto;
}

figure,
figcaption {
    margin: 0;
    padding: 0;
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

figcaption .emoji {
    font-style: normal;
}

aside {
    font-style: italic;
}

h1,
h2,
p,
ol,
ul,
details {
    margin: 0 0 1rem 0;
}

details:not([open]) {
    cursor: pointer;
}
details[open] summary {
    cursor: pointer;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

ul {
    padding: 0 0 0 1rem;
}

ol.timeline {
    border-left: 1px dotted var(--foreground);
    margin-left: 0.25ch;
    padding-left: 2.5rem;
}

ol.timeline > li {
    position: relative;
}

ol.timeline > li:before {
    /* yuk */
    content: '';
    width: calc(2.5rem - 3ch);
    margin-right: calc((2.5rem - 3ch) * -1);
    position: relative;
    left: calc(-2.5rem + 1px);
    top: 50%;
    border-bottom: 1px dotted var(--foreground);
    display: inline-block;
    vertical-align: middle;
}

ol.timeline > li:nth-last-child(n+10):first-child:before,
ol.timeline > li:nth-last-child(n+10):first-child ~ li:nth-last-of-type(n+10):before {
    width: calc(2.5rem - 4ch);
    margin-right: calc((2.5rem - 4ch) * -1);
}

ol.timeline > li:nth-last-child(n+99):first-child:before,
ol.timeline > li:nth-last-child(n+99):first-child ~ li:nth-last-of-type(n+99):before {
    width: 0;
    margin-right: 0;
}

li {
    margin: 0 0 0.25rem;
}

.link-home__text,
a {
    text-decoration: underline;
    text-decoration-thickness: from-font;
    text-decoration-thickness: 2px;
    text-underline-offset: 12%;
    color: var(--link);
    text-decoration-color: var(--link-decoration);
}

.home > *:not(:last-child),
.home__lists > *:not(:last-child) {
    margin: 0 0 2rem 0;
}

.home__content {
    text-wrap: balance;
}

.home__roles {
    max-width: 40ch;
    text-wrap: pretty;
}

.page-header {
    display: flow-root;
    margin: -3rem;
    margin-bottom: 3rem;
    padding: 1rem 3rem;
    background-color: var(--header-background, var(--foreground));
    color: var(--header-foreground, var(--background));
    border-bottom: var(--header-border-width) solid var(--header-border-color, transparent);
}

.page-header a {
    color: inherit;
    text-decoration-color: inherit;
    text-decoration: none;
}

.page-header a:hover {
    text-decoration: underline;
}

.nav-social a {
    text-decoration: none;
    margin-right: 1.25rem;
    height: 1.25em;
    width: 1.25em;
    display: inline-block;
    position: relative;
}

.nav-social a:before {
    width: calc(100% + 1.5rem);
    height: calc(100% + 1.5rem);
    top: -0.625rem;
    left: -0.625rem;
    position: absolute;
    display: block;
    content: '';
}

.nav-social__icon {
    width: 100%;
    height: 100%;
    fill: var(--foreground);
}

.link-home {
    display: inline-block;
    margin-top: 2rem;
    text-decoration: none;
}

.link-home:before {
    content: '\002B05';
    color: var(--link-home);
}

.post img,
.post picture {
    display: block;
}

.post__details {
    margin-bottom: 1.5rem;
}

.post__gallery {
    display: none;
}

.post__roles {
    list-style-type: none;
    padding: 0;
}

p,
li,
.post__content {
    max-width: 30rem;
}

.post__content h2 {
    margin-top: 1.5rem;
}

.post__updates,
.post__archived {
    opacity: 0.8;
    border-left: 1px dotted;
    padding-left: 0.5rem;
    list-style: none;
}

.post__archived {
    padding: 0.5rem;
    background-color: var(--archived);
    color: var(--archived-foreground);
    margin-bottom: 1rem;
}

.post__archived p {
    margin: 0;
}

.post__content {
    margin-bottom: 2rem;
}

.post__content img {
    margin-bottom: 1rem;
}

.post__content figure img {
    margin-bottom: 0.25rem;
}

.post__gallery img {
    margin-bottom: 1.5rem;
}

.post picture:last-child > img {
    margin: 0;
}

@media (min-width: 60rem) {
    .post {
        display: grid;
        grid-row-gap: 0.5rem;
        grid-template-columns: repeat(2, fit-content(30rem));
    }

    .post__gallery:not(:empty) {
        display: block;
        grid-row: 1;
        grid-column: 1;
        margin-right: 2rem;
    }

    [data-gallery-container] > .post__content > picture {
        display: none;
    }

    .post__content {
        grid-row: 1;
        grid-column: 2;
    }
}

@media (min-width: 40rem) {
    .home {
        display: grid;
        grid-column-gap: 3rem;
        grid-template-columns: fit-content(20rem) fit-content(30rem);
    }

    .home__roles > h2:first-child {
        line-height: 1; /* baseline match adjacent paragraph */
    }
}


fieldset {
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 0;
    padding: 0 0 0 1rem;
    border-left: 1px solid;
    border-left-color: var(--header-foreground); /* safari won't use shorthand? */
    margin: 0;
    float: right;
}
label {
    -webkit-user-select: none;
    user-select: none;
    vertical-align: middle;
}
input {
    -webkit-user-select: none;
    user-select: none;
    vertical-align: middle;
}
legend {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}


.likes {
    display: flex;
    flex-wrap: wrap;
    margin: 1rem 0 2rem 0;
    padding: 0;
    list-style: none;
    gap: 2rem;
}

.like {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.like_photo {
    max-width: 3rem;
}

.like_photo {
    border-radius: 50%;
}


.webmentions {
    display: flex;
    flex-direction: column;
    margin: 1rem 0 2rem 0;
    padding: 0;
    list-style: none;
    gap: 2rem;
}

.webmentions_item {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    padding: 0.5rem;
}

.webmentions_item_name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

.webmentions_item_photo {
    max-width: 6rem;
}

.webmentions_item {
    border: 1px dotted var(--foreground);
}

.webmentions_item_content p:last-child {
    margin-bottom: 0;
}