/* ============================================
   EMBER — Daily ideas for creative minds
   Visual Identity CSS v1.0
   ============================================ */

:root {
  --ember-bg: #0F0B09;
  --stone:    #171210;
  --edge:     #241B16;
  --ash:      #F0E6D8;
  --glow:     #E8743B;
  --glow-dim: #C9602E;
  --smoke:    #A89A8C;
  --muted:    #8F8276;
  --dim:      #5C5048;
  --ghost:    #3A3128;
  --shadow:   #2E2620;
  --serif:    'DM Serif Display', Georgia, serif;
  --sans:     'DM Sans', system-ui, sans-serif;
  --radius:   10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--ember-bg);
  color: var(--ash);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* Navigation */
.site-nav {
  border-bottom: 0.5px solid var(--edge);
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,11,9,0.96);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 18px 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { font-family: var(--serif); font-size: 22px; color: var(--ash); letter-spacing: -0.3px; }
.nav-logo em { font-style: italic; color: var(--glow); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); transition: color 0.15s; }
.nav-links a:hover { color: var(--smoke); }
.nav-subscribe {
  color: var(--glow) !important;
  border: 0.5px solid var(--glow-dim);
  padding: 7px 14px; border-radius: 4px;
  transition: background 0.15s !important;
}
.nav-subscribe:hover { background: #2A1409 !important; }

/* Dateline */
.dateline {
  max-width: 1100px; margin: 0 auto;
  padding: 10px 40px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 0.5px solid #18120F;
}
.dateline-left { font-size: 11px; color: var(--ghost); letter-spacing: 0.07em; }
.dateline-right { font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--shadow); }

/* Homepage grid */
.home-wrap { max-width: 1100px; margin: 0 auto; padding: 0 40px 60px; }

.issue-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px;
  background: var(--ember-bg); margin-top: 1.5px; border: 1.5px solid var(--edge);
}
.issue-card { background: var(--ember-bg); transition: background 0.2s; border: 0.5px solid var(--edge); }
.issue-card:hover { background: #140F0C; }
.issue-card-inner { padding: 36px 32px 32px; height: 100%; display: flex; flex-direction: column; min-height: 260px; }

.piece-num {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--shadow); margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
}
.piece-num::before { content: ''; display: block; width: 14px; height: 1px; background: var(--glow); flex-shrink: 0; }

.piece-type { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.piece-link { display: block; flex: 1; }
.piece-link:hover .piece-title { color: var(--glow); }
.piece-title { font-family: var(--serif); font-size: 22px; color: var(--ash); line-height: 1.25; letter-spacing: -0.3px; margin-bottom: 10px; transition: color 0.15s; }
.piece-subtitle { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--dim); line-height: 1.6; }

.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 0.5px solid var(--shadow); padding-bottom: 2px; margin-top: 20px;
  transition: color 0.15s, border-color 0.15s; align-self: flex-start;
}
.read-more:hover { color: var(--glow); border-color: var(--glow); }

/* Post page */
.post-wrap { max-width: 680px; margin: 0 auto; padding: 56px 40px 80px; }
.post-header { margin-bottom: 48px; }
.post-tag { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.post-tag::before { content: ''; display: block; width: 14px; height: 1px; background: var(--glow); }
.post-title { font-family: var(--serif); font-size: 38px; color: var(--ash); line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 14px; }
.post-subtitle { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--dim); line-height: 1.5; margin-bottom: 20px; }
.post-meta { font-size: 11px; color: var(--ghost); letter-spacing: 0.07em; padding-top: 20px; border-top: 0.5px solid var(--edge); }
.post-image { margin-bottom: 48px; border-radius: var(--radius); overflow: hidden; }
.post-image figcaption { font-size: 12px; color: var(--dim); margin-top: 10px; font-style: italic; font-family: var(--serif); }

/* Post content */
.post-content, .gh-content { font-size: 17px; color: var(--muted); line-height: 1.9; font-weight: 300; font-family: var(--sans); }
.post-content p, .gh-content p { margin-bottom: 1.5em; color: var(--muted); }
.post-content h2, .gh-content h2 { font-family: var(--serif); font-size: 26px; color: var(--ash); margin: 2.2em 0 0.8em; line-height: 1.2; letter-spacing: -0.3px; }
.post-content h3, .gh-content h3 { font-family: var(--serif); font-size: 20px; color: var(--ash); margin: 1.8em 0 0.6em; }
.post-content em, .gh-content em { font-style: italic; color: var(--glow); }
.post-content strong, .gh-content strong { font-weight: 500; color: var(--ash); }
.post-content blockquote, .gh-content blockquote {
  border-left: 1.5px solid var(--glow); padding: 2px 0 2px 24px; margin: 2.2em 0;
  font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--smoke); line-height: 1.7;
}
.post-content a, .gh-content a { color: var(--ash); border-bottom: 0.5px solid var(--shadow); transition: border-color 0.15s, color 0.15s; }
.post-content a:hover, .gh-content a:hover { border-color: var(--glow); color: var(--glow); }
.post-content hr, .gh-content hr { border: none; border-top: 0.5px solid var(--edge); margin: 2.5em 0; }
.post-content ul, .post-content ol, .gh-content ul, .gh-content ol { padding-left: 1.5em; margin-bottom: 1.5em; color: var(--muted); }
.post-content li, .gh-content li { margin-bottom: 0.5em; }

/* Ghost Beta editor / Lexical compatibility */
.gh-content > * + * { margin-top: 1.5em; }
.gh-content [class*="kg-"] { margin: 2em 0; }
.kg-card { margin: 2em 0; }
.kg-image-card img { width: 100%; border-radius: var(--radius); }
.kg-image-card figcaption { font-size: 13px; color: var(--dim); font-style: italic; font-family: var(--serif); margin-top: 10px; text-align: center; }
.kg-bookmark-card { background: var(--stone); border: 0.5px solid var(--edge); border-radius: var(--radius); padding: 20px; display: block; transition: border-color 0.15s; }
.kg-bookmark-card:hover { border-color: var(--glow); }
.kg-bookmark-title { font-family: var(--serif); color: var(--ash); margin-bottom: 6px; }
.kg-bookmark-description { font-size: 14px; color: var(--dim); }

.kg-callout-card {
  background: var(--stone); border: 0.5px solid var(--edge); border-left: 2px solid var(--glow);
  border-radius: var(--radius); padding: 20px 24px; margin: 2em 0; display: flex; gap: 14px; align-items: flex-start;
}
.kg-callout-emoji { font-size: 20px; flex-shrink: 0; }
.kg-callout-text { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--smoke); line-height: 1.7; }

.kg-toggle-card { background: var(--stone); border: 0.5px solid var(--edge); border-radius: var(--radius); padding: 20px 24px; margin: 2em 0; }
.kg-toggle-heading-text { font-family: var(--serif); color: var(--ash); }
.kg-toggle-content { color: var(--muted); margin-top: 12px; font-size: 16px; }
.kg-divider { border: none; border-top: 0.5px solid var(--edge); margin: 2.5em 0; }

.gh-content, .gh-content p, .gh-content li, .gh-content span, .gh-content div { color: var(--muted); }
.gh-content h1, .gh-content h2, .gh-content h3, .gh-content h4 { color: var(--ash); font-family: var(--serif); }

/* Ghost card widths */
.kg-width-wide { margin-left: -80px; margin-right: -80px; }
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.kg-image { max-width: 100%; border-radius: var(--radius); }

/* Discussion */
.post-discussion { margin-top: 56px; padding-top: 32px; border-top: 0.5px solid var(--edge); }
.discussion-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.discussion-note { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ghost); margin-bottom: 28px; }

/* Post nav */
.post-nav { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 24px; border-top: 0.5px solid var(--edge); gap: 20px; }
.post-nav a { font-size: 14px; color: var(--dim); transition: color 0.15s; max-width: 45%; font-family: var(--serif); font-style: italic; }
.post-nav a:hover { color: var(--glow); }
.post-nav-next { text-align: right; margin-left: auto; }

/* Static pages */
.page-wrap { max-width: 680px; margin: 0 auto; padding: 56px 40px 80px; }
.page-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 0.5px solid var(--edge); }
.page-title { font-family: var(--serif); font-size: 38px; color: var(--ash); line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 14px; }
.page-subtitle { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--dim); line-height: 1.5; }
.page-content { font-size: 17px; color: var(--muted); line-height: 1.9; font-weight: 300; }
.page-content p { margin-bottom: 1.5em; }

/* Footer */
.site-footer { border-top: 0.5px solid var(--edge); padding: 28px 0; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; }
.footer-mark { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--shadow); }
.footer-logo { font-family: var(--serif); font-size: 15px; color: var(--ghost); }
.footer-logo em { font-style: italic; color: var(--glow-dim); }

/* Responsive */
@media (max-width: 720px) {
  .nav-inner { padding: 16px 20px; }
  .nav-links a:not(.nav-subscribe) { display: none; }
  .dateline { padding: 8px 20px; }
  .dateline-right { display: none; }
  .home-wrap { padding: 0 0 40px; }
  .issue-grid { grid-template-columns: 1fr; }
  .issue-card-inner { min-height: auto; padding: 28px 20px; }
  .post-wrap, .page-wrap { padding: 32px 20px 60px; }
  .post-title, .page-title { font-size: 28px; }
  .kg-width-wide { margin-left: 0; margin-right: 0; }
  .footer-inner { padding: 0 20px; flex-direction: column; gap: 12px; text-align: center; }
}
