@import url('https://fonts.googleapis.com/css2?family=Oxygen+Mono&family=Oxygen:wght@300;400;700&display=swap');

:root {
    --background: #161616;
    --text: #d4d4d4;
    --muted: #707070;
    --border: #707070;
    --link: #d4d4d4;
    --link-hover: #707070;
    --code-background: #0f0f0f;

    --font: "Oxygen", sans-serif;
    --mono: "Oxygen Mono", monospace;
    --font-size: 16px;
    --line-height: 1.65;

    --page-width: 760px;
    --page-padding: 24px;
    --post-gap: 20px;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: var(--font-size);
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font);
    line-height: var(--line-height);
}

a {
    color: var(--link);
    text-decoration: none;
}

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

.site {
    width: min(100%, var(--page-width));
    margin: 0 auto;
    padding: 64px var(--page-padding);
}

.site-header {
    margin-bottom: 48px;
}

.site-header h1,
.post-header h1 {
    margin: 0 0 8px;
    line-height: 1.2;
}

.site-header h1 {
    font-size: 2rem;
}

.site-header p,
.post-description,
.post-header time,
.post-item time,
.post-item p,
.empty {
    color: var(--muted);
}

.site-header p,
.post-description,
.post-item p {
    margin: 0;
}

.post-link {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding: var(--post-gap) 0;
    cursor: pointer;
}

.post-info {
    min-width: 0;
}

.post-item h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.post-item p,
.post-item time {
    font-size: 0.875rem;
}

.post-item time {
    flex: 0 0 auto;
    white-space: nowrap;
}

.pin {
    margin-right: 0.3em;
    font-size: 0.8em;
    vertical-align: 0.08em;
}

.back {
    display: inline-block;
    margin-bottom: 40px;
    color: var(--muted);
    font-size: 0.875rem;
    cursor: pointer;
}

.post-header {
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: 2.15rem;
}

.post-description {
    margin-top: 12px;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content pre,
.post-content blockquote {
    margin: 0 0 20px;
}

.post-content h2,
.post-content h3 {
    margin: 40px 0 12px;
    line-height: 1.25;
}

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 28px 0;
}

.post-content blockquote {
    padding-left: 18px;
    border-left: 3px solid var(--border);
    color: var(--muted);
}

code,
pre {
    font-family: var(--mono);
    font-size: 12px;
}

code {
    background: var(--code-background);
}

pre {
    overflow-x: auto;
    padding: 16px;
    background: var(--code-background);
    border-radius: var(--radius);
}

pre code {
    background: none;
}

.site-footer {
    width: min(100%, var(--page-width));
    margin: 0 auto;
    padding: 0 var(--page-padding) 40px;
    color: var(--muted);
    font-size: 0.8rem;
}

.site-footer a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer a:hover {
    color: var(--text);
}

@media (max-width: 600px) {
    .site {
        padding-top: 40px;
    }

    .post-link {
        display: block;
    }

    .post-item time {
        display: block;
        margin-top: 8px;
    }
}

main.site {
    view-transition-name: page;
}

::view-transition-old(page) {
    animation: 120ms ease-in both page-out;
}

::view-transition-new(page) {
    animation: 180ms ease-out both page-in;
}

@keyframes page-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-3px);
    }
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(page),
    ::view-transition-new(page) {
        animation: none;
    }
}