/* ==========================================================
   Blog styles
   Early-2000s web: web-safe fonts, thin borders, glossy buttons.
   ========================================================== */

:root {
  --ink: #000;
  --text: #222;
  --paper: #fff;
  --line: #999;
  --soft: #f2f2f2;
  --mid: #666;
  --link: #003399;
  --visited: #663399;
}

* { box-sizing: border-box; }

html { background: #fff; }

body {
  margin: 0;
  color: var(--text);
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  background: #fff;
}

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: #cc0000; }

/* the logo is pixel art, keep it crisp when scaled */
.logo img { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- page shell ---------- */

.page {
  max-width: 780px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page > main { flex: 1; }

/* ---------- top bar ---------- */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.logo { grid-column: 2; display: block; line-height: 0; }
.logo img { width: 160px; height: auto; mix-blend-mode: multiply; } /* drop the PNG's white box */

.nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 6px;
}

.nav a,
.nav a:visited {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #888;
  border-radius: 3px;
  background: linear-gradient(#ffffff, #dcdcdc);
}
.nav a:hover { background: linear-gradient(#f4f4f4, #c8c8c8); color: #000; }
.nav a[aria-current="page"] { background: linear-gradient(#555, #222); color: #fff; border-color: #222; }

/* ---------- marquee strip ---------- */

.strip {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  background: #000;
  color: #fff;
  padding: 3px 12px;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 1px solid #000;
}
.strip span { display: inline-block; padding-left: 100%; animation: scroll 22s linear infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .strip span { animation: none; padding-left: 0; }
}

/* ---------- main content ---------- */

main { padding: 22px 24px 32px; }

h1, h2, h3 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
}

.section-title {
  font-size: 15px;
  margin: 0 0 16px;
  padding: 4px 8px;
  background: var(--soft);
  border: 1px solid #ccc;
  border-left: 4px solid #333;
}

/* ---------- post bars ---------- */

.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-bottom: 1px solid #ccc; }

.post,
.post:visited {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  color: var(--text);
  text-decoration: none;
}

.post-img { flex: 0 0 140px; line-height: 0; }
.post-img img {
  width: 140px;
  height: 86px;
  object-fit: contain;   /* show whole charts, don't crop */
  background: #fff;
  display: block;
  border: 1px solid #ccc;
}

.post-body { flex: 1; min-width: 0; }

.post-title { font-size: 16px; line-height: 1.3; margin: 0 0 4px; }
.post-desc { margin: 0 0 4px; }
.post-meta { font-size: 10px; color: var(--mid); }

.post:hover .post-title { text-decoration: underline; }
.post:focus-visible { outline: 1px dotted #333; }

/* ---------- article pages ---------- */

.article h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: normal;
  margin: 0 0 2px;
}
.article .post-meta { display: block; margin-bottom: 16px; }
.article .hero {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #ccc;
  margin-bottom: 18px;
  display: block;
}
.article h2 { font-size: 16px; margin: 26px 0 8px; border-bottom: 1px dotted #999; }
.article p { margin: 0 0 12px; }
.article ul { margin: 0 0 12px; padding-left: 22px; }
.article li { margin-bottom: 4px; }
.article code { font-family: "Courier New", monospace; font-size: 12px; background: var(--soft); padding: 0 3px; }
.article .placeholder { margin-bottom: 14px; }
.article .figure { width: 100%; height: auto; display: block; border: 1px solid #ccc; margin: 0 0 14px; }
.article .aside-icon { float: right; width: 108px; margin: 0 0 8px 16px; image-rendering: pixelated; }

.back { font-size: 11px; display: inline-block; margin-bottom: 18px; }

.placeholder {
  border: 1px dashed #999;
  background: #fffbe6;
  padding: 24px;
  text-align: center;
  font-weight: bold;
  color: #555;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px 20px;
  text-align: center;
  font-size: 10px;
  color: var(--mid);
}

/* ---------- small screens ---------- */

@media (max-width: 600px) {
  .page { margin: 0; border: 0; min-height: 100vh; }
  .topbar { grid-template-columns: 1fr; justify-items: center; gap: 10px; }
  .logo, .nav { grid-column: 1; justify-self: center; }
  main { padding: 16px 16px 28px; }
  .post { flex-direction: column; gap: 10px; }
  .post-img img { width: 100%; height: 140px; }
}
