:root{
  --bg: #0f1115;
  --bg-soft: #171a20;
  --ink: #cfcfd2;
  --ink-dim: #a8abb2;
  --ink-muted: #7b7f88;
  --accent: #4ecca3;
  --accent-2: #35b98f;
  --line: #2a2f36;
  --code-bg: #14171d;
  --table-stripe: #1a1f26;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono",
               "Fira Code", "IBM Plex Mono", "Liberation Mono", monospace;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  padding: 26px 32px 6px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 2rem;
  color: var(--accent);
}

.site-subtitle {
  margin: 6px 0 0;
  color: var(--ink-muted);
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 28px;
  padding: 28px 32px 48px;
}

.column {
  min-width: 0;
}

.nav,
.sidebar-column {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 0;
  background: transparent;
  border: 0;
}

.nav-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

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

.nav-list li {
  margin-bottom: 10px;
}

.nav-list a {
  color: var(--ink-muted);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
}

.nav-list a:hover {
  background: rgba(78,204,163,.08);
}

.nav-list a.active {
  color: var(--accent);
  font-weight: 700;
}

.content-column {
  padding: 10px 18px;
  display: flex;
  justify-content: center;
}

.content-inner {
  width: 100%;
  max-width: 70ch;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
a:focus-visible { outline: 2px dashed var(--accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.35;
  margin: 1.6rem 0 0.8rem;
}

h1 { font-size: 1.9rem; background: transparent; }
h2 { font-size: 1.45rem; color: var(--ink); }
h3 { font-size: 1.2rem; color: var(--ink); }

.page-header h1 {
  margin-top: 0;
}

.lead {
  color: var(--ink-muted);
  margin-top: 6px;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  padding: 0;
  background: transparent;
  border: 0;
}

.post-card h2 {
  margin: 6px 0 8px;
}

.post-card-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.post-body {
  background: transparent;
  padding: 0;
  border: 0;
}

.tag-list {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--accent);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.count {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.archive-year {
  margin-bottom: 24px;
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 16px;
}

.archive-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}

.archive-date {
  color: var(--ink-muted);
  font-size: 0.85rem;
  min-width: 100px;
}

.sidebar-block + .sidebar-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.sidebar-list li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.sidebar-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
}

time, .byline {
  color: var(--ink-muted);
}

p, li, td, th, blockquote, code, pre {
  color: var(--ink);
}

p { margin: 0.8rem 0 1rem; }

::selection { background: rgba(78,204,163,.25); color: #e7fff6; }

hr {
  border: 0;
  height: 2px;
  width: 60%;
  margin: 2rem auto;
  background-color: #f5f5f5;
}

blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  color: var(--ink);
}

code {
  background: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: var(--accent);
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}

thead { background: var(--table-stripe); }

th, td {
  color: var(--ink);
  padding: 0.65rem 0.7rem;
  vertical-align: top;
}

tr { border-left: 1px solid var(--bg-soft); }
tr:nth-child(even) { background: var(--table-stripe); }

.site-footer {
  padding: 20px 32px 32px;
  color: var(--ink-dim);
  font-family: serif;
}

button, .button, a.button {
  display: inline-block;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

button:hover, .button:hover, a.button:hover {
  background: rgba(78,204,163,.08);
  color: var(--accent-2);
}

button:focus-visible, .button:focus-visible, a.button:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

kbd {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-bottom-color: #000;
  border-radius: 4px;
  padding: 0 0.35rem;
  font-weight: 600;
}

sup, sub { line-height: 0; }

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .nav,
  .sidebar-column {
    position: static;
  }
}

.post-full h1 {
  display: none;
}
