/*
Theme Name: Systems & Soil
Theme URI: https://systemsandsoil.com/
Author: Rob Lederhilger
Author URI: https://systemsandsoil.com/
Description: A minimal, typography-first WordPress theme built for long-form writing and quiet authority.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: systems-and-soil
Tags: blog, one-column, custom-colors, custom-logo, editor-style, featured-images, sticky-post, translation-ready
*/

/* ------------------------------
   Design tokens
--------------------------------- */
:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --text: #1E1E1E;
  --muted: #666666;
  --line: rgba(30,30,30,.12);
  --link: #4A6F5A;
  --link-hover: #355443;
  --soil: #8B5E3C;

  --max: 720px;
  --gutter: clamp(18px, 4vw, 32px);
  --radius: 18px;

  --font-body: "Source Serif 4", ui-serif, Georgia, "Times New Roman", Times, serif;
  --font-head: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .92em;
}
pre {
  padding: 16px;
  border-radius: 14px;
  background: rgba(30,30,30,.04);
  border: 1px solid rgba(30,30,30,.08);
  overflow-x: auto;
}
blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1em;
  border-left: 3px solid rgba(30,30,30,.18);
  color: rgba(30,30,30,.86);
}

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

/* ------------------------------
   Layout
--------------------------------- */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap {
  width: 100%;
  max-width: calc(var(--max) + (var(--gutter) * 2));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.site-header {
  padding: 34px 0 18px;
}
.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.site-title {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: -0.02em;
  font-weight: 700;
  font-size: 22px;
}
.site-title a {
  color: var(--text);
  text-decoration: none;
}
.site-tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 1.4;
}
.nav-primary {
  font-family: var(--font-head);
  font-size: 14px;
}
.nav-primary ul {
  list-style: none;
  display: flex;
  gap: 14px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.nav-primary a {
  color: rgba(30,30,30,.86);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
}
.nav-primary a:hover {
  background: rgba(30,30,30,.06);
  color: var(--text);
}

.site-main {
  flex: 1;
  padding: 18px 0 44px;
}
.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 13px;
}

/* ------------------------------
   Content
--------------------------------- */
.content {
  background: var(--surface);
  border: 1px solid rgba(30,30,30,.08);
  border-radius: var(--radius);
  padding: clamp(18px, 3.6vw, 34px);
  box-shadow: 0 8px 28px rgba(0,0,0,.05);
}

.entry-header h1,
.entry-header h2 {
  font-family: var(--font-head);
  letter-spacing: -0.03em;
  margin: 0 0 .3rem;
}
.entry-title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
}
.entry-meta {
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 13px;
  margin-top: .65rem;
}
.entry-meta a {
  color: inherit;
}
.entry-content {
  margin-top: 1.6rem;
}
.entry-content p {
  margin: 0 0 1.1rem;
}
.entry-content h2 {
  font-size: 24px;
  margin-top: 2rem;
}
.entry-content h3 {
  font-size: 19px;
  margin-top: 1.6rem;
}
.entry-content ul, .entry-content ol {
  padding-left: 1.2em;
}
.entry-content li {
  margin: .25rem 0;
}

.hero {
  padding: clamp(26px, 5vw, 44px) 0 22px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
}
.hero p {
  margin: 0 0 12px;
  color: rgba(30,30,30,.86);
}
.hero .sub {
  color: var(--muted);
}
.cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(30,30,30,.12);
  background: rgba(30,30,30,.03);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 14px;
  text-decoration: none;
}
.button:hover {
  background: rgba(30,30,30,.06);
}
.button.primary {
  background: var(--link);
  border-color: rgba(0,0,0,0);
  color: white;
}
.button.primary:hover {
  background: var(--link-hover);
  color: white;
}

.post-list {
  margin-top: 18px;
}
.post-card {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.post-card:first-child { border-top: 0; padding-top: 0; }
.post-card h2 {
  font-family: var(--font-head);
  font-size: 20px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.post-card h2 a {
  color: var(--text);
  text-decoration: none;
}
.post-card h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.post-card .meta {
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
}
.post-card .excerpt {
  margin: 10px 0 0;
  color: rgba(30,30,30,.86);
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  font-family: var(--font-head);
  font-size: 14px;
}
.pagination a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(30,30,30,.12);
}
.pagination a:hover {
  background: rgba(30,30,30,.06);
}

.screen-reader-text {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F10;
    --surface: #121416;
    --text: #F1F1F1;
    --muted: rgba(241,241,241,.68);
    --line: rgba(241,241,241,.12);
    --link: #73B18C;
    --link-hover: #8FD5A7;
  }
  pre {
    background: rgba(241,241,241,.06);
    border-color: rgba(241,241,241,.10);
  }
  .content {
    border-color: rgba(241,241,241,.10);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
  }
  .nav-primary a {
    color: rgba(241,241,241,.82);
  }
  .nav-primary a:hover {
    background: rgba(241,241,241,.08);
    color: var(--text);
  }
  .button {
    border-color: rgba(241,241,241,.14);
    background: rgba(241,241,241,.06);
    color: var(--text);
  }
}
