/* Custom styles for digital garden/wiki theme - Wikipedia-style */

/* Typography enhancements - Wikipedia-style */
/* Body text: serif font, comfortable line length (65-75 characters) */
.prose {
  color: #202122; /* Wikipedia near-black */
  line-height: 1.6; /* leading-relaxed */
  font-family: Georgia, "Times New Roman", Times, serif; /* Serif for body */
  font-size: 0.875rem; /* 14px base, will scale with text-lg */
}

/* Content wrapper for optimal reading width */
.prose .content,
article .content {
  max-width: 42rem; /* ~65-75 characters per line */
}

/* H1: Very large, bold, used once per page */
.prose h1 {
  color: #202122;
  font-weight: 700;
  font-size: 2.5rem; /* text-4xl */
  margin-top: 0;
  margin-bottom: 0.5em;
  line-height: 1.2;
  border-bottom: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Sans-serif for headers */
}

/* H2: Large, bold, with border-bottom like Wikipedia */
.prose h2 {
  color: #202122;
  font-weight: 700;
  font-size: 1.5rem; /* text-2xl */
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
  border-bottom: 1px solid #a7a7a7; /* Wikipedia-style border */
  padding-bottom: 0.25em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* H3: Smaller, bold, with lighter border */
.prose h3 {
  color: #202122;
  font-weight: 700;
  font-size: 1.25rem; /* text-xl */
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.4;
  border-bottom: 1px solid #c8ccd1; /* Lighter border for H3 */
  padding-bottom: 0.125em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* H4+: Base size, bold, extra margin */
.prose h4 {
  color: #202122;
  font-weight: 700;
  font-size: 1.125rem; /* text-lg */
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.prose h5, .prose h6 {
  color: #202122;
  font-weight: 700;
  font-size: 1rem; /* text-base */
  margin-top: 1em;
  margin-bottom: 0.5em;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.prose p {
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.6;
}

/* Links: Wikipedia blue, underline on hover only */
.prose a {
  color: #0645ad; /* Wikipedia blue */
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.prose a:hover {
  text-decoration: underline;
}

/* Blockquotes - styled for digital garden */
.prose blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #4b5563;
  background-color: #f9fafb;
  padding: 1em 1.5em;
  border-radius: 0.375rem;
}

.prose blockquote p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote p:first-child {
  margin-top: 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Tables - clean and readable */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95em;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border-radius: 0.375rem;
  overflow: hidden;
}

.prose thead {
  background-color: #f3f4f6;
}

.prose th {
  padding: 0.75em 1em;
  text-align: left;
  font-weight: 600;
  color: #111827;
  border-bottom: 2px solid #e5e7eb;
}

.prose td {
  padding: 0.75em 1em;
  border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:hover {
  background-color: #f9fafb;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Images - responsive and styled */
.prose img {
  max-width: 100%;
  height: auto;
  margin: 2em auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.prose figure {
  margin: 2em 0;
}

.prose figcaption {
  margin-top: 0.75em;
  text-align: center;
  font-size: 0.875em;
  color: #6b7280;
  font-style: italic;
}

/* Code blocks */
.prose code {
  background-color: #f3f4f6;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #dc2626;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.9em;
}

/* Lists */
.prose ul, .prose ol {
  margin: 1.25em 0;
  padding-left: 1.75em;
}

.prose li {
  margin: 0.5em 0;
}

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

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

.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Horizontal rules */
.prose hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2em 0;
}

/* Strong and emphasis */
.prose strong {
  color: #111827;
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

/* Definition lists for wiki-style content */
.prose dl {
  margin: 1.5em 0;
}

.prose dt {
  font-weight: 600;
  color: #111827;
  margin-top: 1em;
}

.prose dd {
  margin-left: 1.5em;
  margin-top: 0.5em;
  color: #4b5563;
}

/* Wiki-style internal links */
.prose a[href^="/"] {
  color: #059669;
  text-decoration: none;
  border-bottom: 1px dotted #34d399;
}

.prose a[href^="/"]:hover {
  color: #047857;
  border-bottom-color: #10b981;
}

/* Jekyll Wikirefs plugin styles - Wikipedia-style */
.prose .wiki-link {
  color: #0645ad; /* Wikipedia blue */
  text-decoration: none;
  border-bottom: 1px dotted #0645ad;
  font-weight: 500;
}

.prose .wiki-link:hover {
  background-color: #f0f9ff; /* bg-blue-50 - subtle highlight */
  border-bottom-style: solid;
  text-decoration: none;
}

.prose .wiki-link-missing {
  color: #dc2626;
  border-bottom: 1px dotted #fca5a5;
  opacity: 0.7;
}

.prose .wiki-link-missing:hover {
  color: #b91c1c;
  opacity: 1;
}

.prose .wiki-link-invalid {
  color: #d97706;
  border-bottom: 1px dotted #fcd34d;
  opacity: 0.7;
}

/* Card layout utilities */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Print styles */
@media print {
  .prose {
    max-width: 100%;
  }
  
  .prose blockquote {
    border-left: 3px solid #000;
    background-color: transparent;
  }
  
  .prose img {
    box-shadow: none;
  }
}

