/* ------------------------------------------------------------------
   Tarski-inspired, screen-filling. Serif headings, small sans body,
   thin gray rules, no cards or shadows.
   ------------------------------------------------------------------ */

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

body {
  margin: 0;
  background: #fff;
  color: #222;
  font: 87.5%/1.65 Verdana, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: #14468c;
  text-decoration: none;
  border-bottom: 1px solid #c6d2e4;
}

a:hover, a:focus { color: #b32; border-bottom-color: #e0b6b0; }
a:visited { color: #5a3a86; }
a:visited:hover { color: #b32; }

/* ---------- layout ---------- */

#wrapper {
  width: 94%;
  max-width: 1500px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

#content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  padding-top: 2rem;
}

.primary { min-width: 0; }
.secondary { width: auto; min-width: 0; }

/* ---------- header ---------- */

#header {
  padding: 2.5rem 0 1.25rem;
}

.site-title {
  margin: 0;
  font: normal 2.6em/1.15 "Times New Roman", Times, serif;
  letter-spacing: -0.01em;
}

.site-title a {
  color: #111;
  border-bottom: none;
}

.site-title a:hover { color: #b32; }

.site-tagline {
  margin: 0.4rem 0 0;
  color: #666;
  font-size: 0.95em;
}

/* ---------- nav ---------- */

#nav {
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 0.55rem 0;
}

#nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

#nav a {
  color: #444;
  border-bottom: none;
  font-size: 0.92em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#nav a:hover { color: #b32; }

#nav a.current { color: #111; font-weight: bold; }

/* ---------- entries ---------- */

.entry + .entry {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #e3e3e3;
}

.entry-title {
  margin: 0 0 0.35rem;
  font: normal 2em/1.25 "Times New Roman", Times, serif;
  color: #111;
}

.entry-title a { color: #111; border-bottom: none; }
.entry-title a:hover { color: #b32; }

.entry-meta {
  margin: 0 0 1.5rem;
  color: #777;
  font-size: 0.85em;
}

/* Article fills its column. Set a max-width here (e.g. 46em) if you'd
   rather have a narrow, Tarski-style measure on wide screens. */
.entry-content { max-width: none; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  color: #111;
  margin: 2rem 0 0.6rem;
  line-height: 1.3;
}

.entry-content h2 { font-size: 1.65em; }
.entry-content h3 { font-size: 1.35em; }
.entry-content h4 { font-size: 1.15em; font-weight: bold; }

.entry-content p,
.entry-content ul,
.entry-content ol { margin: 0 0 1.15rem; }

.entry-content ul,
.entry-content ol { padding-left: 1.5rem; }

.entry-content li { margin-bottom: 0.35rem; }

.entry-content img { max-width: 100%; height: auto; }

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid #ddd;
  color: #555;
}

.entry-content hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}

/* home page */

.lede {
  font-size: 1.08em;
  margin: 0 0 1.5rem;
}

.home-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.95em;
}

/* archives */

.archive-year {
  font: normal 1.5em/1.3 "Times New Roman", Times, serif;
  color: #111;
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e3e3e3;
}

.archive-year:first-of-type { margin-top: 0; }

.archive-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: flex;
  gap: 1rem;
  padding: 0.28rem 0;
}

.archive-date {
  flex: 0 0 6.5em;
  color: #888;
  font-size: 0.88em;
  padding-top: 0.12em;
}

/* post nav */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e3e3e3;
  font-size: 0.9em;
}

.post-nav .next { margin-left: auto; text-align: right; }

/* ---------- sidebar ---------- */

.secondary {
  font-size: 0.9em;
}

.widget { margin-bottom: 2.25rem; }

.widget h3 {
  margin: 0 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #ccc;
  font: normal 1.15em/1.3 "Times New Roman", Times, serif;
  color: #111;
}

.widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child { border-bottom: none; }

.widget-date,
.widget-count {
  display: block;
  color: #999;
  font-size: 0.85em;
}

.widget-count { display: inline; margin-left: 0.25rem; }

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

#footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
  color: #888;
  font-size: 0.85em;
}

#footer p { margin: 0; }

/* ---------- code ---------- */

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

code {
  background: #f6f6f6;
  border: 1px solid #eaeaea;
  padding: 0.08em 0.32em;
}

pre {
  background: #f8f8f8;
  border: 1px solid #e3e3e3;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

.highlight { margin: 0 0 1.15rem; }

/* understated rouge palette */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: #8a8a8a; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: #2b5f8a; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .se, .highlight .sb { color: #7a5229; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh { color: #7a5229; }
.highlight .nf, .highlight .nd { color: #55408a; }
.highlight .nc, .highlight .nn { color: #2b5f8a; }
.highlight .o, .highlight .ow { color: #444; }
.highlight .err { color: #b32; }

/* ---------- tables ---------- */

.entry-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.15rem;
  font-size: 0.95em;
}

.entry-content th,
.entry-content td {
  border-bottom: 1px solid #e3e3e3;
  padding: 0.45rem 0.6rem;
  text-align: left;
}

.entry-content th {
  border-bottom: 1px solid #ccc;
  font-weight: bold;
}

/* wide content scrolls inside itself, never the page */
.table-scroll { overflow-x: auto; }

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  #wrapper { width: calc(100% - 32px); }

  #content {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .secondary {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #ccc;
  }

  .site-title { font-size: 2.1em; }

  #nav ul { gap: 1.1rem; }

  .archive-list li { flex-direction: column; gap: 0; }
  .archive-date { flex: none; }
}
