/**
 * Public feed page (app/views/public_feeds/show.html.erb).
 *
 * Extracted verbatim from that view's inline <style> block (#1317). The page is
 * `layout: false` — it never loads the Tailwind bundle — so this is served as
 * its own Propshaft asset and linked with stylesheet_link_tag.
 *
 * Its :root block is a deliberately separate editorial palette (Fraunces /
 * Inter Tight / JetBrains Mono, warm paper) with no dark mode. It is NOT the
 * app design system and must not be converted to design-system tokens.
 */

:root {
  --bg: #f6f3ee;
  --bg-card: #fffdfa;
  --ink: #1a1814;
  --ink-soft: #4a453d;
  --ink-faint: #8a8175;
  --rule: #e4ddd1;
  --rule-soft: #ece6da;
  --accent: #c8481f;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter Tight', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 1;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 243, 238, 0.85);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-brand {
  font-weight: 500;
  color: var(--ink);
}
.nav-brand em {
  font-style: normal;
  color: var(--ink-faint);
  font-weight: 400;
  margin-left: 6px;
}
.nav-meta { color: var(--ink-faint); }
.nav-meta a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-meta a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

header.masthead {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

h1.name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
h1.name em {
  font-style: italic;
  font-weight: 300;
}

.bio {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 520px;
  font-weight: 400;
}

.year-mark {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 56px 0 20px;
}
.year-mark .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.year-mark .line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.year-mark .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed { list-style: none; }
.post {
  padding: 36px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 28px;
  position: relative;
}
.post:last-child { border-bottom: none; }

.post-meta {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 4px;
}
.post-date {
  display: block;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 8px;
}
.post-date .day {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1;
  margin-bottom: 2px;
}
.post-date .month {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: rgba(255,253,250,0.6);
}
.platform-tag .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.platform-tag[data-platform="linkedin"] .dot { background: #0a66c2; }
.platform-tag[data-platform="x"] .dot { background: #1a1814; }
.platform-tag[data-platform="substack"] .dot { background: #ff6719; }
.platform-tag[data-platform="youtube"] .dot { background: #ff0033; }
.platform-tag[data-platform="mastodon"] .dot { background: #6364ff; }
.platform-tag[data-platform="threads"] .dot { background: #1a1814; }
.platform-tag[data-platform="bluesky"] .dot { background: #1185fe; }
.platform-tag[data-platform="instagram"] .dot { background: #e1306c; }
.platform-tag[data-platform="tiktok"] .dot { background: #1a1814; }
.platform-tag[data-platform="facebook"] .dot { background: #1877f2; }

.platform-tag + .platform-tag { margin-top: 4px; }

.post-body { min-width: 0; }

.post-excerpt {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-excerpt p + p { margin-top: 10px; }
.post-excerpt a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 72, 31, 0.25);
  transition: border-color 0.15s ease;
}
.post-excerpt a:hover { border-bottom-color: var(--accent); }

.media-grid {
  margin-bottom: 14px;
  display: grid;
  gap: 4px;
  border-radius: 6px;
  overflow: hidden;
}
.media-grid.count-1 { grid-template-columns: 1fr; }
.media-grid.count-2,
.media-grid.count-3,
.media-grid.count-4 { grid-template-columns: 1fr 1fr; }
.media-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--rule-soft);
}
.media-grid.count-1 img { aspect-ratio: 16 / 10; }

.media-video {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  border-radius: 6px;
  background: #1a1814;
  max-height: 70vh;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.read-more {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease, gap 0.15s ease;
}
.read-more:hover {
  color: var(--accent);
  gap: 10px;
}
.read-more svg { width: 11px; height: 11px; }

.empty {
  padding: 120px 0;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
}

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 32px 96px;
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--accent); }
.pub-by {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.pub-by a { text-decoration: none; color: inherit; border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.pub-by a:hover { border-bottom-color: var(--accent); }
.pub-by a:hover strong { color: var(--accent); }
.pub-by strong { font-weight: 500; color: var(--ink); font-style: normal; transition: color 0.2s ease; }

.post {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.post:nth-child(1) { animation-delay: 0.05s; }
.post:nth-child(2) { animation-delay: 0.12s; }
.post:nth-child(3) { animation-delay: 0.19s; }
.post:nth-child(4) { animation-delay: 0.26s; }
.post:nth-child(5) { animation-delay: 0.33s; }
.post:nth-child(6) { animation-delay: 0.40s; }
.post:nth-child(n+7) { animation-delay: 0.47s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

header.masthead > * {
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
header.masthead .eyebrow { animation-delay: 0.05s; }
header.masthead h1 { animation-delay: 0.15s; }
header.masthead .bio { animation-delay: 0.25s; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 0 22px; }
  .nav-inner { padding: 14px 22px; }
  header.masthead { padding: 64px 0 40px; }
  h1.name { font-size: 44px; }
  .post {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 0;
  }
  .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .post-date { display: inline-flex; align-items: baseline; gap: 6px; margin-bottom: 0; }
  .post-date .day { font-size: 20px; }
  footer { padding: 56px 22px 72px; flex-direction: column; gap: 14px; align-items: flex-start; }
}
