/* ===== Blog background ===== */
body.dragging { user-select: none; }


body {
  background: var(--bg);
}

#fluid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Blog index ===== */

.blog-header {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 48px;
  position: relative;
  z-index: 1;
}

.blog-header-inner {
  width: fit-content;
  margin: 0 auto;
  background: rgba(13, 17, 23, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  color: #ffffff;
}

.blog-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

/* Post list */
.blog-main {
  position: relative;
  z-index: 1;
  padding-bottom: 96px;
}

.blog-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  display: block;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.blog-card:hover {
  border-color: rgba(120, 200, 255, 0.6);
  transform: translateX(4px);
  box-shadow: 0 0 0 1px rgba(120, 200, 255, 0.15), 0 4px 24px rgba(120, 200, 255, 0.1);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.blog-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.blog-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(88, 166, 255, .1);
  border: 1px solid rgba(88, 166, 255, .2);
  color: var(--accent);
}

.blog-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Post page ===== */

.post-header {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 40px;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
}

.post-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color .15s;
}

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

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Post body */
.post-main {
  position: relative;
  z-index: 1;
  padding: 56px 0 96px;
}

.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
}

.post-body h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin: 48px 0 16px;
  letter-spacing: -.01em;
}

.post-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
}

.post-body p { margin-bottom: 20px; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(88, 166, 255, .4);
}

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

.post-body ul,
.post-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.post-body li { margin-bottom: 6px; }

.post-body pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-style: italic;
}

.post-body img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 8px 0 20px;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Post footer nav */
.post-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.post-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}

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