/* MindsetM2A - Custom Styles */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ========================================
   ARTICLE CONTENT — Premium Typography
   ======================================== */

/* Lead paragraph: first paragraph after article starts */
.article-content > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.85;
  color: #374151;
  font-weight: 400;
}

/* H2 with decorative accent bar */
.article-content h2 {
  position: relative;
  padding-bottom: 0.75rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent, #f97316);
}

/* H3 subtle styling */
.article-content h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

/* Paragraph spacing */
.article-content p {
  margin-bottom: 1.5rem;
}

/* Blockquote as callout card */
.article-content blockquote {
  position: relative;
  border-left: 4px solid var(--color-primary, #7c3aed) !important;
  border-radius: 0.75rem;
  background: #f9fafb;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 2rem 0;
  font-style: normal !important;
}

.article-content blockquote p {
  margin-bottom: 0;
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Lists with custom spacing */
.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

/* Ordered list with accent-colored numbers */
.article-content ol {
  counter-reset: list-counter;
  list-style: none;
  padding-left: 0;
}

.article-content ol > li {
  counter-increment: list-counter;
  position: relative;
  padding-left: 2.25rem;
}

.article-content ol > li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--color-primary, #7c3aed);
}

/* Unordered list with accent bullets */
.article-content ul {
  list-style: none;
  padding-left: 0;
}

.article-content ul > li {
  position: relative;
  padding-left: 1.75rem;
}

.article-content ul > li::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent, #f97316);
}

/* Horizontal rule */
.article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #d1d5db, transparent);
  margin: 3rem 0;
}

/* Code blocks */
.article-content pre {
  border-radius: 0.75rem;
  margin: 2rem 0;
}

.article-content code:not(pre code) {
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.9em;
  color: #7c3aed;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.article-content thead th {
  background: #f9fafb;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.article-content tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.article-content tbody tr:hover {
  background: #fafafa;
}

/* Images inside article */
.article-content img {
  margin: 2rem auto;
}

/* ========================================
   GENERAL UTILITIES
   ======================================== */

/* Text truncation utilities */
.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;
}

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Global transitions */
a, button {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Image cover utility */
.img-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Reading progress bar — no transition for smooth tracking */
#reading-progress {
  will-change: width;
}

/* Print */
@media print {
  header, footer, nav, #reading-progress {
    display: none !important;
  }
  .prose, .article-content {
    max-width: 100%;
  }
}
