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

:root {
  --bg:      #0d0d0d;
  --surface: #1a1a1a;
  --text:    #d4d4d4;
  --accent:  #00ff88;
  --muted:   #666666;
  --border:  #2a2a2a;
}

body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Header ── */
header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
}

.site-title::before { content: '~/'; color: var(--muted); }
.site-title::after  { content: ' $'; color: var(--muted); }

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

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

nav a:not(.site-title) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1.5rem;
}

nav a:not(.site-title):hover { color: var(--accent); }

.lang-switch {
  margin-left: auto;
  font-size: 0.8rem;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.1em 0.5em;
}

.lang-switch a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
}

/* ── Post list (home) ── */
ul.posts {
  list-style: none;
}

ul.posts li {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.6rem;
  align-items: baseline;
}

ul.posts time {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  min-width: 10ch;
}

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

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

/* ── Article ── */
article header {
  margin-bottom: 2rem;
  border: none;
  padding: 0;
}

article header h1 {
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

article header time {
  color: var(--muted);
  font-size: 0.85rem;
}

article header time::before {
  content: '# ';
  color: var(--border);
}

article h2, article h3, article h4 {
  color: var(--accent);
  margin: 2rem 0 0.75rem;
}

article p { margin-bottom: 1.25rem; }

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

article code {
  background: var(--surface);
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}

article pre {
  background: var(--surface);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 3px solid var(--accent);
}

article pre code {
  background: none;
  padding: 0;
}

article blockquote {
  border-left: 3px solid var(--muted);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1.5rem 0;
}

article img { max-width: 100%; }

article ul, article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

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

footer::before {
  content: '> ';
  color: var(--border);
}
