

:root {
  --bg:          #0c0c0c;
  --bg-raised:   #141414;
  --bg-surface:  #1a1a1a;
  --border:      #2a2a2a;
  --text:        #c8c8c8;
  --text-dim:    #777;
  --text-bright: #e8e8e8;
  --green:       #33cc66;
  --green-dim:   #1a6633;
  --green-glow:  rgba(51, 204, 102, 0.15);
  --mono:        "JetBrains Mono", monospace;
  --sans:        "IBM Plex Sans", sans-serif;
  --container:   1100px;
  --content:     740px;
  --sidebar:     220px;
  --gap:         2rem;
}
*, *::before, *::after {
  box-sizing: border-box;
}
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, pre {
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--green-glow);
  color: var(--green);
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-layout {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: 3rem;
  align-items: start;
}
.page-content {
  max-width: var(--content);
  min-width: 0;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}
.site-title:hover {
  text-decoration: none;
  opacity: 0.85;
}
.site-title .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  background: var(--green);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.nav-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.nav-toggle:hover {
  color: var(--green);
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: lowercase;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--green);
}
main {
  min-height: calc(100vh - 140px);
  padding: var(--gap) 0;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: var(--gap);
  letter-spacing: 0.03em;
}
.entry-list {
  list-style: none;
}
.entry-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.entry-item:first-child {
  padding-top: 0;
}
.entry-item:last-child {
  border-bottom: none;
}
.entry-date {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  padding-top: 0.15rem;
  white-space: nowrap;
}
.entry-body {
  min-width: 0;
}
.entry-title {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
}
.entry-title a {
  color: var(--text-bright);
}
.entry-title a:hover {
  color: var(--green);
  text-decoration: none;
}
.entry-excerpt {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.entry-thumb {
  margin-top: 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.entry-read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--green);
}
.entry-read-more:hover {
  text-decoration: none;
  opacity: 0.8;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.pagination a {
  color: var(--green);
}
.pagination a:hover {
  text-decoration: none;
  opacity: 0.8;
}
.pagination .page-info {
  color: var(--text-dim);
}
.pagination .disabled {
  color: var(--border);
  pointer-events: none;
}
.post-header {
  margin-bottom: var(--gap);
}
.post-title {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.3;
}
.post-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
  font-family: var(--mono);
  color: var(--text-bright);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.post-content h2 {
  font-size: 1.3rem;
}
.post-content h3 {
  font-size: 1.15rem;
}
.post-content h4 {
  font-size: 1.05rem;
}
.post-content h5 {
  font-size: 1rem;
}
.post-content h6 {
  font-size: 0.95rem;
  color: var(--text-dim);
}
.post-content p {
  margin-bottom: 1.25rem;
}
.post-content ul, .post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.post-content li {
  margin-bottom: 0.35rem;
}
.post-content blockquote {
  border-left: 3px solid var(--green);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-dim);
  background: var(--bg-raised);
  border-radius: 0 4px 4px 0;
}
.post-content blockquote p:last-child {
  margin-bottom: 0;
}
.post-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--green);
}
.post-content pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  line-height: 1.5;
}
.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.post-content table th, .post-content table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content table th {
  background: var(--bg-surface);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-bright);
}
.post-content table tr:nth-child(even) td {
  background: var(--bg-raised);
}
.post-content img {
  border-radius: 4px;
  border: 1px solid var(--border);
  margin: 1rem 0;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.post-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover {
  text-decoration-color: var(--green);
}
.featured-image {
  margin-bottom: var(--gap);
}
.featured-image img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.post-tags {
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green);
  background: var(--green-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}
.tag:hover {
  background: var(--green);
  color: var(--bg);
  text-decoration: none;
}
.sidebar {
  position: sticky;
  top: 4rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.sidebar-section {
  margin-bottom: 1.75rem;
}
.sidebar-section p {
  margin: 0;
}
.sidebar-heading {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}
.sidebar-nav {
  list-style: none;
}
.sidebar-nav li {
  margin-bottom: 0.25rem;
}
.sidebar-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--green);
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: var(--gap);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}
.site-footer a {
  color: var(--text-dim);
}
.site-footer a:hover {
  color: var(--green);
}
.error-page {
  text-align: center;
  padding: 4rem 0;
}
.error-page .error-code {
  font-family: var(--mono);
  font-size: 5rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  text-shadow: 0 0 30px var(--green-glow);
}
.error-page .error-command {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 1.5rem;
}
.error-page .error-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .sidebar {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 0.5rem 0;
  }
  .site-header {
    position: relative;
  }
  .site-header .header-inner {
    position: relative;
  }
  .entry-item {
    grid-template-columns: 6rem 1fr;
  }
}
@media (max-width: 600px) {
  :root {
    --gap: 1.5rem;
  }
  .entry-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .entry-date {
    font-size: 0.8rem;
  }
  .post-title {
    font-size: 1.3rem;
  }
  .post-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
  .error-page .error-code {
    font-size: 3.5rem;
  }
}
