:root {
  --font: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --text: #141B26;
  --text-muted: #666;
  --bg: #F9F8F6;
  --accent: #3b6ea5;
  --border: #e5e5e5;
  --sidebar-w: 200px;
  --gap: 4rem;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ── wrapper ─────────────────────────────── */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── header ──────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

.site-name:hover {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr 140px 140px;
  gap: 3rem;
  align-items: start;
}

/* ── main ────────────────────────────────── */
main {
  min-width: 0;
  min-height: 50vh;
}

/* ── links ───────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


.intro p {
  margin-bottom: 1rem;
}

/* ── post list ───────────────────────────── */
h1 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-list a {
  color: var(--text);
  font-size: 0.9rem;
}

.post-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.date {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}



.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-empty {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* tags */
.sidebar-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sidebar-tags li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-tags li a:hover {
  color: var(--accent);
  text-decoration: none;
}

.tag-count {
  color: var(--border);
  font-size: 0.7rem;
}

/* archive */
.sidebar-archive {
  list-style: none;
}

.archive-year {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

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

.archive-post a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  display: flex;
  gap: 0.5rem;
  padding: 0.15rem 0;
  line-height: 1.4;
}

.archive-post a:hover {
  color: var(--accent);
  text-decoration: none;
}

.archive-date {
  flex-shrink: 0;
  color: var(--border);
}

/* ── post tags inline ────────────────────── */
.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #f0eeec;
  padding: 0.1em 0.5em;
  border-radius: 2px;
  text-decoration: none;
}

.tag:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── article ─────────────────────────────── */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  text-transform: none;
}

.post-header time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content h2 {
  font-size: 0.95rem;
  margin: 2rem 0 0.75rem;
}

.post-content h3 {
  font-size: 0.9rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-muted);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.25rem;
}

.post-content code {
  background: #f0eeec;
  padding: 0.1em 0.35em;
  border-radius: 2px;
  font-size: 0.9em;
}

.post-content pre {
  background: #f0eeec;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: 2px;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

.post-content blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  color: var(--text-muted);
  margin: 1.25rem 0;
}

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

/* ── post footer ─────────────────────────── */
.post-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.post-footer a {
  color: var(--text-muted);
}

.post-footer a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── footer ──────────────────────────────── */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}



.post-card a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.post-card:first-child a { border-top: 1px solid var(--border); }
.post-card a:hover .post-card-title { color: var(--accent); }
.post-card-title { font-size: 0.9rem; font-weight: 700; }
.post-card-preview { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.post-card-date { font-size: 0.75rem; color: var(--text-muted); }

.col-tags,
.col-archive {
  position: sticky;
  top: 2rem;
  font-size: 0.8rem;
}

.archive-month {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-left: 0.5rem;
  margin: 0.15rem 0;
}

/* ── responsive ──────────────────────────── */

@media (max-width: 680px) {
  .content-area {
    grid-template-columns: 1fr;
  }
  .col-tags, .col-archive {
    position: static;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
  }
}
