@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg: #f7f4ec;
  --ink: #2b2b28;
  --ink-soft: #5c574d;
  --rule: #d8d2c2;
  --accent: #8a3324;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Courier Prime', 'Courier New', Courier, monospace;
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}

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

header.site-header {
  border-bottom: 2px solid var(--ink);
  padding: 28px 0 16px;
  margin-bottom: 36px;
}

.site-header .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.site-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.site-title:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-tagline {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 4px;
}

nav.site-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 15px;
}

nav.site-nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

nav.site-nav a.active,
nav.site-nav a:hover {
  border-bottom-color: var(--ink);
}

.lang-toggle {
  display: flex;
  gap: 6px;
  font-size: 13px;
}

.lang-toggle button {
  font-family: inherit;
  font-size: 13px;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 3px 9px;
  cursor: pointer;
  border-radius: 3px;
}

.lang-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}

main {
  padding-bottom: 60px;
}

h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

h2 {
  font-size: 20px;
}

.subheading {
  color: var(--ink-soft);
  margin-bottom: 32px;
}

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

.article-card {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}

.article-card:first-child {
  padding-top: 0;
}

.meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.badge {
  border: 1px solid var(--ink-soft);
  color: var(--ink-soft);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.article-card h2 a {
  text-decoration: none;
}

.article-card h2 a:hover {
  text-decoration: underline;
}

.excerpt {
  color: var(--ink-soft);
  margin: 0;
}

.empty-state {
  color: var(--ink-soft);
  font-style: italic;
}

.lang-note {
  color: var(--accent);
  font-style: italic;
  font-size: 14px;
  margin: 10px 0 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
}

.article-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.article-body {
  font-size: 18px;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  margin-top: 1.6em;
}

.article-body p {
  margin: 1em 0;
}

.article-body blockquote {
  margin: 1.2em 0;
  padding-left: 16px;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
}

.article-body pre {
  background: #eee9da;
  padding: 14px;
  overflow-x: auto;
  border-radius: 4px;
}

.article-body img {
  max-width: 100%;
}

.article-body a {
  word-break: break-word;
}

.about-body p {
  margin: 1em 0;
}

footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header .row { flex-direction: column; align-items: flex-start; }
}
