/* Shared Article Styles — Distinctly Developed */

:root {
  --bg: #fffcff;
  --bg-card: #fffcff;
  --bg-elevated: #fffcff;
  --border: #b8bfd9;
  --border-hover: #a4abcd;
  --text: #080000;
  --text-secondary: #3b2e39;
  --text-muted: #5a4b57;
  --accent: #791196;
  --accent-dim: #5e0e76;
  --code-bg: #d8ddf3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0f;
    --bg-card: #1a1622;
    --bg-elevated: #14131a;
    --border: #2b2733;
    --border-hover: #3a3444;
    --text: #f7f5fb;
    --text-secondary: #d0cbd9;
    --text-muted: #a39caf;
    --accent: #b47bff;
    --accent-dim: #9e5ef5;
    --code-bg: #14131a;
    color-scheme: dark;
  }
  a:hover { color: #fffcff; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
h1 { color: var(--text); }
h2, h3 { color: #fc422b; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }

.container { max-width: 900px; margin: 0 auto; padding: 5rem 2rem; }

.eyebrow { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: #fc422b; margin-bottom: 0.75rem; }
.title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 0.75rem; }
.subtitle { color: var(--text-secondary); margin-bottom: 2rem; max-width: 720px; }

/* Article body */
.article { margin-top: 2rem; }
.article h2 { margin-top: 2rem; margin-bottom: 0.6rem; font-size: 1.45rem; }
.article h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1.1rem; }
.article p { margin-bottom: 1rem; color: var(--text-secondary); }
.article strong { color: var(--text); font-weight: 600; }
.article ul, .article ol { margin: 0 0 1rem 0; padding-left: 1.6rem; list-style-position: outside; color: var(--text-secondary); }
.article li { margin-bottom: 0.4rem; }
.article code { background: var(--code-bg); border: 1px solid var(--border); padding: 0.1rem 0.3rem; border-radius: 0; font-size: 0.88rem; }
.article pre { background: var(--code-bg); border: 1px solid var(--border); padding: 1rem; border-radius: 0; overflow-x: auto; margin-bottom: 1rem; color: var(--text-secondary); }

/* Callout / blockquote */
.callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-card);
  color: var(--text-secondary);
}
.callout strong { color: var(--text); }

/* Share links */
.share-links { display:flex; gap:0.6rem; flex-wrap:wrap; margin: 1rem 0 2rem; justify-content:center; }
.share-links a { display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:0; border:none; background: transparent; color: #fc422b; font-size:0.82rem; width:44px; height:44px; }
.share-links a:hover { color: #fc422b; }
.share-links img { width:22px; height:22px; opacity:1; transition: opacity 0.2s ease; filter: brightness(0) saturate(100%) invert(39%) sepia(92%) saturate(2094%) hue-rotate(343deg) brightness(100%) contrast(101%); }
.share-links a:hover img { opacity:1; }
.share-links button { display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:0; border:none; background: transparent; color: #fc422b; font-size:0.82rem; cursor:pointer; transition: all 0.2s ease; width:44px; height:44px; }
.share-links button:hover { color: #fc422b; }
.share-links button img { width:22px; height:22px; opacity:1; transition: opacity 0.2s ease; filter: brightness(0) saturate(100%) invert(39%) sepia(92%) saturate(2094%) hue-rotate(343deg) brightness(100%) contrast(101%); }
.share-links button:hover img { opacity:1; }

.share-links img[alt="X"] { width:20px; height:20px; }
.share-links img[alt="LinkedIn"] { width:22px; height:22px; }
.share-links img[alt="Facebook"] { width:22px; height:22px; }
.share-links img[alt="Reddit"] { width:23px; height:23px; }
.share-links img[alt="Hacker News"] { width:20px; height:20px; }
.share-links img[alt="Email"] { width:22px; height:22px; }
.share-links img[alt="Copy Link"] { width:20px; height:20px; }
.share-links button.copied { border-color: #4caf50; }

/* Newsletter CTA */
.article-cta { margin-top: 2.5rem; padding: 1.75rem; border-radius: 0; border: 1px solid var(--border); background: var(--bg-card, #151922); }
.article-cta h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.article-cta p { color: var(--text-secondary); margin-bottom: 1rem; }
.email-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.email-form input { flex: 1; min-width: 200px; padding: 0.7rem 1rem; border-radius: 0; border: 1px solid var(--border); background: var(--bg-elevated, #d8ddf3); color: var(--text); font-size: 0.88rem; }
.email-form button { padding: 0.7rem 1.25rem; border-radius: 0; border: 1px solid #fc422b; background: #fc422b; color: #fffcff; font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.email-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.6rem; }
.email-success { display: none; color: #fc422b; font-weight: 500; margin-top: 0.8rem; }

/* Gallery (used by some articles) */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.gallery img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.gallery-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
}

/* Cron table (used by some articles) */
.cron-table { width:100%; border-collapse: collapse; margin: 1rem 0 2rem; font-size:0.92rem; }
.cron-table th, .cron-table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cron-table th { text-align:left; color: var(--text-muted); font-size:0.72rem; text-transform: uppercase; letter-spacing:0.08em; }
.cron-table tr:last-child td { border-bottom:none; }
.cron-section-title { margin-top: 1.5rem; font-weight:600; color: var(--text); }
.cron-note { color: var(--text-secondary); font-size:0.9rem; margin-bottom:0.5rem; }

/* Responsive */
@media (max-width: 760px) {
  .container { padding: 4rem 1.5rem; }
}
@media (max-width: 600px) {
  .email-form { flex-direction: column; }
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* Light mode */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fffcff;
    --bg-elevated: #fffcff;
    --bg-card: #fffcff;
    --bg-card-hover: #fffcff;
    --border: #b8bfd9;
    --border-hover: #a4abcd;
    --text: #080000;
    --text-secondary: #3b2e39;
    --text-muted: #5a4b57;
    --accent: #791196;
    --accent-dim: #5e0e76;
    --accent-glow: rgba(121, 17, 150, 0.18);
    --code-bg: #fffcff;
    color-scheme: light;
  }
  .share-links img { filter: invert(1); }
}
