/* Good Hope blog: light theme, floating header and a hideable floating bottom menu. 360px to 1440px+. */
:root {
  --paper: #FBF7F0; --paper-2: #F4ECE0; --surface: #FFFFFF; --text: #24182F; --muted: #6B5A7A; --line: rgba(42,27,61,.12);
  --plum: #2A1B3D; --plum-2: #3A2752; --ember: #E2A24A; --ember-2: #F6D9A8; --gold-ink: #9A5B14; --clay: #B0563B;
  --shadow: 0 10px 30px -18px rgba(42,27,61,.35); --shadow-lg: 0 30px 70px -30px rgba(42,27,61,.45);
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif; --brand: "Fraunces", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif; --ease: cubic-bezier(.22,1,.36,1);
  --r: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body { background: radial-gradient(90% 50% at 85% -10%, rgba(246,217,168,.55), transparent 65%), var(--paper); color: var(--text); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; left: -9999px; } .sr:focus { left: 16px; top: 16px; z-index: 99; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--plum); color: #fff; text-decoration: none; border-radius: 999px; padding: 11px 22px; font-weight: 600; font-size: 15px; transition: transform .3s var(--ease), background .3s; white-space: nowrap; }
.btn:hover { background: var(--plum-2); transform: translateY(-1px); }
.kicker { display: inline-block; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold-ink); background: #FBEBD2; border-radius: 999px; padding: 4px 10px; }

/* floating header */
.bh { position: fixed; z-index: 40; top: 14px; left: 50%; translate: -50% 0; width: min(1180px, 100% - 24px); display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 18px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .3s; }
.bh.up { transform: translateY(-140%); }
.bh.scrolled { box-shadow: var(--shadow-lg); }
.bh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum); }
.bh-logo svg { width: 32px; height: 32px; flex-shrink: 0; color: var(--plum); }
.bh-logo b { font: 600 19px/1 var(--brand); display: block; }
.bh-logo small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .02em; margin-top: 3px; }
.bh-nav { display: flex; gap: 4px; margin-left: auto; }
.bh-nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.bh-nav a:hover, .bh-nav a[aria-current] { background: var(--paper-2); color: var(--text); }
.bh-act { display: flex; align-items: center; gap: 6px; }
.bh-in { text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; color: var(--muted); }
@media (max-width: 860px) { .bh-nav { display: none; } .bh-act { margin-left: auto; } }
@media (max-width: 420px) { .bh-in { display: none; } .bh-logo small { display: none; } .bh .btn { padding: 10px 16px; font-size: 14px; } }

main { padding-top: 104px; min-height: 70vh; }

/* list */
.hero { padding: 40px 0 24px; max-width: 820px; }
.hero h1 { font: 400 clamp(40px, 7vw, 76px)/1.02 var(--display); letter-spacing: -.01em; margin: 14px 0 16px; color: var(--plum); }
.hero h1 em { color: var(--gold-ink); }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 680px; }
.search { margin-top: 26px; display: flex; gap: 8px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; padding: 6px 14px; color: var(--text); }
.search input:focus { outline: none; }
.topics { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 18px; scrollbar-width: none; }
.topics::-webkit-scrollbar { display: none; }
.topics a { flex-shrink: 0; text-decoration: none; font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all .2s; }
.topics a small { color: var(--gold-ink); font-weight: 600; margin-left: 2px; }
.topics a:hover { color: var(--text); border-color: rgba(226,162,74,.5); }
.topics a[aria-current] { background: var(--plum); color: #fff; border-color: var(--plum); }
.topics a[aria-current] small { color: var(--ember-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; padding-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(226,162,74,.45); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card .cv { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.card-b { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font: 600 21px/1.25 var(--brand); color: var(--plum); }
.card h2 { font: 400 clamp(30px, 3.4vw, 44px)/1.08 var(--display); color: var(--plum); }
.card p { color: var(--muted); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: auto; }
.meta span + span::before { content: "·"; margin-right: 14px; opacity: .6; }
@media (min-width: 900px) {
  .grid.has-lead .card.big { grid-column: 1 / -1; }
  .grid.has-lead .card.big .card-link { flex-direction: row; }
  .grid.has-lead .card.big .cv { width: 56%; aspect-ratio: auto; min-height: 360px; }
  .grid.has-lead .card.big .card-b { padding: 40px; justify-content: center; }
}
.cv-art { display: grid; place-items: center; background: radial-gradient(60% 70% at 50% 100%, rgba(226,162,74,.55), transparent 70%), linear-gradient(160deg, #FCEBD0, #F4ECE0 60%, #EFE3F3); }
.cv-art svg { width: 22%; min-width: 56px; color: var(--plum); opacity: .85; }
.empty { grid-column: 1 / -1; text-align: center; background: var(--surface); border: 1px dashed rgba(42,27,61,.2); border-radius: var(--r); padding: 56px 24px; }
.empty h2 { font: 400 34px/1.1 var(--display); color: var(--plum); margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 20px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 32px; color: var(--muted); font-size: 15px; }
.pager a { text-decoration: none; font-weight: 600; color: var(--plum); background: var(--surface); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 32px 0 48px; padding: 30px 32px; border-radius: 28px;
  background: radial-gradient(80% 120% at 100% 0%, rgba(246,217,168,.8), transparent 60%), linear-gradient(165deg, #FCEBD0, var(--surface) 75%); border: 1px solid rgba(226,162,74,.4); box-shadow: var(--shadow); }
.cta h2 { font: 400 clamp(26px, 3vw, 36px)/1.1 var(--display); color: var(--plum); margin: 6px 0; }
.cta p { color: var(--muted); max-width: 520px; }

/* post */
.progress { position: fixed; z-index: 45; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--clay)); transform: scaleX(0); transform-origin: 0 50%; }
.post-h { max-width: 860px; padding: 32px 0 26px; }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; font-weight: 600; color: var(--gold-ink); }
.post-h h1 { font: 400 clamp(38px, 6vw, 68px)/1.04 var(--display); color: var(--plum); margin-bottom: 16px; letter-spacing: -.01em; }
.post-h .meta { margin-top: 18px; font-size: 14px; }
.post-cover .cv { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-lg); }
@media (max-width: 640px) { .post-cover .cv { aspect-ratio: 16/10; border-radius: 20px; } }
.post-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 56px; justify-content: center; padding: 40px 0 8px; }
@media (max-width: 1000px) { .post-grid { grid-template-columns: minmax(0, 720px); gap: 0; } .toc { display: none; } }
.toc { position: sticky; top: 110px; align-self: start; background: rgba(255,255,255,.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); font-size: 14px; }
.toc b { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 8px; }
.toc a { text-decoration: none; color: var(--muted); line-height: 1.35; display: block; }
.toc a:hover { color: var(--plum); }
.prose { font-size: 18.5px; line-height: 1.75; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font: 400 clamp(30px, 3.6vw, 40px)/1.12 var(--display); color: var(--plum); margin-top: 1.7em; }
.prose h3 { font: 600 22px/1.3 var(--brand); color: var(--plum); margin-top: 1.5em; }
.prose h4, .prose h5, .prose h6 { font: 600 18px/1.4 var(--sans); margin-top: 1.4em; }
.prose a { color: var(--gold-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45em; }
.prose li::marker { color: var(--ember); }
.prose blockquote { border-left: 3px solid var(--ember); padding: 6px 0 6px 22px; font: italic 400 24px/1.4 var(--display); color: var(--plum); }
.prose img { border-radius: 18px; margin-inline: auto; }
.prose code { font: 15px/1.4 ui-monospace, monospace; background: var(--paper-2); padding: 2px 6px; border-radius: 6px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.note { margin-top: 36px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.note b { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags a { text-decoration: none; font-size: 14px; color: var(--gold-ink); background: #FBEBD2; padding: 5px 12px; border-radius: 999px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; }
.share span { color: var(--muted); margin-right: 4px; }
.share a, .share button { text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 14px; }
.share a:hover, .share button:hover { border-color: rgba(226,162,74,.5); }
.related { padding-top: 24px; }
.related h2 { font: 400 40px/1.1 var(--display); color: var(--plum); margin-bottom: 20px; }

/* footer */
.bf { margin-top: 24px; background: var(--paper-2); border-top: 1px solid var(--line); padding: 44px 0 120px; color: var(--muted); font-size: 14px; }
.bf-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.bf nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.bf nav a { text-decoration: none; } .bf nav a:hover { color: var(--text); }
.care { margin-top: 26px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.care b { color: var(--text); }
.fine { margin-top: 18px; font-size: 12px; }

/* hideable floating bottom menu */
.dock { position: fixed; z-index: 40; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 2px; padding: 6px;
  background: rgba(255,255,255,.8); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg);
  transition: transform .45s var(--ease), opacity .3s; }
.dock a, .dock button { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--muted); padding: 7px 14px; border-radius: 999px; }
.dock a:hover, .dock button:hover { background: var(--paper-2); color: var(--plum); }
.dock svg, .dock-show svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock .dock-hide { padding: 7px 10px; } .dock .dock-hide svg { width: 16px; height: 16px; }
.dock.tuck { transform: translateY(160%); }
.dock.off { transform: translateY(180%); opacity: 0; pointer-events: none; }
.dock-show { position: fixed; z-index: 40; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.85); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--plum); }
.dock-show[hidden] { display: none; }
@media (min-width: 1100px) { .dock { left: auto; right: 24px; translate: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
