/* ── Local Fonts ── */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/lora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/lora-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-italic-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F5F1EB;
  --text: #2D2D2D;
  --text-light: #5A5A5A;
  --text-faint: #8A8A8A;
  --accent: #C45B28;
  --accent-hover: #a84d22;
  --rule: #D8D3CB;
  --code-bg: #1E1E1E;
  --code-text: #D4D4D4;
  --code-dim: #6A6A6A;
  --code-prompt: #79C0FF;
  --code-green: #7EE787;
  --max-w: 680px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.68;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Header ── */
.site-header {
  width: 100%;
  max-width: var(--max-w);
  padding: 3.5rem 1.5rem 0;
}

.blog-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.blog-title a { color: var(--text); }
.blog-title a:hover { color: var(--accent); }

.blog-tagline {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-faint);
  margin-top: 0.2rem;
}

/* ── Navigation ── */
.site-nav {
  width: 100%;
  max-width: var(--max-w);
  padding: 1.2rem 1.5rem 0;
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.site-nav a {
  color: var(--text-faint);
  transition: color 0.15s;
}

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

/* ── Divider ── */
.divider {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 1.5rem;
  margin: 1.2rem 0 0;
}

.divider hr {
  border: none;
  border-top: 1px solid var(--rule);
}

/* ── Content ── */
.content {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 1.5rem;
  margin: 2rem 0 4rem;
}

/* ── Post list ── */
.post-list { list-style: none; }

.post-list-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list-item:first-child { padding-top: 0; }

.post-list-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.post-list-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 0.25rem 0 0.3rem;
}

.post-list-title:hover { color: var(--accent); }

.post-list-date {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.post-list-teaser {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

.post-list-more {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--accent);
}

.post-list-more:hover { color: var(--accent-hover); }

/* ── Post page ── */
.post-header {
  margin-bottom: 2rem;
}

.post-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
}

.post-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0.3rem 0 0.4rem;
  letter-spacing: -0.01em;
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ── Post body ── */
.post-body p {
  margin-bottom: 1.25rem;
}

.post-body em {
  font-style: italic;
  color: var(--text-light);
}

.post-body strong {
  font-weight: 700;
}

/* ── Pullquote ── */
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.1rem 0 0.1rem 1.3rem;
  margin: 1.6rem 0;
  font-style: italic;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
}

.post-body blockquote p {
  margin-bottom: 0;
}

/* ── Terminal / Code block ── */
.post-body pre {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--code-text);
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--rule);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  color: var(--text);
}

/* ── Signature ── */
.post-signature {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.7;
}

/* ── Post navigation ── */
.post-nav {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.post-nav a { color: var(--text-faint); }
.post-nav a:hover { color: var(--accent); }

/* ── Back link ── */
.back-link {
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.back-link a { color: var(--text-faint); }
.back-link a:hover { color: var(--accent); }
.back-link a::before { content: '← '; }

/* ── Static pages ── */
.static-body h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.6rem;
}

.static-body h2:first-child { margin-top: 0; }

.static-body p {
  margin-bottom: 0.8rem;
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ── Footer ── */
.site-footer {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 1.5rem 3rem;
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-links {
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1.2rem;
}

.footer-links a { color: var(--text-faint); font-size: 0.8rem; }
.footer-links a:hover { color: var(--accent); }

.footer-note {
  font-style: italic;
  font-size: 0.82rem;
  margin-top: 0.4rem;
  color: var(--text-faint);
  opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  body { font-size: 17px; }
  .blog-title { font-size: 1.7rem; }
  .post-title { font-size: 1.5rem; }
  .post-list-title { font-size: 1.2rem; }
  .content { margin: 1.5rem 0 3rem; }
  .post-body pre { font-size: 0.74rem; }
  .post-signature { font-size: 0.7rem; }
}
