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

:root {
    --color-text:    #1d1d1f;
    --color-muted:   #86868b;
    --color-accent:  #0066cc;
    --color-divider: #d2d2d7;
    --color-bg:      #ffffff;
    --color-panel:   #f5f5f7;
    --font-sans:     'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --width-reading: 680px;
    --width-wide:    980px;
}

html {
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.47;
    color: var(--color-text);
    background: var(--color-bg);
    font-feature-settings: "kern" 1, "liga" 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
h1 { font-size: 3rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; margin-top: 3rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; letter-spacing: -0.015em; margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; letter-spacing: -0.01em; margin-top: 1.5rem; }
p { margin-bottom: 1.25rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}
a:hover { opacity: 0.7; }

strong { font-weight: 600; }

.container {
    max-width: var(--width-reading);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}
.container-wide {
    max-width: var(--width-wide);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}
main {
    flex: 1;
    padding: 6rem 0;
}

.site-nav {
    border-bottom: 1px solid var(--color-divider);
    padding: 1rem 0;
}
.site-nav .container-wide {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-nav a.brand {
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}
.site-nav a.brand:hover { opacity: 1; }
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.site-nav ul a {
    color: var(--color-text);
    font-size: 0.875rem;
}

.intro { margin-bottom: 6rem; }
.intro h1 {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.intro p {
    font-size: 1.375rem;
    line-height: 1.3;
    color: var(--color-muted);
    max-width: 32em;
}

.post-list { list-style: none; }
.post-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-divider);
}
.post-list li:first-child { border-top: 1px solid var(--color-divider); }
.post-list a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    color: var(--color-text);
}
.post-list a:hover { opacity: 1; }
.post-list a:hover .title { color: var(--color-accent); }
.post-list .title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}
.post-list time {
    color: var(--color-muted);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

article .post-header { margin-bottom: 3rem; }
article .post-header h1 {
    font-size: 3rem;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}
article .post-header .meta {
    color: var(--color-muted);
    font-size: 0.9375rem;
}
article .post-content { font-size: 1.0625rem; line-height: 1.6; }
article .post-content p + p { margin-top: 1.25rem; }
article .post-content ul,
article .post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
article .post-content li {
    margin-bottom: 0.375rem;
    padding-left: 0.25rem;
}
article .post-content blockquote {
    border-left: 2px solid var(--color-text);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 300;
}
article .post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
}

code {
    font-family: ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
    background: var(--color-panel);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}
pre {
    background: var(--color-panel);
    border-radius: 12px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.55;
    font-size: 0.9375rem;
}
pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

footer {
    border-top: 1px solid var(--color-divider);
    padding: 3rem 0;
    color: var(--color-muted);
    font-size: 0.8125rem;
    text-align: center;
}
footer a { color: var(--color-muted); }
footer a:hover { color: var(--color-text); opacity: 1; }

@media (max-width: 640px) {
    html { font-size: 16px; }
    h1 { font-size: 2.25rem; }
    .intro h1 { font-size: 2.5rem; }
    article .post-header h1 { font-size: 2.25rem; }
    .intro p, article .subtitle { font-size: 1.125rem; }
    .post-list a { flex-direction: column; gap: 0.25rem; }
    .post-list time { order: -1; font-size: 0.8125rem; }
    main { padding: 3rem 0; }
}
