/* Blog styles. Tokens, fonts and nav mirror the homepage (index.html). */
:root {
  --bg: #f4f8ff;
  --bg-elev: #ffffff;
  --bg-card: #fbfcff;
  --border: #d9e2f5;
  --border-bright: #b8c8e8;
  --text: #0a1a3d;
  --text-dim: #4a5a7a;
  --text-mute: #8a96ae;
  --accent: #3366ff;
  --accent-dim: #1e3fb8;
  --accent-soft: rgba(51, 102, 255, 0.06);
  --shadow-sm: 0 1px 3px rgba(10, 26, 61, 0.04), 0 1px 2px rgba(10, 26, 61, 0.03);
  --shadow-md: 0 4px 12px rgba(10, 26, 61, 0.06), 0 2px 4px rgba(10, 26, 61, 0.04);
  --display: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Geist Mono', 'SF Mono', Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
::selection { background: var(--accent); color: #fff; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ============ NAV ============ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  background: rgba(244, 248, 255, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 22px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--text); text-decoration: none;
}
.brand-dot { color: var(--accent); }
.brand-mark { width: 30px; height: 28px; display: block; flex: none; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px;
  font-weight: 400; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  padding: 9px 18px; background: var(--accent); color: #fff;
  border-radius: 6px; font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em;
  transition: all 0.2s;
}
.nav-links a.nav-cta:hover { background: var(--accent-dim); color: #fff; transform: translateY(-1px); }

/* ============ PAGE ============ */
main { padding: 120px 32px 80px; }
.page, .post { max-width: 760px; margin: 0 auto; }
.post-meta {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 16px;
}
.list-header, .post-header { margin-bottom: 48px; }
.list-header h1, .post-header h1 {
  font-family: var(--display); font-weight: 500; line-height: 1.08;
  letter-spacing: -0.035em; font-size: clamp(32px, 5vw, 52px);
}
.list-header h1 em { font-style: normal; color: var(--accent); }
.back-link {
  display: inline-block; margin-bottom: 28px;
  font-family: var(--mono); font-size: 12px; color: var(--text-mute);
  text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* ============ POST LIST ============ */
.post-list { list-style: none; margin-bottom: 64px; }
.post-list li { border-top: 1px solid var(--border); }
.post-list li:last-child { border-bottom: 1px solid var(--border); }
.post-list a {
  display: block; padding: 28px 0; color: inherit; text-decoration: none;
}
.post-list .post-meta { display: block; margin-bottom: 8px; color: var(--text-mute); }
.post-title {
  display: block; font-family: var(--display); font-size: 24px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.2; transition: color 0.2s;
}
.post-list a:hover .post-title { color: var(--accent); }
.post-excerpt { display: block; margin-top: 10px; font-size: 15px; color: var(--text-dim); line-height: 1.6; }
.post-empty { padding: 28px 0; color: var(--text-dim); }

/* ============ POST BODY ============ */
.post-body { font-size: 17px; line-height: 1.75; color: var(--text); margin-bottom: 72px; }
.post-body > * + * { margin-top: 1.2em; }
.post-body h2, .post-body h3 {
  font-family: var(--display); font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.2; margin-top: 2em;
}
.post-body h2 { font-size: 28px; }
.post-body h3 { font-size: 22px; }
.post-body a { color: var(--accent); text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent-dim); }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.4em; }
.post-body blockquote {
  padding-left: 18px; border-left: 3px solid var(--border-bright); color: var(--text-dim);
}
.post-body code {
  font-family: var(--mono); font-size: 0.88em; padding: 2px 6px;
  background: var(--accent-soft); border-radius: 4px;
}
.post-body pre {
  overflow-x: auto; padding: 16px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 8px; font-size: 14px; line-height: 1.6;
}
.post-body pre code { padding: 0; background: none; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.post-body hr { border: 0; border-top: 1px solid var(--border); }

/* ============ SUBSCRIBE ============ */
.subscribe {
  max-width: 760px; margin: 0 auto; padding: 32px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-sm);
}
.subscribe-label {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px;
}
.subscribe h2 {
  font-family: var(--display); font-size: 24px; font-weight: 500;
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.subscribe p { font-size: 14.5px; color: var(--text-dim); margin-bottom: 20px; }
.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 12px 14px;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-bright); border-radius: 8px;
}
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.subscribe-form button {
  padding: 12px 22px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: #fff; background: var(--accent); border: 1px solid var(--accent);
  border-radius: 8px; cursor: pointer; transition: background 0.2s;
}
.subscribe-form button:hover:not(:disabled) { background: var(--accent-dim); }
.subscribe-form input:disabled, .subscribe-form button:disabled {
  opacity: 0.55; cursor: not-allowed;
}
.subscribe .subscribe-note {
  margin: 14px 0 0; font-family: var(--mono); font-size: 12px; color: var(--text-mute);
}

/* ============ FOOTER ============ */
footer { padding: 32px; background: var(--bg-elev); border-top: 1px solid var(--border); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; display: flex;
  justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-mute);
}
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .nav-links .nav-secondary { display: none; }
}
@media (max-width: 640px) {
  .nav-inner { padding: 14px 24px; }
  main { padding: 96px 24px 56px; }
  footer { padding: 28px 24px; }
  .subscribe { padding: 24px 20px; }
  .post-body { font-size: 16px; }
  .post-title { font-size: 21px; }
}
