/* Hegde — a quiet Ghost theme */
:root {
  --bg: #fdfcf8; --fg: #1f1f1d; --muted: #6b6a64; --rule: #e6e3da;
  --accent: #2f5d3a; --accent-soft: #e9efe8;
  --serif: var(--gh-font-body, Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif);
  --heading: var(--gh-font-heading, var(--serif));
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161614; --fg: #e8e6df; --muted: #9a988f; --rule: #2c2b27; --accent: #8fbf96; --accent-soft: #1f2a20; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.1875rem/1.65 var(--serif); }
.wrap { max-width: 38rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.sr-only { position: absolute; left: -9999px; }

/* Header + nav */
.site-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 3rem; }
.site-name { font: 700 1.15rem var(--heading); text-decoration: none; color: var(--fg); }
.site-nav { display: flex; align-items: baseline; gap: 1.1rem; font: .9rem var(--sans); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a, .search-btn { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav .nav-current a, .search-btn:hover { color: var(--fg); }
.search-btn, .link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link-btn { color: var(--accent); text-decoration: underline; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.9rem; margin: 0 0 .4rem; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
code { font: .85em var(--mono); background: var(--accent-soft); padding: .1em .3em; border-radius: 3px; }
pre { padding: 1rem; overflow-x: auto; border-radius: 6px; font-size: .85rem; background: var(--accent-soft); }
pre code { background: none; padding: 0; }
img { max-width: 100%; height: auto; }
.meta { font: .85rem var(--sans); color: var(--muted); }
.meta a { color: var(--muted); }
.intro .gh-content > p { margin: 0 0 1rem; }
.page-head { margin-bottom: 1.5rem; }

/* Lists */
.stats { font: .85rem var(--sans); color: var(--muted); margin: 2.5rem 0 1rem; border-bottom: 1px solid var(--rule); padding-bottom: .6rem; min-height: 1.4em; }
.stats a { color: var(--muted); }
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .45rem 0; }
.posts time { font: .85rem/2 var(--mono); color: var(--muted); }
.posts a { color: var(--fg); text-decoration: none; }
.posts a:hover { color: var(--accent); text-decoration: underline; }
.wc { font: .75rem var(--sans); color: var(--muted); white-space: nowrap; margin-left: .25rem; }
@media (max-width: 480px) {
  .posts li { grid-template-columns: 1fr; gap: 0; padding: .6rem 0; }
  .posts time { line-height: 1.4; }
}
.note-teasers { list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.note-teasers li { padding: .3rem 0; }
.note-teasers a { color: var(--fg); text-decoration: none; }
.note-teasers a:hover { color: var(--accent); }
.note-teasers time { font: .8rem var(--mono); color: var(--muted); margin-right: .4rem; }

/* Notes stream */
.note { padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.note:first-child { padding-top: .4rem; }
.note-date { font: .8rem var(--mono); color: var(--muted); text-decoration: none; }
.note-date:hover { color: var(--accent); }
.note-title { font-size: 1.15rem; margin: .3rem 0 0; }
.note-title a { color: var(--fg); text-decoration: none; }
.note-body > :first-child { margin-top: .4rem; }
.note-body > :last-child { margin-bottom: 0; }
.note-h1 { font-size: 1.5rem; margin-top: .6rem; }

/* Article */
.article header { margin-bottom: 2rem; }
.article .feature { margin-bottom: 2rem; border-radius: 4px; }
.gh-content > :first-child { margin-top: 0; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; font: .9rem var(--sans); }
.comments { margin-top: 3rem; }

/* Ghost cards */
.gh-content figure { margin: 2rem 0; }
.gh-content figcaption { font: .8rem var(--sans); color: var(--muted); text-align: center; margin-top: .5rem; }
.kg-width-wide { position: relative; width: min(56rem, 100vw - 2.5rem); left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); }
.kg-width-full img { width: 100%; }
.kg-bookmark-card, .kg-callout-card { font-family: var(--sans); }

/* Subscribe */
.subscribe { background: var(--accent-soft); border-radius: 8px; padding: 1.25rem 1.25rem 1.1rem; margin: 2.5rem 0; }
.subscribe > p:first-child { margin: 0 0 .75rem; font-size: 1rem; }
.subscribe form { display: flex; gap: .5rem; flex-wrap: wrap; }
.subscribe input[type=email] { flex: 1 1 14rem; font: 1rem var(--sans); padding: .65rem .8rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); color: var(--fg); }
.subscribe button { font: 600 .95rem var(--sans); padding: .65rem 1.1rem; border: 0; border-radius: 6px; background: var(--accent); color: var(--bg); cursor: pointer; }
.subscribe form.loading button { opacity: .6; }
.form-msg { display: none; flex-basis: 100%; margin: .4rem 0 0; font: .9rem var(--sans); }
.subscribe form.success .form-success { display: block; color: var(--accent); }
.subscribe form.error .form-error { display: block; color: #b3261e; }
.subscribe form.success input, .subscribe form.success button { display: none; }
.small { font: .8rem var(--sans); color: var(--muted); margin: .6rem 0 0; }

/* Landing */
.landing h1 { font-size: 2.3rem; }
.landing .lede { font-size: 1.3rem; color: var(--muted); margin-top: .2rem; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; font: .85rem var(--sans); color: var(--muted); margin-top: 2rem; }

/* Footer */
.site-foot { margin-top: 4rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font: .85rem var(--sans); color: var(--muted); display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem; }
.site-foot a { color: var(--muted); }
.site-foot ul { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
