/* =============================================================
   homemadesoftware.net — article.css
   Shared styles for every blog post (public/blog/<slug>/index.html).
   Link this file in a post's <head> instead of pasting a <style>
   block — that's what makes new posts a content-only copy/paste.
   ============================================================= */

.article { max-width: 740px; margin: 0 auto; padding: 40px 16px 64px; }

.article-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.article h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--text);
}

.article p  { margin-bottom: 16px; line-height: 1.75; }
.article ul { padding-left: 20px; margin-bottom: 16px; }
.article li { margin-bottom: 8px; line-height: 1.7; }

.article code {
  font-family: monospace;
  font-size: 0.88em;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}

.code-block {
  font-family: monospace;
  font-size: 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  margin: 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.callout {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 24px 0;
  line-height: 1.7;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.os-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}

.os-card strong { display: block; margin-bottom: 6px; }

.diagram-wrap {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 8px;
  margin: 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.diagram-wrap svg { width: 100%; height: auto; display: block; min-width: 480px; }

/* CTA / social block at end of post */
.post-cta {
  margin-top: 48px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.post-cta h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.post-cta p  { color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }

.post-cta .email-link {
  display: inline-block;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 20px;
  word-break: break-all;
}

.post-cta .social-links { justify-content: center; }

/* bottom nav */
.article-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
}

.article-nav a { text-decoration: underline; text-underline-offset: 3px; }

.custom-link {
  color: #ff5733;          /* Changes the text color */
  background-color: #f0f0f0; /* Adds a background color */
  padding: 6px 12px;       /* Adds spacing inside the link */
  text-decoration: none;   /* Removes the default underline */
  border-radius: 4px;      /* Rounds the corners */
  font-weight: bold;       /* Makes the text bold */
  transition: background-color 0.3s ease; /* Smooth transition for hover effects */
}

/* Optional: Styling for when the user hovers over the link */
.custom-link:hover {
  background-color: #e0e0e0;
  color: #c70039;
}
