/* Styles for the Posts pages. Colours, fonts and base styles come from ../styles.css. */
.p-top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.p-top .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.p-home { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.p-home b { font: 800 20px var(--display); letter-spacing: -.03em; }
.p-home svg { width: 18px; height: 18px; }
.p-theme { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); }
.p-theme svg { width: 18px; height: 18px; }
.p-theme .moon { display: none; }
:root[data-theme="light"] .p-theme .sun { display: none; }
:root[data-theme="light"] .p-theme .moon { display: block; }
.p-theme:focus-visible, .p-home:focus-visible, .p-card:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; }

.p-band { height: 4px; background: linear-gradient(90deg, #4a1c05, #b9520f 45%, #ff8a1f); }
.p-head { padding-block: 72px 40px; }
.p-head h1 { font: 800 clamp(48px, 8vw, 96px)/.95 var(--display); letter-spacing: -.045em; margin: 0; }
.p-head p.lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 18px 0 0; }

.p-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; padding-bottom: 96px; }
.p-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2);
  background: var(--bg-2); transition: transform .3s var(--ease), border-color .2s, box-shadow .3s; }
.p-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--a1) 60%, transparent); box-shadow: var(--shadow); }
.p-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.p-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.p-card h2 { font: 400 26px/1.05 'Archivo Black', 'Arial Black', Impact, sans-serif; letter-spacing: -.01em; margin: 0; }
.p-card p { margin: 0; color: var(--muted); font-size: 15px; }
.p-meta { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--a1); display: flex; flex-wrap: wrap; gap: 8px; }
.p-meta span { color: var(--faint); }
.p-more { color: var(--text); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.p-more svg { width: 16px; height: 16px; }

/* single post */
.post { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.post h1 { font: 400 clamp(40px, 7vw, 72px)/.98 'Archivo Black', 'Arial Black', Impact, sans-serif; margin: 14px 0 0; letter-spacing: -.01em; text-wrap: balance; }
.post h1 span { display: block; margin-top: 10px; font: 400 clamp(34px, 5vw, 52px)/1 'Yellowtail', 'Brush Script MT', cursive; color: var(--a1); }
.post .p-cover { margin: 40px -24px 0; }
.post figure { margin: 36px 0; }
.post figure img { width: 100%; border-radius: 16px; }
.post .p-cover img { border-radius: 0; }
.post figcaption { color: var(--faint); font-size: 14px; margin-top: 10px; text-align: center; }
.post .p-body p { font-size: 18px; line-height: 1.75; margin: 0 0 22px; }
.post .p-body h2 { font: 700 30px/1.15 var(--display); letter-spacing: -.02em; margin: 44px 0 16px; }
.p-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 36px 0;
  border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--line-2); }
.p-facts div { background: var(--bg-2); padding: 16px 18px; }
.p-facts dt { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-facts dd { margin: 6px 0 0; font-weight: 600; }
.p-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.p-back:hover { border-color: var(--a1); }
.p-back svg { width: 16px; height: 16px; }
@media (min-width: 820px) { .post .p-cover { margin-inline: -120px; } .post .p-cover img { border-radius: 18px; } }
@media (prefers-reduced-motion: reduce) { .p-card { transition: none; } }
/* keep photos at their real shape (the width/height attributes are only for layout reservation) */
.p-card img, .post figure img { height: auto; }
