/* ============================================================
   FURROW — shared stylesheet
   Design tokens are lifted from the course so the whole site
   reads as one thing. Change a value here, it changes everywhere.
   ============================================================ */

:root {
  --bg: #f4f1e8;
  --bg-soft: #ebe7d8;
  --ink: #1f2419;
  --ink-soft: #4a4f3f;
  --rule: #c9c4b1;
  --green: #6a7c4f;
  --green-dark: #4d5b39;
  --green-soft: #dde0c7;
  --rust: #a85a36;
  --rust-soft: #efd9cc;
  --gold: #c9a14a;
  --shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 24px rgba(31,36,25,0.06);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
  --measure: 34rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--rust); }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: 2.6rem; line-height: 1.1; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.6rem 0 0.8rem; }
h3 { font-size: 1.12rem; margin: 1.9rem 0 0.5rem; }
p  { margin: 0 0 1.15rem; }

.muted { color: var(--ink-soft); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 0.7rem;
}

.lede {
  font-size: 1.24rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: 1.8rem;
}

/* ---------- SITE HEADER ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-soft);
}
.site-header .inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.wordmark img { width: 30px; height: 30px; display: block; border-radius: 3px; }
.wordmark span {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: var(--green-dark); }

.site-nav {
  display: flex;
  gap: 0.3rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
}
.site-nav a:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.site-nav a.current {
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 600;
}

/* ---------- LAYOUT ---------- */

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 3.2rem 1.6rem 4rem;
}
.wrap.narrow { max-width: calc(var(--measure) + 3.2rem); }

/* Long-form reading column */
.prose { max-width: var(--measure); }
.prose li { margin-bottom: 0.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }

blockquote {
  margin: 1.8rem 0;
  padding: 0.2rem 0 0.2rem 1.3rem;
  border-left: 3px solid var(--green-soft);
  color: var(--ink-soft);
  font-style: italic;
}

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

/* ---------- HOME HERO ---------- */

.hero { max-width: 40rem; margin-bottom: 3.4rem; }
.hero h1 { font-size: 3rem; margin-bottom: 1.1rem; }
.hero .lede { font-size: 1.3rem; }

/* ---------- CARDS ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.1rem;
  margin: 1.6rem 0 2.4rem;
}
/* A single card shouldn't stretch the full width of the page. */
.cards.one { grid-template-columns: minmax(0, 32rem); }

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fbf9f2;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  color: inherit;
}
.card h3 { margin: 0.55rem 0 0.5rem; font-size: 1.16rem; }
.card p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}
.tag.teacher { background: var(--green-soft); color: var(--green-dark); }
.tag.student { background: var(--rust-soft); color: var(--rust); }
.tag.essay   { background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--rule); }

/* ---------- WRITING INDEX ---------- */

.post-list { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 44rem; }

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

.post-list a {
  display: block;
  padding: 1.5rem 0.4rem;
  text-decoration: none;
  color: inherit;
}
.post-list a:hover { background: rgba(0,0,0,0.02); color: inherit; }
.post-list a:hover h2 { color: var(--rust); }

.post-list h2 {
  margin: 0.4rem 0 0.45rem;
  font-size: 1.35rem;
  line-height: 1.25;
}
.post-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 34rem;
}

.post-meta {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- ESSAY PAGE ---------- */

.post-header {
  max-width: var(--measure);
  margin-bottom: 2.4rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.post-header h1 { font-size: 2.4rem; margin-bottom: 0.9rem; }

.back-link {
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--ink-soft);
}
.back-link:hover { color: var(--rust); }

/* ---------- BUTTON ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bg);
  background: var(--green-dark);
  border: 1px solid var(--green-dark);
  padding: 0.75rem 1.4rem;
  border-radius: 6px;
  transition: background 0.14s ease, transform 0.14s ease;
}
.cta:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  transform: translateY(-1px);
}
.cta:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.cta .arrow { font-size: 1.05em; line-height: 1; }

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}
.cta-note { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- CALLOUT ---------- */

.note {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 1.1rem 1.3rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  max-width: var(--measure);
}
.note p:last-child { margin-bottom: 0; }
.note strong { font-family: var(--sans); font-size: 0.88rem; }

/* ---------- FOOTER ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  margin-top: 4rem;
}
.site-footer .inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2rem 1.6rem 2.6rem;
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--rust); }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero h1 { font-size: 2.2rem; }
  h1 { font-size: 2rem; }
  .hero .lede, .lede { font-size: 1.12rem; }
  .wrap { padding: 2.2rem 1.2rem 3rem; }
  .site-header .inner { padding: 0.9rem 1.2rem; }
  .post-header h1 { font-size: 1.9rem; }
}
