/* ═══════════════════════════════════════════════════
   Extends about.css design language for:
   - Writeups / Notes / Projects listing pages
   - Individual writeup / note detail (prose) pages
═══════════════════════════════════════════════════ */

/* ─── Filter bar ─────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-dark);
  border-color: rgba(91,94,255,0.3);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Entry list (writeups / notes) ──────────────── */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.entry-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.6rem;
  padding: 1.5rem 2rem;
  background: var(--white);
  text-decoration: none;
  transition: background 0.2s ease;
}

.entry-row:hover { background: #f4f6fb; }

.entry-cat {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(91,94,255,0.08);
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.entry-body {}
.entry-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}
.entry-summary {
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.entry-tags {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.entry-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(46,51,84,0.06);
  padding: 2px 8px;
  border-radius: 100px;
}

.entry-meta {
  text-align: right;
  white-space: nowrap;
}
.entry-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.entry-diff {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.entry-diff.easy   { color: #2eae6b; }
.entry-diff.medium { color: #d99a2b; }
.entry-diff.hard   { color: #e0525f; }
.entry-diff.insane { color: #a752e0; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ─── Detail page: header ────────────────────────── */
.detail-hero {
  background: var(--dark);
  padding: 160px 6vw 70px;
  position: relative;
  overflow: hidden;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease, gap 0.2s ease;
}
.detail-back:hover { color: var(--accent); gap: 10px; }

.detail-tag-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.detail-title {
  font-family: 'Poppins', sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.detail-meta-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}
.detail-meta-row strong { color: rgba(255,255,255,0.75); font-weight: 500; }

/* ─── Detail page: prose ─────────────────────────── */
.prose-wrap {
  background: var(--light);
}

.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: 70px 6vw 100px;
  color: var(--text-dark);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.85;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: 'Poppins', sans-serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin: 2.4rem 0 1rem;
  line-height: 1.25;
}
.prose h1 { font-size: 1.9rem; }
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.25rem; }
.prose h2:first-child, .prose h1:first-child { margin-top: 0; }

.prose p { margin: 1.1rem 0; }

.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.prose ul, .prose ol {
  margin: 1.1rem 0 1.1rem 1.4rem;
}
.prose li { margin: 0.4rem 0; }

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.6rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.prose img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 1.6rem 0;
  display: block;
}

.prose code {
  font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
  font-size: 0.85em;
  background: rgba(46,51,84,0.08);
  color: var(--text-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.prose pre {
  background: #10142a;
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  margin: 1.6rem 0;
  border: 1px solid rgba(46,51,84,0.15);
}

.prose pre code {
  background: none;
  color: #ebf2fa;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.65;
}

/* Prism token colors, tuned to the site palette */
.prose .token.comment,
.prose .token.prolog,
.prose .token.doctype,
.prose .token.cdata { color: rgba(235,242,250,0.35); }

.prose .token.string,
.prose .token.attr-value { color: #7fd88f; }

.prose .token.number,
.prose .token.boolean,
.prose .token.constant { color: #f0b060; }

.prose .token.keyword,
.prose .token.operator,
.prose .token.rule { color: #a78bfa; }

.prose .token.function,
.prose .token.class-name { color: #7bb8ff; }

.prose .token.punctuation { color: rgba(235,242,250,0.55); }

.prose .token.parameter,
.prose .token.variable { color: #ebf2fa; }

.prose .token.tag,
.prose .token.selector { color: #5b9eff; }

.prose .token.property { color: #7bb8ff; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.9rem;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  text-align: left;
}
.prose th {
  background: rgba(46,51,84,0.05);
  font-weight: 600;
}

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

.prose mark {
  background: rgba(91,94,255,0.16);
  color: var(--text-dark);
  padding: 0.05em 0.15em;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .entry-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .entry-meta { text-align: left; }
  .detail-meta-row { gap: 1rem 1.5rem; }
}
