:root {
    --ink: #1f1b16;
    --paper: #faf6ef;
    --accent: #b5542d;
    --muted: #8a8278;
    --line: #e3dccb;
    --card: #ffffff;
    --max-w: 980px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

header.site-header {
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
    background: var(--paper);
}

header.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-title {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.02em;
}

nav.site-nav a {
    margin-left: 20px;
    color: var(--ink);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

nav.site-nav a:first-child { margin-left: 0; }

nav.site-nav a.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

main { min-height: 60vh; padding: 48px 0 64px; }

footer.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

h1, h2, h3 { font-weight: normal; letter-spacing: 0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; margin-top: 3.5em; margin-bottom: 0.7em; }

.lede { color: var(--muted); font-size: 1.1rem; max-width: 620px; line-height: 1.7; }

/* A plain hairline rule between major sections of a page — more breathing
   room around content than a default <hr>, matching a calmer, gallery-like
   rhythm instead of everything butted up against each other. */
.section-divider { border: none; border-top: 1px solid var(--line); margin: 64px 0; }

.ph-frame {
    background: repeating-linear-gradient(45deg, #ece6d8, #ece6d8 10px, #e3dccb 10px, #e3dccb 20px);
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ph-frame.square { aspect-ratio: 1 / 1; }
.ph-frame.wide { aspect-ratio: 16 / 9; }
.ph-frame.tall { aspect-ratio: 3 / 4; }

.post-body h2, .post-body h3, .post-body h4 { margin-top: 1.6em; }
.post-body p { margin: 1em 0; }
.post-body ul, .post-body ol { margin: 1em 0; padding-left: 1.4em; }
.post-body li { margin: 0.3em 0; }
.post-body blockquote {
    margin: 1.2em 0;
    padding: 4px 18px;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}
.post-body code {
    background: #f1ebdc;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.post-body img { border-radius: 4px; margin: 0.6em 0; }
.post-body a { text-decoration: underline; }

.hero {
    text-align: center;
    padding: 72px 0 28px;
}

.badge {
    display: inline-block;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 30px;
}

.ig-section { margin: 30px 0; }

.ig-embed-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.ig-embed-wrap iframe { display: block; width: 100%; height: 480px; border: none; }

.mshake-embed {
    border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff;
    margin: 16px auto 10px; max-width: 480px; width: 100%;
}
.mshake-embed iframe { display: block; width: 100%; height: 90vh; min-height: 760px; max-height: 1100px; border: none; }

.ig-follow-card {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 360px;
    margin: 0 auto;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.ig-follow-card:hover { border-color: var(--accent); text-decoration: none; }
.ig-follow-card .ig-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);
    color: #fff; flex-shrink: 0;
}
.ig-follow-card .ig-follow-text { display: flex; flex-direction: column; gap: 2px; }
.ig-follow-card .ig-follow-text strong { font-size: 1rem; }
.ig-follow-card .ig-follow-text span { font-size: 0.82rem; color: var(--muted); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card .meta { color: var(--muted); font-size: 0.8rem; }
.card .excerpt { font-size: 0.92rem; color: #4a453d; }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
}
.btn:hover { background: #943f1f; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.workshop-embed {
    margin-top: 32px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.workshop-embed iframe {
    display: block;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    border: none;
}
.embed-fallback {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

.post-list { display: flex; flex-direction: column; gap: 28px; margin-top: 30px; }
.post-list article { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.post-list h3 { margin: 0 0 6px; font-size: 1.3rem; }
.post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }

form.admin-form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
form.admin-form label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
form.admin-form input, form.admin-form textarea, form.admin-form select {
    padding: 10px; font-family: inherit; font-size: 1rem;
    border: 1px solid var(--line); border-radius: 4px; background: #fff;
}
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; font-size: 0.9rem; }
.flash { background: #eef7ea; border: 1px solid #b8dba3; padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; }

.section-crumb { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }

/* --- Painting gallery: tag filter chips + click-to-enlarge grid --- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.tag-chip {
    border: 1px solid var(--line); background: #fff; color: var(--muted);
    border-radius: 999px; padding: 6px 16px; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.active { border-color: var(--accent); background: var(--accent); color: #fff; }

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 24px;
    margin-top: 10px;
}
/* Every 3rd piece spans the full row — the same full-width/duo rhythm as
   the reference site, generated automatically rather than curated by hand. */
.gallery-item:nth-child(3n) { grid-column: 1 / -1; }
.gallery-item:nth-child(3n) .gallery-trigger { aspect-ratio: 21 / 9; }

.gallery-trigger {
    display: block; width: 100%; padding: 0; margin: 0;
    border: none; background: none; cursor: zoom-in;
    aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px;
}
.gallery-trigger img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-trigger .ph-frame { width: 100%; height: 100%; border-radius: 4px; }

.gallery-item figcaption { margin-top: 14px; }
.gallery-item h3 { font-size: 1.05rem; margin: 0 0 4px; font-weight: 600; }
.gallery-item .excerpt { color: var(--muted); font-size: 0.88rem; margin: 0; }

.lightbox {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(31, 27, 22, 0.92);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-inner { max-width: 900px; width: 100%; text-align: center; }
.lightbox-inner img { max-width: 100%; max-height: 72vh; border-radius: 3px; background: #fff; }
.lightbox-caption { color: #fff; margin-top: 18px; }
.lightbox-caption h3 { margin: 0 0 6px; font-weight: 600; }
.lightbox-caption p { margin: 0; color: #cfc8ba; font-size: 0.9rem; }
.lightbox-close {
    position: absolute; top: 20px; right: 28px;
    background: none; border: none; color: #fff; font-size: 2rem;
    line-height: 1; cursor: pointer; padding: 6px 10px;
}
.lightbox-close:hover { opacity: 0.7; }

@media (max-width: 640px) {
    .ig-grid { grid-template-columns: repeat(2, 1fr); }
    nav.site-nav a { margin-left: 12px; font-size: 0.85rem; }
    .gallery { grid-template-columns: 1fr; }
    .gallery-item:nth-child(3n) .gallery-trigger { aspect-ratio: 4 / 5; }
}
