/* ── Variables ─────────────────────────────────── */
:root {
  --bg:       #f7f5f0;
  --ink:      #191917;
  --muted:    #8c8880;
  --subtle:   #e6e2db;
  --accent:   #7a5c1e;
  --col:      680px;
  --pad:      1.5rem;
  --gap-xs:   0.35rem;
  --gap-sm:   0.75rem;
  --gap-md:   1.5rem;
  --gap-lg:   3rem;
  --gap-xl:   5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ────────────────────────────────────── */
.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── Header ────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--subtle);
  margin-bottom: var(--gap-xl);
}

.site-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.site-name:hover { color: var(--accent); }

nav { display: flex; gap: var(--gap-md); }

nav a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.15s;
}
nav a:hover,
nav a.active { color: var(--ink); }

/* ── Home intro ────────────────────────────────── */
.home-intro {
  margin-bottom: 3.5rem;
}

.home-intro h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.home-intro p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

/* ── Section label ─────────────────────────────── */
.section-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Page heading (Writing list) ───────────────── */
.page-heading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2.5rem;
}

/* ── Post cards ────────────────────────────────── */
.posts-list { list-style: none; }

.post-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--subtle);
}
.post-card:first-child { border-top: 1px solid var(--subtle); }

.post-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.post-card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.15s;
}
.post-card-title:hover { color: var(--accent); }

.post-card-date {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── View all link ─────────────────────────────── */
.view-all {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}
.view-all:hover { opacity: 0.75; }

/* ── About photo ───────────────────────────────── */
.about-photo {
  display: block;
  width: 160px;
  margin-bottom: 2rem;
}

/* ── About ─────────────────────────────────────── */
.about-block { max-width: 540px; }

.about-block h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.about-block p {
  font-size: 1rem;
  line-height: 1.78;
  margin-bottom: 1.25rem;
}
.about-block p.dim { color: var(--muted); font-size: 0.9375rem; }

/* ── Work ──────────────────────────────────────── */
.work-list { list-style: none; }

.work-row {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--subtle);
}
.work-row:first-child { border-top: 1px solid var(--subtle); }

.work-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.0625rem;
  margin-bottom: 0.3rem;
}

.work-link { transition: color 0.15s; }
.work-link:hover { color: var(--accent); }

.work-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Single post ───────────────────────────────── */
.post-view-header {
  margin-bottom: 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--subtle);
}

.post-view-tag {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.post-view-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.post-view-date {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Post body ─────────────────────────────────── */
.post-body { font-size: 1.0625rem; line-height: 1.82; }

.post-body p { margin-bottom: 1.5rem; }

.post-body h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2.75rem 0 1rem;
  line-height: 1.25;
}

.post-body h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.25rem 0 0.75rem;
}

.post-body ul,
.post-body ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }

.post-body li { margin-bottom: 0.5rem; }

.post-body blockquote {
  border-left: 2px solid var(--subtle);
  margin: 2rem 0;
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--muted);
}

.post-body strong { font-weight: 600; }
.post-body em { font-style: italic; }

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.15s;
}
.back-link:hover { color: var(--ink); }

/* ── Footer ────────────────────────────────────── */
footer {
  margin-top: var(--gap-xl);
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--subtle);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Mobile ────────────────────────────────────── */
@media (max-width: 560px) {
  :root { --pad: 1.125rem; --gap-xl: 3.5rem; }

  .site-header { margin-bottom: 3rem; }

  nav { gap: 1rem; }

  .home-intro h1,
  .page-heading { font-size: 1.625rem; }

  .post-card-header { flex-direction: column; gap: 0.2rem; }

  .post-view-title { font-size: 1.625rem; }

  .footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}
