/* =========================================================
   Blog — shares the homepage theme (skeleton + Raleway + dark mode)
   ========================================================= */

.blog-title {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -.03rem;
  margin: 0 0 1.2rem 0;
  padding-bottom: .4rem;
  display: inline-block;
  border-bottom: 2px solid #49e;
}
body.dark-mode .blog-title { border-bottom-color: #6aa9ff; }

/* ---- post list (blog.html) ---- */
.post-list { margin-top: 1.6rem; }
.post-list-item { margin-bottom: 1.9rem; }
.post-list-item .post-date {
  font-size: 1.2rem;
  opacity: .6;
  letter-spacing: .02rem;
}
.post-list-item .post-link {
  font-size: 1.7rem;
  font-weight: 600;
  display: inline-block;
  margin: .1rem 0 .25rem 0;
}
.post-list-item .post-summary { line-height: 1.6; opacity: .95; }

/* ---- a single post (posts/*.html) ---- */
.back-link { display: inline-block; margin-bottom: 1.4rem; font-size: 1.3rem; }

.post .post-heading {
  font-size: 2.6rem;
  line-height: 1.2;
  letter-spacing: -.04rem;
  margin: 0 0 .3rem 0;
}
.post .post-meta { font-size: 1.3rem; opacity: .6; margin-bottom: 2.2rem; }
.post p { line-height: 1.75; margin-bottom: 1.4rem; }
.post h2 { font-size: 2rem; margin: 2.4rem 0 .8rem; letter-spacing: -.02rem; }
.post h3 { font-size: 1.6rem; margin: 2rem 0 .5rem; }
.post ul, .post ol { line-height: 1.7; margin-bottom: 1.4rem; }
.post blockquote {
  margin: 1.5rem 0;
  padding: .2rem 0 .2rem 1.2rem;
  border-left: 3px solid #49e;
  opacity: .9;
  font-style: italic;
}
.post pre {
  background: #f4f5f6;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}
.post code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .9em;
}
.post pre code { font-size: inherit; background: none; padding: 0; }
.post :not(pre) > code {
  background: rgba(73,153,238,.12);
  padding: .1rem .35rem;
  border-radius: 3px;
}
.post img { max-width: 100%; height: auto; }

body.dark-mode .post blockquote { border-left-color: #6aa9ff; }
body.dark-mode .post pre { background: #1f2223; border-color: #3a3f41; }
body.dark-mode .post :not(pre) > code { background: rgba(106,169,255,.16); }

/* =========================================================
   Post typography & color
   ========================================================= */
html { scroll-behavior: smooth; }
.post [id] { scroll-margin-top: 1.5rem; }

.post p, .post li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.post ol.references li { text-align: left; hyphens: manual; }

.post .post-heading { font-weight: 600; color: #1d3f6e; }
.post .post-meta { color: #49e; opacity: 1; font-weight: 500; }

.post h2 {
  font-weight: 600;
  color: #1d3f6e;
  border-left: 4px solid #49e;
  padding-left: 1rem;
}
.post h3 { font-weight: 600; color: #2b7bd0; }

/* tables */
.post table { border-collapse: collapse; margin: 1.5rem 0 2rem; }
.post thead th {
  background: rgba(73,153,238,.10);
  color: #1d3f6e;
  font-weight: 600;
  border-bottom: 2px solid #49e;
}
.post th, .post td { padding: .7rem 1.2rem; }
.post th:first-child, .post td:first-child { padding-left: 1.2rem; }
.post tbody tr:nth-child(even) { background: rgba(73,153,238,.04); }
.post tbody td:first-child { font-weight: 500; }
.post td:not(:first-child), .post th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* images (charts, figures) */
.post p > img:only-child {
  display: block;
  margin: 2rem auto 2.2rem;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(29,63,110,.07);
}

/* citations and references */
.post a.cite { font-weight: 600; }
.post .cite-group { white-space: nowrap; }
.post ol.references { font-size: 1.35rem; line-height: 1.6; }
.post ol.references li { padding: .25rem .5rem; margin-left: -.5rem; border-radius: 4px; transition: background .6s; }
.post ol.references li:target { background: rgba(248,151,29,.18); }
.post a.ref-back { font-size: 1.2rem; margin-left: .2rem; }

/* back-to-top button */
.to-top {
  position: fixed;
  right: 2.4rem;
  bottom: 2.4rem;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #49e;
  color: #fff;
  font-size: 1.6rem;
  line-height: 4.4rem;
  box-shadow: 0 3px 12px rgba(29,63,110,.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
  z-index: 100;
}
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover, .to-top:focus { background: #f8971d; color: #fff; outline: none; }

/* dark mode */
body.dark-mode .post .post-heading,
body.dark-mode .post h2,
body.dark-mode .post thead th { color: #cfe3ff; }
body.dark-mode .post h2 { border-left-color: #6aa9ff; }
body.dark-mode .post h3,
body.dark-mode .post .post-meta { color: #6aa9ff; }
body.dark-mode .post thead th { background: rgba(106,169,255,.12); border-bottom-color: #6aa9ff; }
body.dark-mode .post tbody tr:nth-child(even) { background: rgba(106,169,255,.05); }
body.dark-mode .post p > img:only-child { border-color: #3a3f41; box-shadow: none; }
body.dark-mode .to-top { background: #3d7fd9; }
