:root {
    color-scheme: light;
    --site-bg: #ffffff;
    --site-surface: #ffffff;
    --site-text: #262626;
    --site-muted: #6f6f6f;
    --site-heading: #111111;
    --site-accent: #0f766e;
    --site-border: #e5e5e5;
    --site-radius: 6px;
    --site-width: 760px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--site-bg);
    color: var(--site-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.68;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--site-accent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: 0;
    transform: translateY(-120%);
    border-radius: var(--site-radius);
    padding: 0.5rem 0.75rem;
    background: var(--site-heading);
    color: var(--site-bg);
}

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

.site-header {
    border-bottom: 1px solid var(--site-border);
}

.site-footer {
    border-top: 1px solid var(--site-border);
}

.site-header-inner,
.site-footer-inner,
.site-main {
    width: min(calc(100% - 2rem), var(--site-width));
    margin: 0 auto;
}

.site-header-inner,
.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-branding {
    display: grid;
    gap: 0.1rem;
}

.site-title {
    color: var(--site-heading);
    font-size: 1.05rem;
    font-weight: 750;
    text-decoration: none;
}

.site-footer p,
.post-card p,
.post-header p {
    margin: 0;
    color: var(--site-muted);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.site-nav a {
    color: var(--site-text);
    font-size: 0.95rem;
    font-weight: 650;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--site-accent);
}

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

.post-section {
    display: grid;
    gap: 1rem;
}

.post-section h1,
.post-header h1 {
    margin: 0;
    color: var(--site-heading);
    line-height: 1.12;
}

.post-header {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.post-header img,
.post-card img {
    border-radius: var(--site-radius);
}

.post-header img {
    display: block;
    width: 100%;
    height: clamp(12rem, 42vw, 24rem);
    max-height: 24rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

.post-content > * + * {
    margin-top: 1rem;
}

.post-content img {
    display: block;
    width: auto;
    max-width: min(100%, 32rem);
    max-height: 30rem;
    margin-right: auto;
    margin-left: auto;
    border-radius: var(--site-radius);
    object-fit: contain;
}

.post-content img[src$="#small"] {
    max-width: min(100%, 18rem);
    max-height: 18rem;
}

.post-content img[src$="#medium"] {
    max-width: min(100%, 32rem);
    max-height: 30rem;
}

.post-content img[src$="#large"] {
    max-width: min(100%, 44rem);
    max-height: 36rem;
}

.post-content img[src$="#full"] {
    width: 100%;
    max-width: 100%;
    max-height: 42rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-card h2 {
    color: var(--site-heading);
    line-height: 1.2;
}

.post-content pre,
.post-content code {
    border-radius: var(--site-radius);
    background: #f6f6f6;
}

.post-content code {
    padding: 0.12rem 0.25rem;
}

.post-content pre {
    overflow-x: auto;
    padding: 1rem;
}

.post-content pre code {
    padding: 0;
    background: transparent;
}

.post-list {
    display: grid;
    gap: 1rem;
}

.post-card {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius);
    padding: 1rem;
    background: var(--site-surface);
}

.post-card img {
    display: block;
    width: 100%;
    height: clamp(9rem, 42vw, 12rem);
    max-height: 12rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
}

.post-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.post-card time {
    color: var(--site-muted);
    font-size: 0.9rem;
}

@media (min-width: 760px) {
    .post-card {
        grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
        align-items: start;
    }

    .post-card img {
        width: 10rem;
        height: 6.25rem;
        max-height: none;
    }

    .post-card:not(:has(img)) {
        grid-template-columns: 1fr;
    }
}
