/* --- Base Typography & Background --- */
* {
  box-sizing: border-box;
}

body {
  /* Soft, neutral background to make the white column pop */
  background-color: #f4f5f7; 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #333333;
  margin: 0;
  padding: 2rem 1rem;
}

/* --- Central Column / Elevated Effect --- */
article {
  max-width: 800px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 3rem 4rem;
  border-radius: 12px;
  /* This box-shadow creates the "above the background" illusion */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Styling the H1 to sit nicely above the white card */
h1 {
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
  text-align: center;
  font-size: 2.2rem;
  line-height: 1.3;
  color: #111827;
  padding: 0 1rem;
}

h2 {
  color: #1f2937;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f3f4f6;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom: 1px solid #2563eb;
}

/* --- Code & Preformatted Text (Cool, not cringe) --- */
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background-color: #f1f5f9; /* Subtle gray background */
  color: #db2777; /* Tasteful deep pink/magenta for readability */
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  /* Modern, soft dark theme for blocks */
  background-color: #1e293b; 
  color: #e2e8f0; 
  padding: 1.5rem;
  padding-bottom:0;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Remove inline code styling when inside a pre block */
pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.95em;
}

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

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
}

/* --- Media (Images, Figures, Iframes) --- */
figure {
  margin: 2.5rem 0;
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  /* Optional: adds a tiny border to images with white backgrounds */
  border: 1px solid #f3f4f6; 
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
}

iframe {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 1.5rem;
  background: #f9fafb;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  article {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
}