html {
    width: 100%;
    margin: 0;
}

body {
    width: 90%;
    max-width: 1024px;
    margin: 0 auto;

    font-family: serif;
}

body {
    color: #222;
    background: #fcfcfa;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -moz-font-feature-settings: "liga" on;
    line-height: 1.75;
}

.page-shell-post {
    width: min(96vw, 1440px);
    max-width: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #222;
}

.font-sans {
    font-family: sans-serif;
}

*:link, a {
    color: inherit;
    outline: none;
    text-decoration: none;
    transition: color 160ms ease, opacity 160ms ease, text-decoration-color 160ms ease;
}

*:visited {
    color: inherit;
}

a:hover {
    color: #111;
    text-decoration: underline;
    text-decoration-color: rgba(34, 34, 34, 0.28);
    text-underline-offset: 0.16em;
}

a:focus-visible {
    outline: 2px solid rgba(34, 34, 34, 0.28);
    outline-offset: 2px;
    border-radius: 2px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 10px 0 14px;
    border-bottom: 1px solid rgba(34, 34, 34, 0.08);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    font-size: 14px;
    list-style: none;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    transition: transform 120ms ease-out, opacity 120ms ease-out;
}

.nav-logo:hover {
    transform: scale(1.03);
    opacity: 0.92;
}

.nav-logo img {
    display: block;
    max-height: 40px;
    width: auto;
    border-radius: 50%;
}

.site-title {
    display: inline-block;
    margin: 0;
    color: #1f1f1f;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
}

.nav-links li {
    display: flex;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none;
}

.nav-links a:hover {
    background: rgba(34, 34, 34, 0.06);
    text-decoration: none;
}

.listing-page {
    margin: 28px 0 48px;
}

.page-head {
    margin-bottom: 22px;
}

.page-head-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.page-head-main {
    min-width: 0;
}

.page-eyebrow {
    margin: 0 0 6px;
    color: #777;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.page-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.page-overview {
    margin: 12px 0 0;
    color: #555;
    line-height: 1.7;
}

.page-overview a {
    text-decoration: underline;
    text-decoration-color: rgba(34, 34, 34, 0.18);
    text-underline-offset: 0.15em;
}

.index-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 2px 0 0;
    padding: 0;
    border: 1px solid rgba(34, 34, 34, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: #444;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.index-group-toggle:hover {
    background: rgba(34, 34, 34, 0.06);
    border-color: rgba(34, 34, 34, 0.2);
}

.index-group-toggle[aria-pressed="true"] {
    background: rgba(34, 34, 34, 0.08);
    border-color: rgba(34, 34, 34, 0.22);
}

.index-group-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.index-group-toggle-icon span {
    display: block;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

[data-group-by-year="true"] [data-flat-post-list] {
    display: none;
}

[data-group-by-year="false"] [data-grouped-post-list] {
    display: none;
}

.year-group + .year-group {
    margin-top: 28px;
}

.year-group-title {
    margin: 0 0 10px;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.3;
}

.listing-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.listing-list li {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    text-overflow: ellipsis;

    justify-content: space-between;
    margin: 4px 0;
    padding: 7px 0;
    border-bottom: 1px solid rgba(34, 34, 34, 0.08);
    transition: background 220ms ease, border-color 220ms ease;
}

.listing-list li:hover {
    background: rgba(200, 217, 232, 0.5);
    border-bottom-color: rgba(34, 34, 34, 0.16);
}

.listing-list li > a {
    display: block;
    font-weight: 500;
    line-height: 1.5;
}

.archive-links {
    display: block;
    font-weight: 500;
    line-height: 1.5;
}

.archive-links a {
    font-weight: inherit;
}

.listing-list .post-date,
#archive-list .archive-count {
    color: #9b9b9b;
    font-size: 80%;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#archive-list .archive-count {
    color: #999;
}

footer {
    margin-top: 40px;
    border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.copyright {
    padding: 22px 0 28px;
    display: flex;
    justify-content: center;
    gap: 8px;

    color: #888;
    font-size: 80%;
    text-align: center;
}

@media (max-width: 900px) {
    body {
        width: min(92vw, 960px);
    }

    .page-shell-post {
        width: min(95vw, 1200px);
    }

    .header {
        gap: 14px;
    }

    .listing-page {
        margin: 24px 0 40px;
    }

    .page-head {
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 1.85rem;
    }
}

@media (max-width: 640px) {
    body {
        width: calc(100% - 32px);
    }

    .page-shell-post {
        width: calc(100% - 24px);
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 0 12px;
    }

    .nav {
        width: 100%;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-links a {
        padding: 6px 12px;
    }

    .listing-page {
        margin: 22px 0 36px;
    }

    .page-head {
        margin-bottom: 18px;
    }

    .page-head-with-toggle {
        gap: 12px;
    }

    .page-title {
        font-size: 1.68rem;
    }

    .page-overview {
        margin-top: 10px;
        font-size: 0.97rem;
        line-height: 1.65;
    }

    .site-title {
        font-size: 1.45rem;
    }

    .index-group-toggle {
        width: 32px;
        height: 32px;
    }

    .listing-list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin: 6px 0;
        padding: 10px 0;
    }

    #post-list .post-date,
    #archive-list .archive-count {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    footer {
        margin-top: 32px;
    }

    .copyright {
        flex-direction: column;
        gap: 4px;
        padding: 20px 0 24px;
        padding-bottom: 24px;
    }

    .copyright-sep {
        display: none;
    }
}

@media (max-width: 420px) {
    body {
        width: calc(100% - 24px);
    }

    .page-shell-post {
        width: calc(100% - 16px);
    }

    .site-title {
        font-size: 1.32rem;
    }

    .nav-links {
        font-size: 13px;
    }

    .nav-links a {
        padding: 5px 10px;
    }

    .page-eyebrow {
        font-size: 0.82rem;
    }

    .page-title {
        font-size: 1.48rem;
    }

    .page-head-with-toggle {
        gap: 10px;
    }

    .listing-list li > a {
        font-size: 0.98rem;
    }

    .archive-links {
        font-size: 0.98rem;
    }
}
