/* CSS Variables for theme colors */
:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --text-muted: #666666;
  --border-color: #ddd;
  --border-dark: #666;
  --bg-alt: #eee;
  --bg-code: #f9f9f9;
  --bg-quote: #f9f9f9;
  --shadow-color: #eee;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --text-muted: #aaa;
  --border-color: #444;
  --border-dark: #666;
  --bg-alt: #2a2a2a;
  --bg-code: #2d2d2d;
  --bg-quote: #2d2d2d;
  --shadow-color: #000;
}

body {
  max-width: 800px;
  margin: auto;
  line-height: 1.5;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 1.1em;
}

.bg-alt{
  background-color: var(--bg-alt);
}

.row {
  padding: .1em 1em;
}

/* header and footer areas */
.menu { padding: 0; }
.menu li { display: inline-block; }
.article-meta, .menu a {
  text-decoration: none;
  background: var(--bg-alt);
  padding: 5px;
  border-radius: 5px;
  color: var(--text-color);
}
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.2em; }
footer a { 
  text-decoration: none; 
  color: var(--text-color);
}
hr {
  border-style: dashed;
  color: var(--border-color);
}

/* code */
pre {
  border: 1px solid var(--border-color);
  box-shadow: 5px 5px 5px var(--shadow-color);
  padding: 1em;
  overflow-x: auto;
  background: var(--bg-code);
}
code { 
  background: var(--bg-code);
  color: var(--text-color);
}
pre code { background: none; }

/* misc elements */
img, iframe, video { max-width: 100%; }
main { hyphens: auto; }
blockquote {
  background: var(--bg-quote);
  border-left: 5px solid var(--border-color);
  padding: 3px 1em 3px;
  color: var(--text-color);
}

table {
  margin: auto;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  color: var(--text-color);
}
table thead th { border-bottom: 1px solid var(--border-color); }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: var(--bg-alt); }
