/* Ellie's Plot - one stylesheet shared by every page */

:root {
  --cream: #f3ede0;
  --ink: #1f2a22;
  --muted: #55604f;
  --green: #2b4630;
  --line: #ddd4c0;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-wrap: break-word; /* stops a long word or address spilling off the side */
}

/* "Skip to content" link: only appears when someone tabs into the page */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--green);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 10;
  transform: translateY(-120%);
}
.skip-link:focus { transform: none; outline: 3px solid var(--ink); outline-offset: 2px; }

main:focus { outline: none; }

a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: 38rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.4rem 0;
}

.site-nav a:hover { text-decoration: underline; }

.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

.site-nav .button {
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
}

.site-nav .button:hover { text-decoration: none; background: #1f3524; }

/* ---------- Page content ---------- */

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

h1, h2 {
  font-family: var(--serif);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: 2.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 0.5rem; }

.intro {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 34rem;
}

/* ---------- Post list on the home page ---------- */

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

.post-list li {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.post-list li:last-child { border-bottom: 1px solid var(--line); }

.post-list h2 { margin: 0.1rem 0 0.4rem; font-size: 1.6rem; }

.post-list h2 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--muted);
}
.post-list h2 a:hover { text-decoration-thickness: 3px; }

.post-list p { margin: 0; color: var(--muted); }

.date {
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- A single post ---------- */

.back { font-size: 1rem; display: inline-block; margin-bottom: 1.5rem; }

article .date { display: block; margin-bottom: 0.5rem; }

article p { margin: 0 0 1.2rem; }

article ul, article ol { padding-left: 1.5rem; margin: 0 0 1.2rem; }

article li { margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.site-footer .inner {
  max-width: 38rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.site-footer p { margin: 0.2rem 0; }

/* ---------- Phones ---------- */

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 2.1rem; }
  .post-list h2 { font-size: 1.4rem; }
  main { padding-top: 1.75rem; }
  .intro { font-size: 1.125rem; }
}
