/* ==========================================================================
   SAN.DEV BLOG THEME (v1.0)
   Author: Sandev | san.dev
   File: /blog/style.css
   --------------------------------------------------------------------------
   Lightweight, dark-mode-first stylesheet for blog posts and technical pages.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Fira+Code:wght@400;500&display=swap");

:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-light: #79c0ff;
  --border: #30363d;
  --code-bg: #1f2937;
  --radius: 10px;
  --max-width: 850px;
}

/* === Base ================================================================ */

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-light);
}

/* === Layout =============================================================== */

header, footer {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1rem;
}

footer {
  border-top: 1px solid var(--border);
  border-bottom: none;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.2rem;
}

/* === Headings ============================================================= */

h1, h2, h3, h4 {
  color: #fff;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.6rem;
}

h2 {
  font-size: 1.6rem;
  color: var(--accent-light);
}

h3 {
  font-size: 1.3rem;
}

/* === Text ================================================================= */

p {
  margin: 1.2rem 0;
}

ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  color: #fff;
  font-weight: 600;
}

code {
  background: var(--code-bg);
  color: #e6edf3;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
}

/* === Pre / ASCII Banner =================================================== */

pre {
  font-family: "Fira Code", monospace;
  color: var(--accent-light);
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 0 auto 1rem auto;
  max-width: 100%;
  line-height: 1.1;
}

/* === Buttons / Links ====================================================== */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--accent-light);
  color: #fff;
}

/* === Tables ============================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.75rem;
}

th {
  background: var(--bg-alt);
  color: #fff;
}

/* === Media Queries ======================================================== */

@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  pre { font-size: 0.75rem; }
  main { padding: 0 1rem; }
}

/* === Optional Light Mode (auto-detect) =================================== */

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f5f5f5;
    --text: #1b1b1b;
    --muted: #555;
    --border: #e0e0e0;
    --code-bg: #f2f2f2;
    --accent: #0066cc;
    --accent-light: #2b8cff;
  }
}