/* ── Twunein Blog — shared stylesheet ──────────────────────────────── */
/* Mirrors the landing-page dark palette; self-contained for the blog sub-path */

:root {
  --bg:        #050816;
  --bg2:       #081023;
  --panel:     rgba(255,255,255,.06);
  --panel2:    rgba(255,255,255,.1);
  --line:      rgba(255,255,255,.11);
  --text:      #f6f8ff;
  --muted:     rgba(246,248,255,.72);
  --faint:     rgba(246,248,255,.48);
  --blue:      #60a5fa;
  --violet:    #7c3aed;
  --pink:      #ec4899;
  --grad:      linear-gradient(90deg,#60a5fa,#7c3aed 50%,#ec4899);
  --maxw:      1160px;
  --prose:     740px;
  --radius:    20px;
  --ease:      cubic-bezier(.2,.8,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { overflow-x: hidden; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Cursor + heart emitter */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 29l-1.4-1.3C7 22.1 2 17.4 2 11.5 2 6.5 6.5 2 11.5 2 14 2 16 3.2 17 5 18 3.2 20 2 22.5 2 27.5 2 32 6.5 32 11.5 32 17.4 27 22.1 17.4 27.7L16 29z' fill='%23ffffff' stroke='%23ff80d5' stroke-width='2'/%3E%3C/svg%3E") 16 8, auto;
  }
}
.heart-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}
.heart {
  position: fixed;
  width: 20px;
  height: 18px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition: transform 1.1s ease-out, opacity 1.1s ease-out;
  z-index: 1001;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%23ff80d5'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg,rgba(5,8,22,.9),rgba(5,8,22,.5));
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Pacifico', cursive; font-size: 20px; font-weight: 400; color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(180deg,rgba(0,0,0,.18),rgba(0,0,0,.08)),url('/logo.png') center/center / cover no-repeat;
  box-shadow: 0 12px 24px -16px rgba(96,165,250,.8); flex-shrink: 0; }
.brand-name { font-family: 'Pacifico', cursive; font-size: 20px; font-weight: 400;
  background: linear-gradient(90deg,var(--blue),var(--violet) 50%,var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Nav links wrapper — must be sibling of nav-pill, not parent, to avoid specificity wars */
.nav-links { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav-links li a:not(.nav-pill) { color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .2s var(--ease); }
.nav-links li a:not(.nav-pill):hover { color: var(--text); }
/* CTA pill sits outside nav-links to keep color specificity clean */
.nav-pill { padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(96,165,250,.35);
  transition: transform .2s; }
.nav-pill:hover { transform: translateY(-1px); }
@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ── Blog index hero ──────────────────────────────────────── */
.blog-hero { padding: clamp(64px,9vw,120px) 0 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg,var(--blue),var(--pink));
  box-shadow: 0 0 0 4px rgba(96,165,250,.16); }
.blog-hero h1 { font-family: 'Pacifico', cursive; font-size: clamp(34px,6vw,64px);
  font-weight: 400; line-height: 1.12; letter-spacing: .01em; margin: 0 0 18px; }
.blog-hero h1 em { font-style: normal; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.blog-hero p { color: var(--muted); font-size: 17px; max-width: 60ch; margin: 0; }

/* ── Article grid (index) ─────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr));
  gap: 22px; margin-top: 52px; }
.post-card { padding: 26px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); transition: transform .3s var(--ease), background .3s var(--ease);
  display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-4px); background: var(--panel2); }
.post-card .meta { font-size: 12px; color: var(--faint); text-transform: uppercase;
  letter-spacing: .14em; margin-bottom: 12px; }
.post-card h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
.post-card p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; flex: 1; }
.post-card .read { font-size: 13px; color: var(--blue); font-weight: 600; }

/* ── Article page ─────────────────────────────────────────── */
.article { max-width: var(--prose); margin: 0 auto; padding: clamp(56px,8vw,100px) 24px 80px; }
.article .back { display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 14px; margin-bottom: 36px;
  transition: color .2s; }
.article .back:hover { color: var(--text); }
.article .back svg { flex-shrink: 0; }
.article-head .label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 14px; }
.article-head h1 { font-family: 'Pacifico', cursive;
  font-size: clamp(30px,5.5vw,54px); font-weight: 400; line-height: 1.12; letter-spacing: .01em;
  margin: 0 0 18px; }
.article-head .lede { font-size: clamp(16px,1.8vw,19px); color: var(--muted);
  max-width: 58ch; margin: 0 0 28px; }
.byline { display: flex; align-items: center; gap: 14px; margin-bottom: 52px; }
.byline-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg,var(--blue),var(--violet)); }
.byline-info { display: flex; flex-direction: column; gap: 3px; }
.byline-name { font-size: 14px; font-weight: 600; }
.byline-name a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.byline-dates { font-size: 12px; color: var(--faint); }

/* ── Prose ────────────────────────────────────────────────── */
.prose { line-height: 1.8; }
.prose p { margin: 0 0 22px; font-size: 17px; }
.prose h2 { font-family: 'Pacifico', cursive; font-size: clamp(22px,3.2vw,32px);
  font-weight: 400; letter-spacing: .01em; margin: 52px 0 16px; line-height: 1.2; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 32px 0 12px; letter-spacing: -.01em; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose li { font-size: 17px; margin-bottom: 8px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose blockquote { border-left: 3px solid var(--violet); margin: 32px 0; padding: 14px 22px;
  background: var(--panel); border-radius: 0 12px 12px 0; font-style: italic;
  color: var(--muted); font-size: 18px; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 48px 0; }
.prose code { background: var(--panel2); padding: 2px 7px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: .88em; }

/* ── Callout box ──────────────────────────────────────────── */
.callout { display: flex; gap: 14px; padding: 18px 22px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); margin: 28px 0; }
.callout p { margin: 0; font-size: 15px; color: var(--muted); }
.callout strong { color: var(--text); }

/* ── CTA banner ───────────────────────────────────────────── */
.cta-bar { margin-top: 72px; padding: 40px; border-radius: var(--radius);
  background: linear-gradient(160deg,rgba(96,165,250,.14),rgba(124,58,237,.12) 50%,rgba(236,72,153,.1));
  border: 1px solid var(--line); text-align: center; }
.cta-bar h2 { font-family: 'Instrument Serif', serif; font-size: clamp(26px,4vw,42px);
  letter-spacing: -.025em; margin: 0 0 10px; }
.cta-bar p { color: var(--muted); margin: 0 0 22px; }
.cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px;
  border-radius: 14px; font-weight: 700; font-size: 14px;
  transition: transform .2s var(--ease); border: 1px solid transparent; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: #050816; }
.btn-secondary { background: var(--panel2); color: var(--text); border-color: var(--line); }

/* ── Related posts ────────────────────────────────────────── */
.related { background: var(--bg2); border-top: 1px solid var(--line); padding: 64px 24px; }
.related-inner { max-width: var(--maxw); margin: 0 auto; }
.related h2 { font-family: 'Pacifico', cursive; font-size: clamp(22px,3.2vw,32px);
  font-weight: 400; margin: 0 0 32px; letter-spacing: .01em; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 18px; }
.related-card { display: flex; flex-direction: column; padding: 22px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .3s var(--ease), background .3s var(--ease); }
.related-card:hover { transform: translateY(-3px); background: var(--panel2); }
.related-card .meta { font-size: 12px; color: var(--faint); text-transform: uppercase;
  letter-spacing: .14em; margin-bottom: 8px; }
.related-card h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; }
.related-card p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; flex: 1; }
.related-card .read { font-size: 13px; color: var(--blue); font-weight: 600; }

/* ── Network strip ────────────────────────────────────────── */
.network { border-top: 1px solid var(--line); padding: 40px 24px; }
.network-inner { max-width: var(--maxw); margin: 0 auto; }
.network h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--faint); margin: 0 0 18px; }
.partner-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.partner { padding: 10px 18px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); font-size: 13px; color: var(--muted);
  transition: border-color .2s, color .2s; }
.partner:hover { border-color: var(--blue); color: var(--text); }
.partner strong { color: var(--text); font-weight: 600; display: block; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { padding: 32px 24px 44px; border-top: 1px solid var(--line); font-size: 13px;
  color: var(--faint); }
.footer-inner { max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-mark { width: 24px; height: 24px; border-radius: 7px; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(180deg,rgba(0,0,0,.18),rgba(0,0,0,.12)),url('/logo.png') center/center / cover no-repeat; }
.footer-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.footer-brand span { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: -.02em; }
.footer-brand a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Breadcrumbs ──────────────────────────────────────────── */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--faint); margin-bottom: 28px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs span { opacity: .5; }

/* ── Reveal animation ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px);
  transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 999px; }
