/* publicspace.net blog — shared styling for the jekyll blog.
   design tokens mirror mac.html so the blog matches the rest of the site. */

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

:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #6e6e73;
    --accent-blue: #0071e3;
    --accent-blue-hover: #0077ed;
    --border-color: #d2d2d7;
    --border-light: #e8e8ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.47059;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--accent-blue-hover);
}

/* navigation (matches mac.html) */
.nav-bar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand-name {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-brand-name a {
    color: inherit;
}

.nav-brand-tagline {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
    transition: color 0.2s ease;
}

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

/* article + index shared shell */
.blog-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 24px 24px;
}

/* ---------- post listing (index) ---------- */
.blog-index-header {
    margin-bottom: 40px;
}

.blog-index-header h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-index-header p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 19px;
}

.blog-year {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 36px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.post-list {
    list-style: none;
}

.post-list li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.post-list .post-date {
    flex: 0 0 56px;
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.post-list .post-link {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 400;
}

.post-list .post-link:hover {
    color: var(--accent-blue);
}

/* ---------- single post ---------- */
.post-header {
    margin-bottom: 32px;
}

.post-header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.post-meta {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

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

.post-meta a:hover {
    color: var(--accent-blue);
}

.post-content {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-primary);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 1.6em 0 0.5em;
}

.post-content h2 { font-size: 27px; font-weight: 600; }
.post-content h3 { font-size: 22px; font-weight: 600; }
.post-content h4 { font-size: 19px; font-weight: 600; }

.post-content p { margin: 0 0 1.2em; }

.post-content ul,
.post-content ol {
    margin: 0 0 1.2em 1.4em;
}

.post-content li { margin-bottom: 0.4em; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
    margin: 1.6em auto;
    box-shadow: var(--shadow-sm);
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--border-color);
    color: var(--text-tertiary);
}

.post-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    margin: 1.6em 0;
    font-size: 14px;
    line-height: 1.5;
}

.post-content code {
    font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: rgba(0,0,0,0.05);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.post-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.6em 0;
    font-size: 16px;
}

.post-content th,
.post-content td {
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    text-align: left;
}

.post-content th {
    background: var(--bg-primary);
    font-weight: 600;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 2em 0;
}

.post-footer-nav {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 15px;
}

/* footer (matches mac.html) */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 32px 40px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.footer-copyright {
    font-size: 13px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .nav-content { padding: 0 20px; }
    .nav-brand-tagline { display: none; }
    .blog-main { padding: 32px 20px 16px; }
    .blog-index-header h1 { font-size: 32px; }
    .post-header h1 { font-size: 28px; }
    .post-content { font-size: 18px; }
    .footer-content { flex-direction: column; gap: 16px; text-align: center; }
}
