:root {
  --bg: #edf1f3;
  --surface: #ffffff;
  --text: #1d2a33;
  --muted: #5b6b76;
  --accent: #1f6f78;
  --line: #d8e0e4;
  --header: #16323d;
  --header-text: #f2f6f7;
  --header-muted: #aebfc7;
  --shadow: 0 1px 2px rgba(22, 50, 61, 0.06), 0 4px 16px rgba(22, 50, 61, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a1f;
    --surface: #17262d;
    --text: #e6eef1;
    --muted: #98aab4;
    --accent: #5cc0c9;
    --line: #243741;
    --header: #0b1418;
    --header-text: #f2f6f7;
    --header-muted: #8fa3ad;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

/* Nav bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--header);
  border-bottom: 3px solid var(--accent);
}

.site-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--header-text);
  text-decoration: none;
}

nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: block;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  color: var(--header-muted);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--header-text);
  background: rgba(255, 255, 255, 0.1);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Intro band with subtle dot grid */
.intro {
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  background-color: var(--header);
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--header-text);
}

.intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.intro p {
  margin: 0;
  color: var(--header-muted);
  font-family: system-ui, sans-serif;
}

/* Posts */
main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1rem;
  display: grid;
  gap: 1.5rem;
}

article {
  padding: 1.75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  line-height: 1.25;
}

.date {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
}

article p:last-child {
  margin-bottom: 0;
}

footer {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  article {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Multi-page additions */
nav a[aria-current="page"] {
  color: var(--header-text);
  background: rgba(255, 255, 255, 0.14);
}

article h2 a {
  color: var(--text);
  text-decoration: none;
}

article h2 a:hover,
article h2 a:focus-visible {
  color: var(--accent);
}

.post-title {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  line-height: 1.25;
}

.back {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

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

.back a:hover {
  text-decoration: underline;
}

/* Post images */
.post-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
  border-radius: 6px;
}
