:root {
    color-scheme: light dark;

    --bg: #ffffff;
    --text: #171717;
    --muted: #666666;
    --border: #e5e5e5;
    --surface: #f7f7f7;
    --accent: #2563eb;
    --accent-soft: #dbeafe;

    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0a0a;
        --text: #f5f5f5;
        --muted: #a3a3a3;
        --border: #262626;
        --surface: #171717;
        --accent: #60a5fa;
        --accent-soft: #172554;
    }
}

* {
    box-sizing: border-box;
}

html {
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.site {
    width: min(760px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 4rem;
}

.site-title {
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.site-description {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.hero .eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 10vw, 5rem);
    line-height: 0.95;
}

.hero p {
    max-width: 58ch;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.post-list {
    display: grid;
    gap: 0;
}

.post-card {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.post-card:first-child {
    padding-top: 0;
}

.post-card-meta,
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.post-card-title {
    margin: 0.5rem 0 0;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.post-card-title a {
    text-decoration: none;
}

.post-card-title a:hover {
    text-decoration: underline;
}

.tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.back-link {
    display: inline-flex;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent);
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(2.5rem, 9vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.075em;
}

.post-header .post-meta {
    margin-top: 1.25rem;
}

.post-content {
    font-size: 1.075rem;
}

.post-content > * {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.post-content > * + h2,
.post-content > * + h3,
.post-content > * + h4 {
    margin-top: 2.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.post-content h2 {
    font-size: 1.75rem;
}

.post-content h3 {
    font-size: 1.35rem;
}

.post-content p,
.post-content li {
    max-width: 68ch;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
}

.post-content li + li {
    margin-top: 0.4rem;
}

.post-content blockquote {
    margin-left: 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
}

.post-content pre {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--surface);
}

.post-content code {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", monospace;
    font-size: 0.92em;
}

.post-content :not(pre) > code {
    border-radius: 0.35rem;
    padding: 0.15rem 0.35rem;
    background: var(--surface);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.post-content hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.empty-state {
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    color: var(--muted);
    background: var(--surface);
}

@media (max-width: 640px) {
    .site {
        padding-top: 1.5rem;
    }

    .site-header {
        display: block;
        margin-bottom: 3rem;
    }

    .post-header h1 {
        max-width: none;
    }
}
