:root {
    --bg: #0a0a0a;
    --bg-elev: #141414;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --accent: #c9a47a;
    --accent-strong: #d8b48a;
    --accent-soft: rgba(201, 164, 122, 0.35);
    --accent-ink: #1a1208;
    --radius: 14px;
    --max-w: 720px;
    --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 600;
    z-index: 100;
    transition: top 120ms ease;
}

.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 30;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #0c1a3a;
}

.site-brand-name {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.site-menu-toggle {
    background: transparent;
    border: 0;
    padding: 8px;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.site-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ---------- Nav drawer ---------- */
.site-nav {
    position: fixed;
    inset: 0;
    background: var(--bg);
    padding: 96px 28px 32px;
    z-index: 20;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.site-nav-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 540px;
}

.site-nav a {
    display: block;
    font-family: var(--serif);
    font-size: 32px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.site-nav-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 36px;
    line-height: 1;
    padding: 8px 14px;
    cursor: pointer;
}

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

/* ---------- Hero ---------- */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 40px 22px 72px;
    text-align: center;
}

.hero-wordmark {
    width: min(440px, 82%);
    margin: 8px auto 36px;
}

.hero-headline {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(40px, 7.5vw, 60px);
    line-height: 1.05;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.hero-accent { color: var(--accent); }

.hero-sub {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.55;
    max-width: 640px;
    margin: 0 auto 36px;
}

/* ---------- Signup ---------- */
.signup {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
}

.signup input[type="email"] {
    width: 100%;
    padding: 16px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 120ms ease;
}

.signup input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.45); }
.signup input[type="email"]:focus { border-color: var(--accent); }

.signup button {
    width: 100%;
    padding: 16px 18px;
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background 120ms ease;
}

.signup button:hover { background: var(--accent-strong); }

.signup-message {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    min-height: 1em;
}

/* ---------- Buckets ---------- */
.buckets { margin-top: 64px; }

.buckets-eyebrow {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 18px;
}

.buckets-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
}

.buckets-list li {
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: 0.02em;
    color: var(--accent);
    padding: 8px 18px;
    border: 1px solid var(--accent-soft);
    border-radius: 999px;
}

/* ---------- Recent ---------- */
.recent {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 22px 80px;
}

.recent h2 {
    font-family: var(--serif);
    font-size: 28px;
    margin: 0 0 24px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.recent-card {
    display: block;
    padding: 22px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 150ms ease, border-color 150ms ease;
}

.recent-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-soft);
}

.recent-card-date {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.recent-card h3 {
    font-family: var(--serif);
    font-size: 20px;
    margin: 8px 0 10px;
    line-height: 1.2;
}

.recent-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ---------- Post / Page ---------- */
.post, .page {
    max-width: min(92vw, 880px);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 56px) clamp(20px, 3.5vw, 32px) 64px;
}

.post-header { text-align: center; margin-bottom: 32px; }
.post-meta { color: var(--text-muted); font-size: 13px; margin: 0; letter-spacing: 0.04em; text-transform: uppercase; }

.post h1, .page h1 {
    font-family: var(--serif);
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.15;
    margin: 10px 0 14px;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: clamp(17px, 0.3vw + 16px, 20px);
    line-height: 1.5;
    margin: 0;
}

.post-feature {
    border-radius: var(--radius);
    margin: 24px 0 8px;
    width: 100%;
    height: auto;
}

.post-feature-caption {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 24px;
}

.post-content, .page-content {
    font-size: clamp(16px, 0.35vw + 15px, 19px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.post-content a, .page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content img,
.page-content img { border-radius: var(--radius); margin: 18px 0; }

.post-content blockquote,
.page-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 24px 0;
    padding: 4px 0 4px 20px;
    color: var(--text-muted);
    font-style: italic;
}

.post-content code,
.page-content code {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 14px;
}

/* ---------- Post CTA ---------- */
.post-cta {
    max-width: 520px;
    margin: 0 auto 80px;
    padding: 0 22px;
    text-align: center;
}

.post-cta h2 {
    font-family: var(--serif);
    font-size: 30px;
    margin: 0 0 6px;
}

.post-cta p {
    color: var(--text-muted);
    margin: 0 0 18px;
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 32px 22px 48px;
    color: var(--text-muted);
}

/* ---------- Koenig editor card widths ---------- */
.post-content .kg-width-wide,
.page-content .kg-width-wide {
    position: relative;
    width: 85vw;
    max-width: 1040px;
    margin-left: 50%;
    transform: translateX(-50%);
}

.post-content .kg-width-full,
.page-content .kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.post-content .kg-width-full img,
.page-content .kg-width-full img,
.post-content .kg-width-wide img,
.page-content .kg-width-wide img {
    width: 100%;
}

.kg-image-card figcaption,
.kg-embed-card figcaption,
.kg-gallery-card figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

.kg-bookmark-card {
    width: 100%;
}

.kg-bookmark-container {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elev);
    color: var(--text);
    text-decoration: none;
}

.kg-bookmark-content {
    flex: 1 1 auto;
    padding: 18px 20px;
}

.kg-bookmark-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.kg-bookmark-description {
    color: var(--text-muted);
    font-size: 14px;
}

.kg-bookmark-thumbnail img {
    width: 160px;
    height: 100%;
    object-fit: cover;
}
