:root {
    --bg: #fafafa;
    --text: #252525;
    --muted: #707070;
    --border: #e7e7e7;
    --link: #2563eb;
    --code-bg: #f1f1f1;
    --max-width: 720px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
}

.site-header {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.site-header a {
    color: var(--text);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.article {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 72px 0 100px;
}

.article-header {
    margin-bottom: 64px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-weight: 750;
}

.intro {
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
}

.meta {
    margin-top: 24px;
    color: var(--muted);
    font-size: 0.88rem;
}

.article-content h2 {
    margin: 56px 0 18px;
    font-size: 1.65rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.article-content h3 {
    margin: 36px 0 14px;
    font-size: 1.2rem;
    line-height: 1.35;
}

.article-content p {
    margin: 0 0 22px;
    font-size: 1rem;
}

.article-content ul,
.article-content ol {
    margin: 0 0 28px;
    padding-left: 25px;
}

.article-content li {
    margin: 7px 0;
}

.article-content strong {
    font-weight: 650;
}

.article-content blockquote {
    margin: 36px 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--border);
    color: #555;
    font-size: 1.08rem;
}

.article-content code {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--code-bg);
    font-size: 0.9em;
}

.article-content pre {
    overflow-x: auto;
    margin: 28px 0;
    padding: 18px;
    border-radius: 8px;
    background: #f1f1f1;
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 36px auto;
    border-radius: 8px;
}

.article-content hr {
    margin: 48px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.article-footer {
    margin-top: 72px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
}

/* Blog index */

.blog-index {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 72px 0 100px;
}

.index-header {
    margin-bottom: 60px;
}

.index-header h1 {
    margin-bottom: 20px;
}

.index-header p:last-child {
    max-width: 600px;
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.post-list {
    display: flex;
    flex-direction: column;
}

.post {
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

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

.post-date {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.post h2 {
    margin: 0 0 10px;
    font-size: 1.45rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.post h2 a {
    color: var(--text);
}

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

.post-description {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.post-category {
    display: inline-block;
    margin-top: 14px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.article-content table {
    width: 100%;
    margin: 32px 0;
    border-collapse: collapse;
    font-size: 0.94rem;
    border-top: 1px solid var(--border);
}

.article-content th,
.article-content td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.article-content th {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.article-content th:not(:first-child),
.article-content td:not(:first-child) {
    text-align: center;
}

.cta {
    margin: 64px 0 0;
    padding: 42px 32px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.cta h2 {
    margin: 0 0 12px;
    font-size: 1.45rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.cta p {
    max-width: 620px;
    margin: 0 auto 24px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.button {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 7px;
    background: var(--text);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.button:hover {
    opacity: 0.88;
    text-decoration: none;
}

@media (max-width: 600px) {
    .cta {
        margin-top: 48px;
        padding: 30px 20px;
    }
}

@media (max-width: 600px) {
    .article-content table {
        font-size: 0.85rem;
    }

    .article-content th,
    .article-content td {
        padding: 11px 8px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 22px 0;
    }

    .article,
    .blog-index {
        padding: 48px 0 72px;
    }

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

    h1 {
        font-size: 2.35rem;
    }

    .intro {
        font-size: 1.05rem;
    }

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