:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --text: #c8c8d0;
  --text-dim: #6a6a7a;
  --accent: #7b8cde;
  --accent-glow: #5b6cbf;
  --border: #1e1e2e;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

header h1 {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}

header h1 span {
  color: var(--text-dim);
}

header p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 8px;
  font-family: var(--mono);
}

/* Navigation */
nav {
  margin-top: 16px;
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--accent); }

/* Posts list */
.posts { list-style: none; }

.posts li {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

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

.posts a {
  text-decoration: none;
  color: var(--text);
  display: block;
}

.posts a:hover h2 { color: var(--accent); }

.posts h2 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.posts time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.posts .excerpt {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.reading-time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Article */
article {
  padding-bottom: 64px;
}

article header {
  border-bottom: none;
  margin-bottom: 32px;
  padding: 48px 0 0;
}

article header h1 {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

article header time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

article .content {
  font-size: 1rem;
}

article .content p {
  margin-bottom: 1.4em;
}

article .content h2 {
  font-size: 1.2rem;
  margin: 2em 0 0.8em;
  color: var(--accent);
}

article .content h3 {
  font-size: 1.05rem;
  margin: 1.6em 0 0.6em;
}

article .content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

article .content code {
  font-family: var(--mono);
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.88em;
  border: 1px solid var(--border);
}

article .content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.6em 0;
}

article .content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

article .content blockquote {
  border-left: 2px solid var(--accent-glow);
  padding-left: 20px;
  margin: 1.6em 0;
  color: var(--text-dim);
  font-style: italic;
}

article .content ul, article .content ol {
  padding-left: 24px;
  margin-bottom: 1.4em;
}

article .content li {
  margin-bottom: 0.4em;
}

article .content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
}

/* Back link */
.back {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-bottom: 16px;
  transition: color 0.2s;
}

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

/* About page */
.about-content {
  font-size: 0.95rem;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 1.2em;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.post-nav-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 45%;
}

.post-nav-link.next { align-items: flex-end; text-align: right; }

.post-nav-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.post-nav-title {
  font-size: 0.9rem;
  color: var(--text);
  transition: color 0.2s;
}

.post-nav-link:hover .post-nav-label,
.post-nav-link:hover .post-nav-title {
  color: var(--accent);
}

/* Footer */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 64px;
  text-align: center;
}

footer p {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Lab series */
.lab-series {
  margin-bottom: 48px;
}

.lab-series-header {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.lab-series-header span {
  color: var(--accent);
  opacity: 0.6;
}

.lab-series .posts li:first-child {
  padding-top: 16px;
}

.lab-count {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}

/* Cursor blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
