:root {
  /* Base palette */
  --bg: #0b090a;
  --bg-elevated: #100d0f;
  --text: #e7d8dc;
  --text-soft: #d8c7cc;
  --muted: #a38f96;
  --muted-2: #8c7b81;
  --heading: #f3e8eb;
  --link: #ead9de;
  --link-hover: #fff1f5;
  --border: rgba(255, 235, 240, 0.10);

  /* Layout */
  --page-width: 680px;
  --article-width: 620px;
  --radius: 14px;

  /* Type */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino,
    Georgia, "Times New Roman", serif;
}

/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page shell */
.site-shell {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 42px 28px 88px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 78px;
}

.site-brand,
.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.site-brand {
  color: var(--muted);
  font-size: 15px;
}

.site-brand .sep {
  color: var(--muted-2);
}

.site-nav {
  font-size: 15px;
}

/* Main content */
.content {
  width: 100%;
}

.post {
  max-width: var(--article-width);
}

.post-header {
  margin-bottom: 38px;
}

.post h1 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: clamp(2.35rem, 5vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 520;
}

.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.post-body {
  color: var(--text-soft);
}

.post-body p {
  margin: 0 0 1.48em;
}

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

/* Links */
a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: rgba(255, 235, 240, 0.25);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  transition:
    color 140ms ease,
    text-decoration-color 140ms ease,
    opacity 140ms ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration-color: rgba(255, 241, 245, 0.55);
}

.site-header a,
.site-brand a,
.site-nav a {
  text-decoration: none;
  color: var(--muted);
}

.site-header a:hover,
.site-header a:focus-visible {
  color: var(--heading);
}

/* Divider */
.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 86px 0 54px;
}

/* Related section */
.related {
  max-width: var(--article-width);
}

.related h2 {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.related ul {
  margin: 0;
  padding-left: 20px;
}

.related li {
  margin: 10px 0;
  color: var(--text-soft);
}

/* Footer */
.site-footer {
  max-width: var(--article-width);
  margin-top: 60px;
  color: var(--muted);
  font-size: 15px;
}

.site-footer p {
  margin: 0;
}

/* Selection */
::selection {
  background: rgba(255, 214, 226, 0.18);
  color: #fff6f8;
}

/* Focus accessibility */
a:focus-visible {
  outline: 2px solid rgba(255, 225, 235, 0.28);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Optional prose niceties */
blockquote {
  margin: 2em 0;
  padding-left: 1em;
  border-left: 1px solid var(--border);
  color: var(--muted);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
}

code {
  color: #f1dde3;
  background: rgba(255, 228, 236, 0.06);
  padding: 0.12em 0.35em;
  border-radius: 6px;
}

pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-soft);
}

/* Responsive */
@media (max-width: 720px) {
  body {
    font-size: 18px;
    line-height: 1.72;
  }

  .site-shell {
    padding: 24px 20px 72px;
  }

  .site-header {
    margin-bottom: 52px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .post-header {
    margin-bottom: 28px;
  }

  .section-divider {
    margin: 66px 0 42px;
  }
}

/* Extra-wide screens: keep the same quiet look */
@media (min-width: 1400px) {
  .site-shell {
    max-width: 720px;
  }
}