/* ═══════════════════════════════════════════════
   Kinarey Ghost Theme
   Palette vars set by raag.js at runtime
═══════════════════════════════════════════════ */

:root {
  --bg:          #f5f0eb;
  --surface:     #ede6de;
  --ink:         #2e2825;
  --ink-light:   #7a6f6a;
  --accent:      #b07d6e;
  --accent-soft: #d4a99a;
  --rule:        #cfc4ba;
  --chrome:      #f5f0eb;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-weight: 400;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
}

body.ready {
  opacity: 1;
  transition: opacity 0.8s ease;
}

/* ── Layout ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.4rem 2rem 5rem;
  flex: 1;
  width: 100%;
}



.wordmark {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}



/* ── Compact header (inner pages) ── */
.site-header--compact {
  padding: 1rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}



.site-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}



/* ── Nav ── */
.site-nav {
  display: flex;
  gap: 1.8rem;
  margin-top: 0;
}



.site-nav a {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

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

/* ── Rule ── */
hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ── Content pages (About, Consulting, Speaking) ── */
.content-page {}

.content-header {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}

.content-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ── Post list ── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  display: block;
  margin-bottom: 1.5rem;
}

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

.post-card {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-card:first-child { padding-top: 1.5rem; }

.post-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.post-card-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card-title a:hover { color: var(--accent); }

.post-card-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-light);
  margin-bottom: 0.7rem;
}

.post-card-excerpt {
  font-size: 1.15rem;
  color: var(--ink-light);
  line-height: 1.7;
}

/* ── Post content ── */
.post-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--ink-light);
  margin-top: 0.5rem;
}

.post-content {
  font-size: 1.15rem;
  line-height: 1.85;
}

.post-content p { margin-bottom: 1.4em; }
.post-content p:last-child { margin-bottom: 0; }

.post-content h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 0.8rem;
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin: 2rem 0 0.6rem;
}

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

.post-content a:hover { color: var(--ink); }

.post-content blockquote {
  border-left: 2px solid var(--accent-soft);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--ink-light);
  font-style: italic;
}

.post-content img { max-width: 100%; height: auto; margin: 2rem 0; }

.post-content pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.2rem;
  overflow-x: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  margin: 1.5rem 0;
}

.post-content code {
  font-family: 'DM Mono', monospace;
  font-size: 0.85em;
  background: var(--surface);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4em;
}

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

/* ── Share link ── */
.share-link {
  margin-top: 3rem;
  margin-bottom: 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0;
  transition: color 0.2s ease;
}

.share-btn:hover { color: var(--accent); }

.share-btn svg { opacity: 0.6; transition: opacity 0.2s ease; }
.share-btn:hover svg { opacity: 1; }

/* ── Subscribe ── */
.subscribe-form { margin-top: 1rem; }

.subscribe-form p {
  font-size: 1rem;
  color: var(--ink-light);
  margin-bottom: 1rem;
  font-style: italic;
}

.subscribe-form form { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  outline: none;
}

.subscribe-form input[type="email"]:focus { border-color: var(--accent-soft); }

.subscribe-form button {
  padding: 0.6rem 1.4rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.subscribe-form button:hover { background: var(--accent); color: var(--bg); }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.pagination a {
  color: var(--ink-light);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

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

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 2rem;
  text-align: center;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.site-footer-links a {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.site-footer-copy {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--ink-light);
  opacity: 0.5;
  margin-bottom: 1rem;
}

.raag-label {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--ink-light);
  opacity: 0;
  cursor: pointer;
  transition: opacity 1.2s ease, color 0.2s ease;
  user-select: none;
  display: block;
}

.raag-label.visible { opacity: 0.4; }
.raag-label:hover { opacity: 1; color: var(--accent); }

/* ── Contact form ── */
.contact-form {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.contact-form h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.contact-form .form-group {
  margin-bottom: 1.2rem;
}

.contact-form label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease;
  appearance: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--accent-soft);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.contact-form button {
  margin-top: 0.5rem;
  padding: 0.7rem 2rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-form button:hover {
  background: var(--accent);
  color: var(--bg);
}

.contact-form .form-success {
  display: none;
  font-style: italic;
  color: var(--ink-light);
  margin-top: 1rem;
}


/* ── About page — engagements grid ── */
.engagements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  margin: 1.2rem 0 1.8rem;
}

.engagement-item {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-light);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: block;
}

.engagement-item::before {
  content: '→ ';
  color: var(--accent-soft);
}


/* ── Highlight / mark ── */
mark {
  background: linear-gradient(120deg, transparent 0%, var(--accent-soft) 8%, var(--accent-soft) 92%, transparent 100%);
  background-size: 100% 85%;
  background-repeat: no-repeat;
  background-position: 0 55%;
  color: var(--ink);
  padding: 0 0.15em;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ── Ghost Koenig required classes ── */
.kg-width-wide { margin-left: -8%; margin-right: -8%; }
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.kg-image { max-width: 100%; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container { display: flex; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.kg-bookmark-content { padding: 1rem; }
.kg-callout-card { display: flex; gap: 1rem; padding: 1.2rem; background: var(--surface); border-radius: 3px; margin: 1.5rem 0; }
.kg-toggle-card { border: 1px solid var(--rule); border-radius: 3px; padding: 1rem; margin: 1rem 0; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .page { padding: 1.2rem 1.2rem 3rem; }
  .site-header--compact { padding: 0.9rem 0; margin-bottom: 0; }

  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .site-nav { gap: 0.8rem 1.4rem; flex-wrap: nowrap; width: 100%; justify-content: flex-start; }
  .site-nav a { font-size: 0.68rem; letter-spacing: 0.1em; }

  .subscribe-form form { flex-direction: column; }
  .subscribe-form input[type="email"] { min-width: unset; }
}



.author-portrait img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
  filter: grayscale(15%);
  border: 3px solid var(--rule);
}

/* ── About page portrait — first image floats right ── */
.post-content figure.kg-image-card:first-child {
  float: right;
  margin: 0 0 1.8rem 2rem;
  width: 200px;
  shape-outside: circle(50%);
}

.post-content figure.kg-image-card:first-child img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  filter: saturate(1);
  border: 3px solid var(--rule);
  transition: filter 0.6s ease;
}

.post-content::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 600px) {
  .post-content figure.kg-image-card:first-child {
    float: none;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
  }
}

/* ── Post card with featured image ── */
.post-card--has-image {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.post-card-image-link {
  display: block;
  flex-shrink: 0;
}

.post-card-image {
  width: 180px;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.post-card-content { min-width: 0; }

@media (max-width: 600px) {
  .post-card--has-image {
    grid-template-columns: 1fr;
  }
  .post-card-image {
    width: 100%;
    height: 200px;
  }
}
