/* ============================================================
   The Generalist — style.css
   ============================================================ */

:root {
  --ink:       #18170f;
  --cream:     #f4f0e6;
  --warm:      #e6e0d0;
  --green:     #2d5016;
  --green-mid: #3d6b1e;
  --muted:     #78725e;
  --rule:      #231f14;
  --tag-bld:   #2d5016;
  --tag-tink:  #1a3a4a;
  --tag-mech:  #3a2a10;
  --tag-hl:    #1a2a3a;
  --tag-cof:   #3a2010;
  --tag-grow:  #1e3d1a;
  --tag-adv:   #2a1a3a;
  --tag-sport: #3a1010;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito Sans', sans-serif;
  min-height: 100vh;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}


/* ── Category tags ── */

.cat {
  display: inline-block;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.22em 0.6em;
  border-radius: 2px;
  margin-bottom: 0.6rem;
  color: var(--cream);
  background: var(--green);
}

.cat-building   { background: var(--tag-bld); }
.cat-tinkering  { background: var(--tag-tink); }
.cat-mechanical { background: var(--tag-mech); }
.cat-homelab    { background: var(--tag-hl); }
.cat-coffee     { background: var(--tag-cof); }
.cat-growing    { background: var(--tag-grow); }
.cat-adventure  { background: var(--tag-adv); }
.cat-sport      { background: var(--tag-sport); }


/* ── Shared layout ── */

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--warm);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.ruled-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}


/* ── Shared nav ── */

nav a {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover { color: var(--green); }


/* ── Footer ── */

footer {
  border-top: 3px solid var(--rule);
  margin-top: 0;
  padding: 1.5rem 0;
  text-align: center;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ── Animations ── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   HOMEPAGE
   ============================================================ */

.masthead {
  border-bottom: 3px solid var(--rule);
  text-align: center;
}

.masthead-bar {
  background: var(--green);
  color: rgba(244,240,230,0.7);
  padding: 0.3rem 2rem;
  display: flex;
  justify-content: space-between;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.masthead-inner {
  padding: 1.75rem 1.5rem 0;
}

.masthead h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.025em;
  color: var(--ink);
  animation: fadeUp 0.55s ease both;
}

.masthead h1 em {
  font-style: italic;
  color: var(--green);
}

.tagline {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 1.5rem;
  animation: fadeUp 0.55s 0.08s ease both;
}

.masthead nav {
  border-top: 1px solid var(--warm);
  padding: 0.65rem 2rem;
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  animation: fadeUp 0.55s 0.14s ease both;
}

main {
  padding: 3rem 0;
  animation: fadeUp 0.55s 0.2s ease both;
}

/* Post grid */
.posts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0;
  margin-bottom: 3rem;
}

@media (max-width: 660px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-featured {
    border-right: none;
    border-bottom: 1px solid var(--warm);
    padding-right: 0;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }
}

.post-featured {
  border-right: 1px solid var(--warm);
  padding-right: 2.5rem;
}

.post-featured h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.1;
  margin-bottom: 0.85rem;
}

.post-featured h2 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.post-featured h2 a:hover { color: var(--green); }

.post-featured .excerpt {
  font-size: 0.92rem;
  line-height: 1.75;
  color: #3a3020;
  font-weight: 300;
  margin-bottom: 1rem;
}

.post-date {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Sidebar */
.posts-sidebar {
  padding-left: 2.5rem;
  display: flex;
  flex-direction: column;
}

.post-small {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--warm);
}

.post-small:first-child { padding-top: 0; }
.post-small:last-child { border-bottom: none; }

.post-small h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.post-small h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.post-small h3 a:hover { color: var(--green); }

/* Archive list */
.post-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--warm);
  margin: 0 -0.75rem;
  transition: background 0.12s;
}

.post-row:hover { background: var(--warm); }

.post-row .row-cat {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-mid);
  min-width: 70px;
}

.post-row .row-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.post-row .row-title:hover { color: var(--green); }

.post-row .row-date {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.58rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

/* Topics strip */
.topics-strip {
  background: var(--ink);
  color: var(--cream);
  padding: 2rem 0;
  margin-top: 3rem;
}

.topics-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.topics-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244,240,230,0.4);
  margin-right: 0.5rem;
}

.topic-pill {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3em 0.85em;
  border: 1px solid rgba(244,240,230,0.2);
  color: rgba(244,240,230,0.7);
  text-decoration: none;
  transition: all 0.15s;
  border-radius: 2px;
}

.topic-pill:hover {
  border-color: var(--green);
  color: var(--cream);
  background: var(--green);
}

/* About box */
.about-strip {
  max-width: 980px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}

.about-box {
  border: 1px solid var(--warm);
  border-left: 4px solid var(--green);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
}

.about-initial {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
  color: var(--green);
}

.about-text p {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.7;
  color: #3a3020;
}


/* ============================================================
   POST PAGES
   ============================================================ */

/* Slim site header */
.site-header {
  border-bottom: 3px solid var(--rule);
}

.header-bar {
  background: var(--green);
  height: 4px;
}

.site-header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-logo em {
  font-style: italic;
  color: var(--green);
}

.site-header nav {
  display: flex;
  gap: 2rem;
}

/* Post layout */
.post-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  animation: fadeUp 0.5s 0.1s ease both;
}

.post-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.post-title em {
  font-style: italic;
  color: var(--green);
}

.post-meta {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.post-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

/* Post body */
.post-body {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
  color: #2c2818;
}

.post-body p { margin-bottom: 1.6em; }

.post-body > p:first-of-type {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
}

.post-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 2.5em 0 0.6em;
  color: var(--ink);
}

.post-body h3 {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2em 0 0.75em;
}

.post-body a {
  color: var(--green-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s;
}

.post-body a:hover { color: var(--green); }

.post-body strong {
  font-weight: 700;
  color: var(--ink);
}

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

.post-body ul,
.post-body ol {
  margin: 0 0 1.6em 1.4em;
}

.post-body li {
  margin-bottom: 0.45em;
  line-height: 1.6;
}

.post-body blockquote {
  border-left: 3px solid var(--green);
  margin: 2.5em 0;
  padding: 0.8em 1.5em;
  background: var(--warm);
}

.post-body blockquote p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  margin-bottom: 0;
  color: var(--ink);
}

.post-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.83em;
  background: var(--warm);
  padding: 0.1em 0.4em;
  border-radius: 2px;
  color: var(--green);
}

.post-body pre {
  background: var(--ink);
  color: var(--cream);
  padding: 1.25em 1.5em;
  overflow-x: auto;
  margin: 2em 0;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  border-left: 3px solid var(--green);
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--warm);
  margin: 3em 0;
}

.post-body img {
  width: 100%;
  height: auto;
  display: block;
  margin: 2em 0;
}

.post-body figure { margin: 2.5em 0; }

.post-body figcaption {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.6em;
  font-style: italic;
}

/* Callout box */
.callout {
  border: 1px solid var(--warm);
  border-left: 4px solid var(--green);
  padding: 1.25em 1.5em;
  margin: 2.5em 0;
  background: rgba(45,80,22,0.04);
}

.callout p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 2em 0;
}

.photo-square {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.photo-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
}

/* Post footer */
.post-end {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 3px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.post-end a {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.post-end a:hover { color: var(--green); }

.post-end .logo-small {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.post-end .logo-small em {
  font-style: italic;
  color: var(--green);
}
