/* --- Base --------------------------------------------------------------- */

:root {
  --bg: #0f0e11;
  --bg-alt: #1a181d;

  --text: #f7eedb;
  --text-muted: #c6bda8;

  --accent: #d9a850;        /* warm gold/amber */
  --accent-soft: #b88c45;

  --border: rgba(255, 255, 255, 0.06);

  --shadow: rgba(0, 0, 0, 0.55);
  --shadow-soft: rgba(0, 0, 0, 0.35);

  --transition: 180ms ease;
  --radius: 6px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Merriweather", "Georgia", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* --- Layout -------------------------------------------------------------- */

body {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

/* --- Headings ------------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-family: "Merriweather", serif;
  color: var(--accent);
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  line-height: 1.25;
}

h1 {
  font-size: 2.1rem;
}
h2 {
  font-size: 1.65rem;
}
h3 {
  font-size: 1.35rem;
  color: var(--accent-soft);
}

/* --- Text Elements ------------------------------------------------------- */

p {
  margin: 0 0 1.2rem;
  color: var(--text);
}

em {
  color: var(--text-muted);
}

strong {
  color: var(--accent-soft);
}

/* --- Links --------------------------------------------------------------- */

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

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

/* --- Code Blocks --------------------------------------------------------- */

pre, code {
  font-family: "Fira Code", monospace;
}

pre {
  background: var(--bg-alt);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: 0 0 18px var(--shadow-soft);
  overflow-x: auto;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

code {
  background: var(--bg-alt);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* --- Blockquotes --------------------------------------------------------- */

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.4rem;
  background: rgba(255, 225, 160, 0.05);
  border-left: 4px solid var(--accent-soft);
  border-radius: var(--radius);
  color: var(--text-muted);
  box-shadow: 0 0 12px var(--shadow);
}

/* --- Lists --------------------------------------------------------------- */

ul, ol {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

/* --- Tables -------------------------------------------------------------- */

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

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

th {
  color: var(--accent-soft);
  font-weight: 600;
  text-align: left;
}

/* --- Images -------------------------------------------------------------- */

img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 0 14px var(--shadow-soft);
  margin: 1.2rem 0;
}

/* --- Buttons / Generic CTA ---------------------------------------------- */

.button, button, input[type="submit"] {
  appearance: none;
  background: var(--accent-soft);
  color: #1a140b;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 0 12px var(--shadow);
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--accent);
  box-shadow: 0 0 16px var(--shadow-soft);
}

/* --- Footer -------------------------------------------------------------- */

footer, .site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* --- Site Header & Navigation ------------------------------------------- */

.site-header, header {
  margin-bottom: 3rem;
  text-align: center;
}

.site-title, .site-title a {
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.site-subtitle {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.site-nav ul, nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a, nav a {
  color: var(--text-muted);
  font-weight: 500;
}

.site-nav a:hover, nav a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-link:hover {
  color: var(--accent);
}

/* --- Post Styling ------------------------------------------------------- */

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.post-date, .post-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.post-content {
  margin-bottom: 3rem;
}

.posts-list article {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.posts-list article:last-child {
  border-bottom: none;
}

/* --- Small Glow Accents -------------------------------------------------- */
/* Use sparingly. */

.glow {
  text-shadow: 0 0 6px rgba(255, 180, 60, 0.4);
}

/* End */

/* --- Mermaid Diagram Styling ------------------------------------------- */

.mermaid {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  overflow-x: auto;
}

/* Ensure mermaid text is visible in dark theme */
.mermaid .section0, .mermaid .section1, .mermaid .section2, .mermaid .section3 {
  fill: var(--bg-alt) !important;
  stroke: var(--accent) !important;
}

.mermaid .sectionTitle {
  fill: var(--text) !important;
  font-family: "Merriweather", serif !important;
}

.mermaid .taskText {
  fill: var(--text) !important;
  font-family: "Merriweather", serif !important;
}

.mermaid .titleText {
  fill: var(--accent) !important;
  font-family: "Merriweather", serif !important;
  font-weight: bold !important;
}

.mermaid .grid .tick line {
  stroke: var(--border) !important;
}

.mermaid .grid .tick text {
  fill: var(--text-muted) !important;
  font-family: "Merriweather", serif !important;
}