/* style.css */

/* Top-right floating site logo */
.site-logo {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  z-index: 10;
  opacity: 0.88;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.site-logo:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.site-logo img {
  height: 52px;
  width: auto;
  display: block;
}

@media (max-width: 720px) {
  .site-logo img {
    height: 38px;
  }
}

/* Tables: rounded corners, dividing lines, double header underline, centered cells */
table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

th,
td {
  text-align: center;
  vertical-align: middle;
  padding: 0.65rem 0.9rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

th:last-child,
td:last-child {
  border-right: none;
}

tbody tr:last-child td {
  border-bottom: none;
}

thead th,
tr:first-child th {
  background: var(--card);
  font-weight: 600;
  border-bottom: 3px double var(--accent);
}

.toc-year {
  margin-top: 2rem;
}

.toc-month {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1rem 0 0.4rem;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  margin: 0.45rem 0;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.toc-date {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

:root {
  --bg: #fcfcfa;
  --fg: #1c1c1c;
  --muted: #666666;
  --border: #e2e2dc;
  --accent: #2b5b84;
  --card: #f4f4ef;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Georgia, serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  margin: 0;
  padding: 2.5rem 1.25rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

article {
  max-width: 680px;
}

h1.post-title {
  font-size: 2.15rem;
  line-height: 1.2;
  margin: 0 0 0.5rem 0;
}

h2 {
  margin-top: 2rem;
  font-size: 1.4rem;
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.65rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tag {
  background: #eeeee8;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: #333333;
}

.epistemic {
  font-style: italic;
  color: var(--accent);
}

.callout {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
}

.callout-title {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--accent);
}

.js-island {
  border: 1px dashed #bbbbbb;
  background: #f9f9f6;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--muted);
}

.sidenote-ref {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0 2px;
}

.sidenote {
  float: right;
  clear: right;
  margin-right: -340px;
  width: 300px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #444444;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

.sidenote-num {
  font-weight: bold;
  color: var(--accent);
}

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

pre {
  background: var(--card);
  padding: 0.9rem;
  border-radius: 6px;
  overflow-x: auto;
}

@media (max-width: 1080px) {
  .sidenote {
    float: none;
    display: block;
    width: auto;
    margin: 0.75rem 0;
    background: var(--card);
    padding: 0.6rem 0.8rem;
  }
}
