/* =========================================================
   annemarkisgraham.com — shared styles
   Newsreader serif, single column, generous whitespace.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

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

:root {
  --bg:        #faf9f6;
  --text:      #1f1d1a;
  --muted:     #6b7280;
  --faint:     #9aa0a6;
  --link:      #3b5e8c;
  --link-hover:#1e3a5f;
  --rule:      #e7e4dd;
  --code-bg:   #f1efe9;
  --max-width: 680px;
  --font:      "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif, "Apple Color Emoji";
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono",
               Consolas, monospace;
}

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

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

/* ── Layout ─────────────────────────────────────────────── */

.site-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 0 7rem;
}

/* ── Typography ─────────────────────────────────────────── */

h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 3rem 0 0.85rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2.25rem 0 0.6rem;
}

p {
  margin-bottom: 1.35rem;
}

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

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

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

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

li {
  margin-bottom: 0.4rem;
}

li > ul,
li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0;
}

blockquote {
  border-left: 3px solid var(--rule);
  padding-left: 1.2rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.75rem 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* ── Homepage header ────────────────────────────────────── */

.site-header {
  margin-bottom: 2.75rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

.site-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.brand {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

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

.site-nav a {
  font-size: 1rem;
  text-decoration: none;
  color: var(--link);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.site-nav a:hover {
  border-bottom-color: var(--link);
}

.home-tagline {
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 0.7rem;
  margin-bottom: 0;
}

.bio {
  margin-bottom: 2.5rem;
}

.bio p {
  margin-bottom: 1rem;
}

/* ── Hanging-gutter rows (homepage sections) ────────────── */

.gutter-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.75rem;
  align-items: baseline;
  margin-bottom: 2.75rem;
}

.gutter-label {
  text-align: right;
  font-style: italic;
  font-size: 1rem;
  color: var(--faint);
  margin: 0;
}

/* ── Writing: Substack lead ─────────────────────────────── */

.writing-lead {
  font-size: 1.1rem;
  margin: 0;
}

/* ── Archive (de-emphasized older posts) ────────────────── */

.archive {
  opacity: 0.78;
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.archive-list li {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.archive-list li:first-child {
  border-top: 1px solid var(--rule);
}

.archive-list a {
  text-decoration: none;
  font-size: 0.98rem;
  color: var(--text);
}

.archive-list a:hover {
  color: var(--link);
}

.archive-list .post-date {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--faint);
  margin-top: 0.1rem;
}

.archive-more {
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.archive-more a {
  color: var(--muted);
  text-decoration: none;
}

.archive-more a:hover {
  color: var(--link);
}

/* ── Post list (archive page) ───────────────────────────── */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.post-list li:first-child {
  border-top: 1px solid var(--rule);
}

.post-list a {
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--text);
}

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

.post-list .post-date {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--faint);
  margin-top: 0.15rem;
}

/* ── Post page ──────────────────────────────────────────── */

.post-back {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2.75rem;
}

.post-back:hover {
  color: var(--link);
}

.post-header {
  margin-bottom: 2.75rem;
}

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

.post-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--faint);
}

.post-body {
  margin-bottom: 3rem;
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--faint);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--link);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 560px) {
  .gutter-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .gutter-label {
    text-align: left;
  }
}

@media (max-width: 480px) {
  html { font-size: 18px; }
  .site-wrap { padding: 3rem 0 4.5rem; }
  h1 { font-size: 1.65rem; }
  .home-name { font-size: 1.6rem; }
}
