/* BoringClaw Blog — blog.css */
/* Extends style.css. Load after it. Uses the same CSS custom properties. */

/* ────────────────────────────────────────────────────────
   NAV ADDITIONS
   (nav-blog-link base styles live in style.css — shared with homepage)
──────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────
   BLOG HERO (upgraded)
──────────────────────────────────────────────────────── */

/* Hero entrance animation */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-hero-eyebrow {
  animation: heroFadeUp 0.5s var(--ease-standard) 0.05s both;
}

.blog-hero-title {
  animation: heroFadeUp 0.55s var(--ease-standard) 0.12s both;
}

.blog-hero-desc {
  animation: heroFadeUp 0.55s var(--ease-standard) 0.2s both;
}

.blog-hero-stats {
  animation: heroFadeUp 0.5s var(--ease-standard) 0.27s both;
}

/* ────────────────────────────────────────────────────────
   BLOG LIST PAGE
──────────────────────────────────────────────────────── */

.blog-hero {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--color-border);
  background-image:
    linear-gradient(rgba(92, 112, 128, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 112, 128, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: hidden;
  position: relative;
}

.blog-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  min-height: 200px;
}

.blog-hero-content {
  flex: 1;
  min-width: 0;
}

.blog-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: statusPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

.blog-hero-eyebrow-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--color-muted);
  text-transform: lowercase;
}

.blog-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: normal;
  color: var(--color-heading);
  margin-bottom: 1.25rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.blog-hero-title .period {
  color: #92680A;
}

.blog-hero-desc {
  font-size: 1rem;
  color: var(--color-body);
  max-width: 440px;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 1.75rem;
}

.blog-hero-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-stat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.blog-stat-num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--color-amber-text);
}

.blog-stat-sep {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-dim);
}

.blog-stat-link {
  text-decoration: none;
  transition: color 0.2s;
}

.blog-stat-link:hover {
  color: var(--color-heading);
}

.blog-hero-mascot-wrap {
  flex-shrink: 0;
  opacity: 0.9;
  margin-bottom: -4rem;
}

.blog-hero-mascot {
  width: 260px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.08));
  animation: mascotFloat 4s ease-in-out infinite;
}

@media (max-width: 720px) {
  .blog-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-height: auto;
  }
  .blog-hero-mascot-wrap {
    display: none;
  }
  .blog-hero {
    padding: 7rem 0 3rem;
  }
}

/* Post list */
.post-list {
  padding: 3rem 0 6rem;
}

.post-list-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Stagger entrance animation */
@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: cardSlideIn 0.5s var(--ease-standard) forwards;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.12s; }
.post-card:nth-child(3) { animation-delay: 0.19s; }
.post-card:nth-child(4) { animation-delay: 0.26s; }
.post-card:nth-child(5) { animation-delay: 0.33s; }

.post-card:first-child {
  border-top: 1px solid var(--color-border);
}

.post-card:hover .post-card-title {
  color: var(--color-amber-text);
}

.post-card:hover .post-card-arrow {
  transform: translateX(6px);
  color: var(--color-amber-text);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-steel);
  background: var(--color-steel-light);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.post-read-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-dim);
  letter-spacing: 0.03em;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: normal;
  color: var(--color-heading);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.75;
  font-weight: 300;
  max-width: 560px;
}

.post-card-arrow {
  font-size: 1.1rem;
  color: var(--color-dim);
  transition: transform 0.3s var(--ease-standard), color 0.2s;
  padding-top: 4px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .post-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .post-card-arrow {
    display: none;
  }
}

/* ────────────────────────────────────────────────────────
   BLOG POST PAGE
──────────────────────────────────────────────────────── */

/* Post header */
.post-header {
  padding: 8rem 0 3.5rem;
  border-bottom: 1px solid var(--color-border);
  background-image:
    linear-gradient(rgba(92, 112, 128, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 112, 128, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  margin-bottom: 2rem;
}

.post-back:hover {
  color: var(--color-heading);
}

.post-back-arrow {
  transition: transform 0.2s;
}

.post-back:hover .post-back-arrow {
  transform: translateX(-3px);
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.post-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: normal;
  color: var(--color-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 740px;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-muted);
  flex-wrap: wrap;
}

.post-byline a {
  color: var(--color-body);
  text-decoration: none;
  transition: color 0.2s;
}

.post-byline a:hover {
  color: var(--color-heading);
}

.post-byline .sep {
  color: var(--color-border);
}

/* Post body layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 5rem;
  align-items: start;
  padding: 4rem 0 6rem;
}

/* Article prose */
.post-prose {
  max-width: 680px;
}

.post-prose p {
  font-size: 1.05rem;
  color: var(--color-body);
  line-height: 1.85;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.post-prose p:last-child {
  margin-bottom: 0;
}

.post-prose h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--color-heading);
  line-height: 1.2;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  letter-spacing: -0.01em;
}

.post-prose h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.post-prose h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: normal;
  color: var(--color-heading);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-prose strong {
  color: var(--color-heading);
  font-weight: 500;
}

.post-prose em {
  font-style: italic;
}

.post-prose a {
  color: var(--color-amber-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(212, 168, 75, 0.3);
  transition: text-decoration-color 0.2s, color 0.2s;
}

.post-prose a:hover {
  text-decoration-color: var(--color-amber);
  color: var(--color-amber-btn);
}

.post-prose ul,
.post-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-prose li {
  font-size: 1rem;
  color: var(--color-body);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.post-prose blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--color-amber);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-body);
  line-height: 1.65;
  font-style: italic;
}

.post-prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

.post-prose .post-footer-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.7;
  font-weight: 300;
}

.post-prose .post-footer-note a {
  color: var(--color-body);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Sidebar */
.post-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

/* Share buttons */
.share-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  width: 100%;
  text-align: left;
}

.share-btn:hover {
  border-color: var(--color-amber);
  color: var(--color-amber-btn);
  background: rgba(212, 168, 75, 0.05);
}

.share-btn.copied {
  border-color: var(--color-success);
  color: var(--color-success);
  background: rgba(22, 163, 74, 0.05);
}

.share-btn .btn-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  line-height: 1;
}

/* TOC */
.toc-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc-items a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-muted);
  text-decoration: none;
  line-height: 1.5;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.15s;
  letter-spacing: 0.02em;
}

.toc-items a:hover {
  color: var(--color-heading);
  background: var(--color-surface-alt);
}

/* ────────────────────────────────────────────────────────
   TOC ACTIVE STATE
──────────────────────────────────────────────────────── */

.toc-items a.toc-active {
  background: var(--color-surface-alt);
  color: var(--color-heading);
}

/* Post footer nav */
.post-nav {
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}

.post-nav-back {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
}

.post-nav-direction {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-nav-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--color-heading);
  transition: color 0.2s;
}

.post-nav-back:hover .post-nav-title {
  color: var(--color-amber-text);
}

/* Responsive: collapse sidebar on small screens */
@media (max-width: 960px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .post-sidebar {
    position: static;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .sidebar-card {
    flex: 1;
    min-width: 200px;
  }
  .share-btns {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .share-btn {
    width: auto;
  }
  .toc-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 12px;
  }
  .sidebar-label {
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .post-header {
    padding: 7rem 0 2.5rem;
  }
  .post-layout {
    padding: 2.5rem 0 4rem;
  }
  .post-nav {
    flex-direction: column;
  }
}
