/* =============================
   Base Typography
   ============================= */

html {
  font-size: 1rem; /* 16px default */
  line-height: 1.5;
}

body {
  font-family: 'Parkinsans', sans-serif;
  font-size: 0.9375rem; /* 15px */
  color: var(--color-text-primary);
}

/* Headings */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: .8rem;
}

h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Paragraph and small text */
p,
small {
  margin: 0;
  font-size: 0.9375rem;
}

small {
  font-size: 0.8125rem; /* ~13px */
}

/* Responsive Font Scaling */
@media (max-width: 768px) {
  html {
    font-size: 16px; /* Increased for readability */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
}


/* =============================
   Prose Class (Rich Content Block)
   ============================= */

.prose {
  line-height: 1.7;
  color: var(--color-text-primary);
}

/* Headings inside prose */
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h1 { font-size: 2rem; font-weight: 700; }
.prose h2 { font-size: 1.625rem; }
.prose h3 { font-size: 1.375rem; }
.prose h4 { font-size: 1.125rem; }

/* Paragraphs */
.prose p {
  margin: 1rem 0;
  font-size: 1.0625rem; /* ~17px */
  color: var(--color-text-secondary);
}

/* Lists */
.prose ul,
.prose ol {
  padding-left: 2rem;
  margin: 1rem 0;
}

.prose li {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
}

/* Blockquotes */
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 0.25rem solid var(--color-border);
  color: var(--color-text-secondary);
  font-style: italic;
  font-size: 1.0625rem;
}

/* Images */
.prose img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  height: auto;
  object-fit: contain;
  margin: 1.5rem auto;
  border-radius: 0.5rem;
}

/* Links */
.prose a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: var(--color-text-primary);
}

/* Small Text */
.prose small {
  font-size: 0.875rem;
  color: var(--color-meta);
}

/* Responsive Typography in Prose */
@media (max-width: 768px) {
  .prose {
    padding: 1rem;
  }

  .prose h1 { font-size: 1.875rem; }
  .prose h2 { font-size: 1.5rem; }
  .prose h3 { font-size: 1.25rem; }
  .prose h4 { font-size: 1rem; }

  .prose p,
  .prose li,
  .prose blockquote {
    font-size: 1rem;
  }

  .prose small {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .prose {
    padding: 1rem;
  }

  .prose h1 { font-size: 1.625rem; }
  .prose h2 { font-size: 1.375rem; }
  .prose h3 { font-size: 1.125rem; }
  .prose h4 { font-size: 0.9375rem; }

  .prose p,
  .prose li,
  .prose blockquote {
    font-size: 0.9375rem;
  }

  .prose small {  
    font-size: 0.8125rem;
  }
}
