/* ============================================
   Aaron Dow — Bespoke literary design system
   Warm off-white + earthy terracotta + dark mode
   ============================================ */

:root {
  /* Light mode */
  --bg: #f8f5f0;
  --text: #2c2a26;
  --text-muted: #6b6560;
  --accent: #9a6b4a;
  --accent-hover: #7d5539;
  --border: #e6dfd4;
  --header-rule: #e0d8cc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1917;
    --text: #e8e4df;
    --text-muted: #a39e98;
    --accent: #c48a66;
    --accent-hover: #d4a07a;
    --border: #2e2b28;
    --header-rule: #2e2b28;
  }
}

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

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-main,
.site-footer {
  width: 100%;
  max-width: 42rem; /* ~672px — comfortable reading measure */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.site-header {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--header-rule);
  margin-bottom: 3rem;
}

.header-inner {
  text-align: left;
}

.site-title {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  margin: 0 0 0.25rem 0;
}

.site-title:hover {
  color: var(--accent);
}

.site-tagline {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0 0 1.75rem 0;
  font-style: normal;
}

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

.site-nav a {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-main {
  flex: 1;
  padding-bottom: 4rem;
}

.site-footer {
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-top: 2.25em;
  margin-bottom: 0.75em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.85rem;
  margin-top: 0;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.35em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

/* Post list (homepage & writing index) */
.post-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
}

.post-list li {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-list a {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.post-list a:hover {
  color: var(--accent);
}

.post-meta {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.post-excerpt {
  font-size: 0.98rem;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

/* Individual post */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-date {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Prose adjustments */
.site-main > p:first-child {
  margin-top: 0;
}

ul, ol {
  margin-bottom: 1.35em;
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.4em;
}

blockquote {
  margin: 1.75em 0;
  padding-left: 1.25em;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

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

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 17px;
  }
  
  .site-header {
    padding-top: 2.5rem;
  }
  
  .site-nav {
    gap: 1.15rem;
  }
  
  h1 {
    font-size: 1.6rem;
  }
}
