/* ── K9-AIF Blog Unified style.css ── */

:root {
  --bg: #f8f7f4;
  --text: #1c1c1c;
  --muted: #888;
  --border: #ddd7cf;
  --accent: #2d6ae0;
  --accent-hover: #1a4fba;
  --accent-light: #eef3fc;
  --accent-text: #1a3a6e;
  --code-bg: #eef3fc;
  --quote-bg: #eef3fc;
  --quote-color: #2a4a80;
}

* { box-sizing: border-box; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.75;
}

.container { max-width: 780px; margin: 0 auto; padding: 0 28px; }

/* ── Header ── */
.site-header {
  padding: 36px 0 22px;
  border-bottom: 3px solid var(--accent);
  margin-bottom: 32px;
}

.site-title {
  display: inline-block;
  font-size: 1.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 4px;
}

.site-title:hover { color: var(--accent); }

.site-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Content ── */
.content { padding-bottom: 64px; }

/* ── Headings ── */
h1 { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: 0; margin-bottom: 0.65rem; }
h2 { font-size: 1.45rem; font-weight: 700; color: var(--accent); line-height: 1.25; margin-top: 1.8rem; margin-bottom: 0.5rem; padding-left: 0.7rem; border-left: 4px solid var(--accent); }
h3 { font-size: 1.25rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-top: 1.2rem; margin-bottom: 0.4rem; }
h4 { font-size: 1.05rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-top: 1rem; margin-bottom: 0.35rem; }

/* Strong / Bold text */
.content strong, .content b { font-weight: 700; color: var(--text); }

/* ── Paragraphs ── */
p { margin: 0.8rem 0; line-height: 1.7; }

/* ── Lists ── */
ul, ol { margin: 0.7rem 0 1rem 1.3rem; padding: 0; }
li { margin: 0.35rem 0; }
li::marker { color: var(--accent); }

/* ── Links ── */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Blockquotes ── */
blockquote {
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: var(--quote-bg);
  color: var(--quote-color);
  font-style: italic;
}

/* ── Horizontal rules ── */
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Code ── */
code { background: var(--code-bg); color: var(--accent-text); padding: 0.13rem 0.33rem; border-radius: 4px; font-size: 0.9em; }
pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  line-height: 1.55;
  margin: 1rem 0 1.2rem;
}
pre code { background: none; color: var(--accent-text); padding: 0; }
pre:hover { box-shadow: 0 0 6px rgba(0,0,0,0.05); }

/* ── Images ── */
img { max-width: 100%; height: auto; margin: 1rem 0 1.2rem; border-radius: 6px; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
th, td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--accent-light); color: var(--accent-text); font-weight: 600; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f1f1f1; }

/* ── Post meta ── */
.post-meta { display: block; color: var(--muted); font-size: 0.9rem; font-family: Georgia, serif; margin-bottom: 0.25rem; }

/* ── Tags / Pills ── */
.post-tags { margin: 0.6rem 0 1rem; }
.post-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-family: Georgia, serif;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 5px;
  margin-bottom: 4px;
  text-decoration: none;
}
.post-tag:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ── Post list (index) ── */
.post-list-heading { margin-top: 1.5rem; }
.post-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.post-list li { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.post-link { font-size: 1.3rem; font-weight: 700; line-height: 1.3; color: var(--accent); }
.post-link:hover { color: var(--accent-hover); }

/* ── Compact post list ── */
.compact-post-list { list-style: none; padding: 0; margin: 0; }
.compact-post-list li { padding: 0 0 0.95rem 0; margin: 0 0 0.95rem 0; border-bottom: 1px solid var(--border); }

.post-date { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.2rem; }
.post-title-link { font-size: 1.08rem; font-weight: 700; line-height: 1.3; color: var(--accent); text-decoration: none; }
.post-title-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Home intro ── */
.home-intro { margin-bottom: 1.5rem; }
.home-intro p { margin: 0; font-size: 1.02rem; color: var(--text); }

/* ── Post index ── */
.post-index h2 { margin-top: 0; margin-bottom: 0.9rem; font-size: 1.6rem; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0 38px; color: var(--muted); font-size: 0.9rem; }

/* ── Responsive ── */
@media (max-width: 640px) {
  html { font-size: 17px; }
  .container { padding: 0 20px; }
  .site-header { padding-top: 28px; margin-bottom: 24px; }
  .site-title { font-size: 1.65rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.28rem; }
  .post-link { font-size: 1.15rem; }
}
