/* mado — default dark theme
 * Replace this file to customize the look.
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0e14;
  color: #b0bec5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.75;
  min-height: 100vh;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Site Header ─────────────────────────────────────────── */

.site-header {
  padding: 2rem 0 1.5rem;
  text-align: center;
}

.site-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.2s;
}

.site-title:hover {
  color: #64b5f6;
  text-decoration: none;
}

/* ── Menu Bar ────────────────────────────────────────────── */

.menu-bar {
  border-top: 1px solid #1a1f2e;
  border-bottom: 1px solid #1a1f2e;
  background: #0d1118;
  margin-bottom: 2.5rem;
}

.menu-bar .container {
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.menu-bar a {
  display: block;
  padding: 0.65rem 1rem;
  color: #607d8b;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.menu-bar a:hover {
  color: #90caf9;
  text-decoration: none;
}

.menu-bar a.active {
  color: #e0e0e0;
  border-bottom-color: #64b5f6;
}

/* ── Links ───────────────────────────────────────────────── */

a { color: #64b5f6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ──────────────────────────────────────────── */

h1 { font-size: 1.75rem; color: #eceff1; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; color: #eceff1; font-weight: 600; margin: 1.8rem 0 0.6rem; }
h3 { font-size: 1.1rem; color: #cfd8dc; font-weight: 600; margin: 1.4rem 0 0.4rem; }
p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }

/* ── Post Feed (index) ───────────────────────────────────── */

.post-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.post-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid #151b27;
}

.post-card:last-child { border-bottom: none; }

.post-card-link {
  text-decoration: none;
}

.post-card-link:hover { text-decoration: none; }

.post-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #eceff1;
  margin: 0 0 0.5rem;
  transition: color 0.2s;
}

.post-card-link:hover .post-card-title {
  color: #64b5f6;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  font-size: 0.82rem;
  color: #546e7a;
}

.category-label {
  display: inline-block;
  background: #1a2332;
  color: #607d8b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.post-card-excerpt {
  color: #78909c;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: #546e7a;
  transition: color 0.2s;
}

.read-more:hover {
  color: #64b5f6;
  text-decoration: none;
}

.empty {
  text-align: center;
  padding: 4rem 0;
  color: #455a64;
}

/* ── Single Post ─────────────────────────────────────────── */

.post-full {
  padding-bottom: 3rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #151b27;
}

.post-header h1 {
  margin-bottom: 0.6rem;
}

.post-body {
  font-size: 1rem;
  color: #b0bec5;
}

.post-body img { max-width: 100%; border-radius: 6px; margin: 1rem 0; }

/* ── Code ────────────────────────────────────────────────── */

pre {
  background: #0f1520;
  border: 1px solid #1a2332;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
}

:not(pre) > code {
  background: #131a24;
  border: 1px solid #1a2332;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
}

/* ── Blockquote ──────────────────────────────────────────── */

blockquote {
  border-left: 3px solid #263238;
  padding-left: 1rem;
  color: #607d8b;
  margin-bottom: 1rem;
  font-style: italic;
}

hr { border: none; border-top: 1px solid #1a2332; margin: 2rem 0; }

/* ── 404 ─────────────────────────────────────────────────── */

main > h1:first-child {
  text-align: center;
  padding-top: 2rem;
}
