/*
 * Benoit Blue Boy — Custom Stylesheet
 * ─────────────────────────────────────
 * Palette 5: Cyan #0891b2 · Teal #0e7490 · Rose #ec4899
 * Fonts: Merriweather (heading) · Nunito (body)
 */

/* ── Base ──────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(8, 145, 178, 0.15);
  color: #0e7490;
}

/* ── Transitions ──────────────────────────────────────── */
a, button {
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
}

/* ── Prose (article content) ──────────────────────────── */
.prose {
  max-width: 65ch;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1e293b;
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #475569;
}

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

.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }

.prose li {
  margin-bottom: 0.5rem;
  color: #475569;
  line-height: 1.7;
}

.prose blockquote {
  border-left: 3px solid #0891b2;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  color: #475569;
  background: #f8fafc;
  border-radius: 0 4px 4px 0;
}

.prose a {
  color: #0c6a82;
  text-decoration: underline;
  text-decoration-color: rgba(14, 116, 144, 0.3);
  text-underline-offset: 3px;
  font-weight: 500;
}

.prose a:hover {
  color: #0e7490;
  text-decoration-color: #0e7490;
}

.prose strong {
  font-weight: 700;
  color: #1e293b;
}

.prose img {
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* ── Tables ───────────────────────────────────────────── */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}

.prose thead {
  border-bottom: 2px solid #e2e8f0;
}

.prose th {
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
}

.prose td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}

.prose tbody tr:hover {
  background: #f8fafc;
}

@media (max-width: 640px) {
  .prose th, .prose td {
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
  }
}

/* ── Line clamp ───────────────────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Accessibility ────────────────────────────────────── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Pagination ───────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
}

.pagination li {
  list-style: none;
}

.pagination a, .pagination .active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.pagination a {
  color: #64748b;
  background: #f8fafc;
}

.pagination a:hover {
  background: #f1f5f9;
  color: #0e7490;
}

.pagination .active {
  color: #fff;
  background: #0e7490;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Hero decorative pattern (CSS only, no images) ────── */
.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(14, 116, 144, 0.05) 0%, transparent 70%);
}

/* ── Subtle card hover lift ───────────────────────────── */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.08),
              0 4px 10px -6px rgba(0, 0, 0, 0.04);
}

/* ── Reading progress indicator ───────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #0891b2, #ec4899);
  z-index: 100;
  transition: width 0.1s linear;
}

/* ── Print ────────────────────────────────────────────── */
@media print {
  header, footer, nav, .reading-progress { display: none !important; }
  .prose { max-width: 100%; }
  body { font-size: 11pt; }
}
