/* Lab Notes — shared stylesheet for /college/lab-notes/*.html
   Consolidates ~150 lines of duplicated inline styles across 6 post files
   and adds advanced typography + UI polish for the scholarly read.

   Design tenets:
   - Indigo accent (--ln-accent) used sparingly for emphasis only
   - Lora serif for chapter-style headings; Inter for body
   - SVG-based ornaments via CSS pseudo-elements (no extra HTML markup)
   - All animations respect prefers-reduced-motion
   - Anchor jumps clear the sticky 65px header
*/

:root {
  --ln-accent: #3730A3;
  --ln-accent-light: #E0E7FF;
  --ln-accent-soft: #F5F3FF;
  --ln-ink: #0F172A;
}

/* ---------- Prose body ---------- */

.prose { font-size: 1.0625rem; }
.prose p { margin-bottom: 1.15rem; }

/* ---------- Headings with SVG section markers ---------- */
/* Each H2 gets a small geometric ornament (a slim diamond + line), embedded
   as an SVG background-image on a ::before pseudo-element. Subtle, scholarly,
   easy to scan in a long essay. */

.prose h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--ln-ink);
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  line-height: 1.25;
  position: relative;
  padding-top: 1.25rem;
  scroll-margin-top: 6rem; /* clear sticky header on anchor jumps */
}
.prose h2::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 14' fill='none'><path d='M0 7 L40 7' stroke='%233730A3' stroke-width='1.5' stroke-linecap='round'/><path d='M44 7 L50 1 L56 7 L50 13 Z' fill='%233730A3'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.85;
}

.prose h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ln-ink);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 6rem;
}

/* ---------- Blockquote with quotation glyph ---------- */

.prose blockquote {
  border-left: 4px solid var(--ln-accent);
  background: var(--ln-accent-soft);
  padding: 1rem 1.25rem 1rem 2.75rem;
  border-radius: 0 0.375rem 0.375rem 0;
  font-style: italic;
  color: #312E81;
  margin: 1.75rem 0;
  position: relative;
}
.prose blockquote::before {
  content: '\201C'; /* opening curly quote */
  position: absolute;
  top: 0.25rem;
  left: 0.85rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 3.25rem;
  line-height: 1;
  color: var(--ln-accent);
  opacity: 0.35;
  font-style: normal;
  user-select: none;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* ---------- Lists ---------- */

.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1.15rem; }
.prose ul li { list-style: disc; margin-bottom: 0.5rem; }
.prose ol li { list-style: decimal; margin-bottom: 0.5rem; }
.prose ul li::marker { color: var(--ln-accent); }
.prose ol li::marker { color: var(--ln-accent); font-weight: 700; }

.prose strong { color: var(--ln-ink); }

/* ---------- Footnote references (superscript numbers in body) ---------- */

.prose .footnote-ref {
  font-size: 0.7em;
  vertical-align: super;
  text-decoration: none;
  color: var(--ln-accent);
  font-weight: 700;
  padding: 0 0.15em;
  margin-left: 0.05em;
  line-height: 1;
}
.prose .footnote-ref:hover {
  background: var(--ln-accent-soft);
  border-radius: 2px;
}
.prose .footnote-ref::before { content: '['; }
.prose .footnote-ref::after  { content: ']'; }

/* ---------- Links: animated underline ---------- */

.prose a {
  color: var(--ln-accent);
  text-decoration: underline;
  text-decoration-color: rgba(55, 48, 163, 0.25);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.prose a:hover { text-decoration-color: var(--ln-accent); }
.prose a:focus-visible {
  outline: 2px solid var(--ln-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Pullquote (centered Lora-italic) ---------- */

.prose .pullquote {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 500;
  font-style: italic;
  color: #312E81;
  line-height: 1.4;
  padding: 1.5rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin: 2rem 0;
  text-align: center;
}

/* ---------- Figure: visual aids ---------- */

.prose figure.viz {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.prose figure.viz:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -8px rgba(15, 23, 42, 0.18);
}
.prose figure.viz figcaption {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ---------- References block ---------- */

.prose ol#references-list,
#references + ol {
  font-size: 0.875rem;
  color: #475569;
}
#references {
  scroll-margin-top: 6rem;
}

/* ---------- Mobile refinements ---------- */

@media (max-width: 480px) {
  .prose { font-size: 1rem; }
  .prose h2 { font-size: 1.4rem; padding-top: 1rem; margin-top: 2.25rem; }
  .prose h2::before { width: 44px; height: 12px; }
  .prose blockquote { padding: 0.85rem 1rem 0.85rem 2.5rem; }
  .prose blockquote::before { font-size: 2.75rem; left: 0.65rem; }
  .prose .pullquote { font-size: 1.15rem; padding: 1.1rem 0; }
  .prose figure.viz { padding: 0.9rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .prose figure.viz,
  .prose a {
    transition: none;
  }
  .prose figure.viz:hover {
    box-shadow: none;
  }
}
