/* ===== Variables ===== */
:root {
  --text: #1a1a1a;
  --muted: #666;
  --bg: #fafaf8;
  --border: #e5e5e0;
  --max-width: 680px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Base ===== */
html { font-size: 17px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  padding: 0 1.5rem;
}

/* ===== Layout ===== */
header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== Nav ===== */
header {
  display: flex;
  align-items: center;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

nav {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
}

.site-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: normal;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: normal;
  line-height: 1.25;
  margin-bottom: 0.6em;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.4rem; margin-top: 2.5rem; }
h3 { font-size: 1.15rem; margin-top: 2rem; }

p { margin-bottom: 1.2rem; }

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: var(--muted); }

ul, ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}

li { margin-bottom: 0.3rem; }

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ===== Article ===== */
article { padding-bottom: 4rem; }

/* ===== Footer ===== */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}
