:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-muted: #666666;
    --color-accent: #2563eb;
    --color-border: #e5e7eb;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    --max-width: 720px;
    --max-width-wide: 960px;
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    width: min(100% - 2rem, var(--max-width-wide));
    margin-inline: auto;
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-text);
    text-decoration: none;
}

.site-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.9375rem;
}

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

/* Hero */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--color-muted);
    margin: 0;
}

.wireframe-hero {
    position: relative;
    height: 180vh;
    min-height: 900px;
    background:
        radial-gradient(circle at 72% 45%, rgba(37, 99, 235, 0.08), transparent 34%),
        var(--color-bg);
    overflow: clip;
}

.wireframe-hero__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 600px;
    display: grid;
    align-items: center;
}

.wireframe-hero__copy {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.wireframe-hero__copy > * {
    max-width: 420px;
}

.wireframe-hero__copy h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(3.5rem, 9vw, 8rem);
    line-height: 0.88;
    letter-spacing: -0.075em;
}

.wireframe-hero__eyebrow,
.wireframe-hero__hint {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wireframe-hero__hint {
    margin-top: 2.5rem;
    color: var(--color-muted);
}

.wireframe-hero__hint::before {
    content: "";
    display: inline-block;
    width: 2.5rem;
    height: 1px;
    margin-right: 0.75rem;
    vertical-align: middle;
    background: currentColor;
}

.wireframe-hero__credit {
    position: absolute;
    top: calc(50vh + 15rem);
    margin: 0;
    color: var(--color-muted);
    font-size: 0.65rem;
    pointer-events: auto;
}

.wireframe-hero__credit a {
    color: inherit;
}

.wireframe-hero__scene {
    position: absolute;
    z-index: 1;
    inset: 0;
}

.wireframe-hero__scene canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Post feed */
.post-feed {
    display: grid;
    gap: 2rem;
    padding: 2rem 0 4rem;
}

.post-card a {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card a:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.post-card-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.post-card-title {
    font-size: 1.375rem;
    margin: 0 0 0.5rem;
}

.post-card-excerpt {
    color: var(--color-muted);
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
}

.post-card-date {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

/* Single post / page */
.site-main.container {
    max-width: var(--max-width);
    padding: 3rem 1rem 4rem;
}

.post-header,
.page-header {
    margin-bottom: 2rem;
}

.post-header h1,
.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.post-tag {
    color: var(--color-accent);
}

.post-feature-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Ghost editor content */
.gh-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.gh-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.gh-content pre code {
    background: none;
    padding: 0;
}

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

.gh-content a {
    color: var(--color-accent);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.site-footer p {
    margin: 0.25rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0 3rem;
}

.pagination a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9375rem;
}

@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav ul {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .wireframe-hero {
        height: 160vh;
        min-height: 760px;
    }

    .wireframe-hero__sticky {
        align-items: end;
        padding-bottom: 8vh;
    }

    .wireframe-hero__copy h1 {
        font-size: clamp(3rem, 17vw, 5rem);
    }

    .wireframe-hero__scene {
        inset: 0 0 26% 0;
    }

    .wireframe-hero__hint {
        margin-top: 1.25rem;
    }

    .wireframe-hero__credit {
        position: static;
        margin-top: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wireframe-hero {
        height: 100vh;
        min-height: 650px;
    }

    .wireframe-hero__hint {
        display: none;
    }
}
