@import url("https://fonts.bunny.net/css?family=rye:400");

:root {
    color-scheme: light dark;
    --backdrop: #8fb6ff;
    --paper: rgba(241, 249, 247, 0.94);
    --paper-soft: rgba(252, 254, 255, 0.97);
    --ink: #151515;
    --text: #202026;
    --muted: #575765;
    --rule: #5f5f68;
    --link: #007681;
    --link-hover: #005760;
    --title-red: #d71920;
    --title-gold: #f7e7b4;
    --title-shadow: #080808;
    --accent-red: #f04e62;
    --accent-orange: #ff9f2f;
    --accent-yellow: #bfeee4;
    --accent-green: #58c77c;
    --accent-blue: #168fcf;
    --accent-purple: #6d55d8;
    --code-bg: #17151d;
    --code-text: #fff7d1;
    --measure: 46rem;
    --wide: 52rem;
    --space: clamp(0.75rem, 3vw, 1.35rem);
    --radius: 0.45rem;
    --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Rye", Georgia, "Times New Roman", serif;
    --font-ui: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --backdrop: #1b2338;
        --paper: rgba(28, 35, 42, 0.95);
        --paper-soft: rgba(35, 43, 51, 0.98);
        --ink: #fff3cf;
        --text: #f3ead3;
        --muted: #c9beaa;
        --rule: #91866e;
        --link: #82e5df;
        --link-hover: #b6fff8;
        --title-red: #ff3f3f;
        --title-gold: #fff0bd;
        --title-shadow: #080808;
        --accent-red: #ff6579;
        --accent-orange: #ffb254;
        --accent-yellow: #75d9cb;
        --accent-green: #74dfa0;
        --accent-blue: #61caff;
        --accent-purple: #b3a2ff;
        --code-bg: #0d0c12;
        --code-text: #fff7d1;
    }
}

* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    min-width: 320px;
    background-color: var(--backdrop);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

body.deadparrot-default-backdrop {
    background-image: linear-gradient(
        90deg,
        #8fb7f0 0 24%,
        #92d5c7 24% 43%,
        #e8f0ee 43% 61%,
        #f0b0aa 61% 80%,
        #d990a9 80% 100%
    );
    background-attachment: fixed;
}

body.custom-background.deadparrot-custom-backdrop {
    background-attachment: fixed !important;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
}

a {
    color: var(--link);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 0.16rem solid var(--accent-blue);
    outline-offset: 0.18rem;
}

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

figure {
    margin: 1.65rem 0;
}

figcaption {
    margin-top: 0.45rem;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.82rem;
}

pre,
code,
kbd {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

code,
kbd {
    padding: 0.08em 0.24em;
    background: var(--code-bg);
    color: var(--code-text);
}

pre {
    overflow-x: auto;
    padding: 1rem;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--code-bg);
    color: var(--code-text);
}

blockquote {
    margin: 1.6rem 0;
    padding: 0.95rem 1.15rem;
    border-left: 0.85rem solid var(--rule);
    border-radius: 0 0.7rem 0.7rem 0;
    background: rgba(224, 244, 239, 0.88);
    color: var(--ink);
}

@media (prefers-color-scheme: dark) {
    blockquote {
        background: #403245;
        color: var(--text);
    }
}

hr {
    height: 0.25rem;
    margin: 1.7rem 0;
    border: 0;
    background: linear-gradient(90deg, var(--ink) 0 48%, transparent 48% 52%, var(--ink) 52% 100%);
}

table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

th,
td {
    padding: 0.48rem 0.4rem;
    border-bottom: 2px solid color-mix(in srgb, var(--rule), transparent 45%);
    text-align: left;
    vertical-align: top;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 10;
    transform: translateY(-150%);
    padding: 0.45rem 0.65rem;
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
}

.skip-link:focus {
    transform: translateY(0);
}

.permalink {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header,
.site-nav-wrap,
.site-main,
.site-footer-inner {
    width: min(var(--wide), calc(100vw - (var(--space) * 2)));
    margin-right: auto;
    margin-left: auto;
}

.site-header {
    padding: 0.45rem 0 0.6rem;
}

.site-header-inner {
    display: grid;
    gap: 0.75rem;
}

.site-brand {
    display: grid;
    grid-template-columns: 7.25rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.site-logo {
    width: 7.25rem;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid var(--ink);
    border-radius: 0.9rem;
    background: #050505;
    box-shadow: 0.28rem 0.28rem 0 rgba(0, 0, 0, 0.25);
}

.site-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    transform: scale(1.2);
}

.site-title {
    margin: -0.25rem 0 0;
    color: var(--title-red);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 8vw, 3.9rem);
    font-weight: 400;
    line-height: 0.95;
    -webkit-text-stroke: 0.035em var(--title-gold);
    paint-order: stroke fill;
    text-shadow:
        0.035em 0.035em 0 var(--title-shadow),
        -0.018em -0.018em 0 var(--title-gold),
        0.018em -0.018em 0 var(--title-gold),
        -0.018em 0.018em 0 var(--title-gold),
        0.018em 0.018em 0 var(--title-gold);
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-title a:hover,
.site-title a:focus {
    color: var(--link-hover);
    text-decoration: underline;
}

.site-description {
    max-width: 34rem;
    margin: 0.25rem 0 0.55rem;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.social-link {
    display: inline-grid;
    min-width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    padding: 0 0.35rem;
    border: 2px solid var(--ink);
    border-radius: 0.55rem;
    box-shadow: 0.18rem 0.18rem 0 rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.social-link svg {
    display: block;
    width: 1.45rem;
    height: 1.45rem;
    fill: currentColor;
}

.social-link:hover,
.social-link:focus {
    transform: translateY(-1px);
    color: #fff;
}

.social-link-disabled {
    opacity: 0.58;
    filter: saturate(0.75);
}

.social-link-mastodon {
    background: #5946d2;
}

.social-link-github {
    background: #151515;
}

.social-link-email {
    background: #087e89;
}

.social-link-rss {
    background: #f07913;
}

.site-nav-wrap {
    position: relative;
    margin-top: 0.2rem;
    border: 2px solid var(--rule);
    border-radius: 1rem 1rem 0.3rem 0.3rem;
    background: var(--paper);
    box-shadow: 0.45rem 0.45rem 0 rgba(0, 0, 0, 0.28);
}

.site-nav-wrap::before {
    content: "Navigation:";
    position: absolute;
    left: 0.7rem;
    top: -0.85rem;
    padding: 0.08rem 0.7rem;
    border: 2px solid var(--rule);
    border-radius: 0.85rem;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.2;
}

.site-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 1.45rem 0.6rem 0.6rem;
}

.site-nav {
    min-width: 0;
}

.site-nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    min-width: max-content;
    padding: 0;
    margin: 0;
    list-style: none;
    font-family: var(--font-ui);
    font-size: 0.86rem;
}

.site-nav-support {
    flex: 0 0 auto;
    margin-left: auto;
}

.site-nav-list a {
    display: block;
    padding: 0.34rem 0.7rem;
    border: 1px solid var(--ink);
    border-radius: 0.75rem;
    background: var(--paper-soft);
    box-shadow: 0.22rem 0.22rem 0 rgba(0, 0, 0, 0.35);
    color: var(--link);
    text-decoration: none;
}

.site-nav-list a::before {
    content: ">";
    margin-right: 0.35rem;
    color: var(--ink);
}

.site-nav-list a:hover,
.site-nav-list a:focus,
.site-nav-list .current-menu-item > a {
    background: var(--accent-yellow);
    color: var(--ink);
}

.site-main {
    padding: 1.25rem 0 3rem;
}

.section-header,
.post-summary,
.entry,
.empty-state,
.archive-header {
    border: 2px solid var(--rule);
    border-radius: 0.15rem;
    background: var(--paper);
    box-shadow: 0.3rem 0.3rem 0 rgba(0, 0, 0, 0.24);
}

.section-header {
    margin-bottom: 0.9rem;
    padding: 0.8rem 0.9rem;
}

.section-header h2,
.section-header p {
    margin: 0;
}

.section-header h2 {
    color: var(--link);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.45rem, 4vw, 1.9rem);
    line-height: 1.1;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.12em;
}

.section-header > p:last-child {
    margin-top: 0.35rem;
}

.eyebrow {
    color: var(--link-hover);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.listing {
    display: grid;
    gap: 0.95rem;
}

.post-summary,
.entry,
.empty-state,
.archive-header {
    position: relative;
    padding: 0.95rem 1rem 1.1rem;
}

.entry-page {
    margin-bottom: 0.95rem;
    max-width: none;
}

.entry-page .entry-content {
    max-width: var(--measure);
}

.post-summary::before,
.entry::before,
.empty-state::before,
.archive-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.38rem;
    background: var(--accent-red);
}

.post-summary:nth-child(4n + 2)::before {
    background: var(--accent-blue);
}

.post-summary:nth-child(4n + 3)::before {
    background: var(--accent-green);
}

.post-summary:nth-child(4n + 4)::before {
    background: var(--accent-orange);
}

.entry {
    max-width: var(--measure);
}

.entry-single {
    max-width: none;
}

.entry-single .entry-header,
.entry-single .entry-content {
    max-width: var(--measure);
}

.entry.entry-page {
    max-width: none;
}

.entry-header {
    margin-bottom: 1.15rem;
}

.entry-title,
.archive-header h1,
.empty-state h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.55rem, 5vw, 2.25rem);
    line-height: 1.1;
}

.post-summary .entry-title,
.archive-header h1 {
    font-size: clamp(1.35rem, 4vw, 1.7rem);
}

.entry-title a {
    color: var(--link);
}

.entry-title a:hover,
.entry-title a:focus {
    color: var(--link-hover);
}

.entry-meta,
.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem 0.4rem;
    margin-top: 0.45rem;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.84rem;
}

.entry-tags span {
    font-weight: 800;
}

.entry-summary {
    margin-top: 0.8rem;
}

.entry-summary p,
.entry-content p {
    margin: 0 0 1.1rem;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 1.7rem 0 0.65rem;
    color: var(--ink);
    font-family: var(--font-ui);
    line-height: 1.2;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    font-family: var(--font-display);
    font-weight: 400;
}

.entry-content h1 {
    font-size: 1.75rem;
}

.entry-content h2 {
    font-size: 1.45rem;
}

.entry-content h3 {
    font-size: 1.22rem;
}

.entry-content h4 {
    font-size: 1.05rem;
}

.entry-content h5,
.entry-content h6 {
    color: var(--muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.15rem;
    padding-left: 1.35rem;
}

.entry-content li + li {
    margin-top: 0.28rem;
}

.entry-content a {
    overflow-wrap: break-word;
}

.entry-content strong {
    font-weight: 800;
}

.entry-content em {
    font-style: italic;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content pre {
    margin: 1.4rem 0;
}

.entry-content table {
    font-size: 0.95rem;
}

.entry-content figure img,
.entry-content p img {
    display: block;
}

.entry-content img {
    border: 2px solid var(--rule);
}

.entry-content figure img {
    margin-right: auto;
    margin-left: auto;
}

.entry-content .alignwide {
    width: min(var(--wide), calc(100vw - (var(--space) * 2)));
    max-width: none;
}

.share-post {
    max-width: var(--measure);
    margin-top: 1.65rem;
    padding-top: 1rem;
    border-top: 2px dashed color-mix(in srgb, var(--rule), transparent 25%);
}

.share-post h2 {
    margin: 0 0 0.65rem;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.86rem;
    font-weight: 800;
}

.share-post-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.share-post-link {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 0.65rem;
    background: var(--paper-soft);
    box-shadow: 0.18rem 0.18rem 0 rgba(0, 0, 0, 0.35);
}

.share-post-link:hover,
.share-post-link:focus {
    transform: translateY(-1px);
}

.share-post-link img {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.35rem;
    object-fit: cover;
}

.archive-header {
    max-width: var(--measure);
    margin-bottom: 1rem;
}

.archive-description {
    color: var(--muted);
}

.topic-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.7rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.topic-item a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    min-height: 3.6rem;
    padding: 0.75rem 0.8rem;
    border: 2px solid var(--rule);
    border-radius: 0.15rem;
    background: var(--paper);
    box-shadow: 0.22rem 0.22rem 0 rgba(0, 0, 0, 0.22);
    color: var(--link);
    font-family: var(--font-ui);
    font-weight: 800;
    text-decoration: none;
}

.topic-item a:hover,
.topic-item a:focus {
    background: var(--paper-soft);
    color: var(--link-hover);
}

.topic-name::before {
    content: "#";
    color: var(--accent-red);
}

.topic-name {
    overflow-wrap: break-word;
}

.topic-count {
    flex: 0 0 auto;
    align-self: start;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.chronological-archive {
    display: grid;
    gap: 0.95rem;
    max-width: none;
}

.archive-year {
    padding: 0.95rem 1rem 1.1rem;
    border: 2px solid var(--rule);
    border-radius: 0.15rem;
    background: var(--paper);
    box-shadow: 0.3rem 0.3rem 0 rgba(0, 0, 0, 0.24);
}

.archive-year h2,
.archive-month h3 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
}

.archive-year h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.archive-month {
    margin-top: 0.95rem;
}

.archive-month h3 {
    color: var(--link-hover);
    font-size: 1rem;
    text-transform: uppercase;
}

.archive-post-list {
    padding: 0;
    margin: 0.35rem 0 0;
    list-style: none;
}

.archive-post-item {
    display: grid;
    grid-template-columns: 4.1rem minmax(0, 1fr);
    gap: 0.25rem 0.7rem;
    padding: 0.5rem 0;
    border-top: 1px solid color-mix(in srgb, var(--rule), transparent 50%);
    font-family: var(--font-ui);
    font-size: 0.86rem;
}

.archive-post-item time {
    color: var(--muted);
}

.archive-post-item > a {
    font-weight: 800;
}

.archive-post-tags {
    grid-column: 2;
    color: var(--muted);
    font-size: 0.78rem;
}

.post-nav,
.pagination .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--measure);
    margin-top: 1.2rem;
    padding: 0.8rem 0.9rem;
    border: 2px solid var(--rule);
    border-radius: 0.15rem;
    background: var(--paper);
    box-shadow: 0.3rem 0.3rem 0 rgba(0, 0, 0, 0.24);
    font-family: var(--font-ui);
    font-size: 0.86rem;
}

.post-nav div:last-child {
    margin-left: auto;
    text-align: right;
}

.page-numbers {
    display: inline-block;
    margin-right: 0.45rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.search-field {
    min-width: 0;
    flex: 1;
}

.search-field,
.search-submit {
    padding: 0.55rem 0.65rem;
    border: 2px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper-soft);
    color: var(--text);
    font: inherit;
}

.search-submit {
    cursor: pointer;
    background: var(--accent-blue);
    color: #fff;
    font-family: var(--font-ui);
    font-weight: 800;
}

.search-submit:hover,
.search-submit:focus {
    background: var(--link-hover);
}

.site-footer {
    padding: 0 0 2rem;
}

.site-footer-inner {
    padding: 0.75rem 0 0;
    border-top: 2px solid rgba(0, 0, 0, 0.35);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.8rem;
}

.site-footer-inner p {
    margin: 0;
}

.identity-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    padding: 0;
    margin: 0.65rem 0 0;
    list-style: none;
}

.wp-caption,
.wp-caption-text,
.gallery-caption,
.bypostauthor {
    max-width: 100%;
}

.alignleft {
    float: left;
    margin: 0.4rem 1rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.4rem 0 1rem 1rem;
}

.aligncenter {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 46rem) {
    html {
        font-size: 17px;
    }

    .site-header {
        padding-top: 0.35rem;
    }

    .site-nav-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav-support {
        margin-left: 0;
    }

    .site-brand {
        grid-template-columns: 5.2rem minmax(0, 1fr);
        gap: 0.65rem;
    }

    .site-logo {
        width: 5.2rem;
        border-radius: 0.7rem;
    }

    .site-title {
        margin-top: -0.05rem;
    }

    .site-description {
        font-size: 0.78rem;
    }

    .social-link {
        min-width: 2.05rem;
        height: 2.05rem;
        font-size: 0.72rem;
    }

    .site-nav-inner {
        padding-top: 1.35rem;
    }

    .site-main {
        padding-top: 1rem;
    }

    .post-summary,
    .entry,
    .empty-state,
    .archive-header {
        padding: 0.85rem 0.8rem 1rem;
    }

    .search-form,
    .post-nav {
        display: block;
    }

    .search-submit {
        width: 100%;
        margin-top: 0.5rem;
    }

    .post-nav div + div {
        margin-top: 0.85rem;
        text-align: left;
    }

    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin: 1rem 0;
    }
}
