/* ============================================================
   Old Guy Bonsai — Misty Mountain theme
   Cool grays, pale teal, fog whites. Hand-editable single CSS.
   ============================================================ */

:root {
  /* Palette */
  --fog: #f6f8f9;
  --mist: #e9eef1;
  --stone: #c7d1d6;
  --slate: #6b7a83;
  --deep-slate: #2f3b43;
  --ink: #141b21;

  --pale-teal: #b9d2cf;
  --teal: #5b8a87;
  --deep-teal: #2e5a57;

  --copper: #b98a5e;   /* warm accent, used sparingly */

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Scale */
  --max-w: 72rem;     /* 1152px */
  --prose-w: 42rem;   /* 672px  */
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 27, 33, 0.04), 0 1px 3px rgba(20, 27, 33, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 27, 33, 0.06), 0 2px 6px rgba(20, 27, 33, 0.04);
  --shadow-lg: 0 20px 40px rgba(20, 27, 33, 0.08), 0 6px 14px rgba(20, 27, 33, 0.05);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--deep-slate);
  background: var(--fog);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a {
  color: var(--deep-teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 90, 87, 0.25);
  transition: border-color 160ms ease, color 160ms ease;
}
a:hover { color: var(--teal); border-bottom-color: var(--teal); }
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 500;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
hr {
  border: 0;
  border-top: 1px solid var(--mist);
  margin: 3rem 0;
}

/* ---------- Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.prose {
  max-width: var(--prose-w);
  margin: 0 auto;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: rgba(246, 248, 249, 0.85);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--mist);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  border-bottom: 0;
  font-weight: 500;
}
.brand:hover { color: var(--deep-teal); }
.brand-mark {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 1px 2px rgba(46, 90, 87, 0.15);
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0; padding: 0;
}
.nav a {
  color: var(--slate);
  border-bottom: 0;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.nav a:hover, .nav a.active { color: var(--deep-teal); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(185, 210, 207, 0.35), transparent 60%),
    radial-gradient(ellipse at 90% 30%, rgba(199, 209, 214, 0.4), transparent 55%),
    linear-gradient(180deg, var(--fog) 0%, var(--mist) 100%);
  overflow: hidden;
}
.hero::after {
  /* misty mountain silhouette */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 140px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'><path fill='%23e9eef1' d='M0,90 L140,60 L260,85 L380,40 L520,75 L660,30 L820,70 L960,45 L1120,80 L1280,55 L1440,85 L1440,140 L0,140 Z' opacity='0.9'/><path fill='%23c7d1d6' d='M0,110 L120,85 L240,100 L400,70 L560,95 L720,65 L880,95 L1040,75 L1200,100 L1360,80 L1440,100 L1440,140 L0,140 Z' opacity='0.7'/></svg>");
  background-size: cover;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  z-index: 1;
}

/* Split hero: text + illustration side-by-side */
.hero-split .hero-inner {
  max-width: 72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}
.hero-split .hero-text { max-width: 32rem; }
.hero-split .hero-text p.lede { margin-left: 0; margin-right: 0; }
.hero-split .hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-figure {
  margin: 0;
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 32rem;
  justify-self: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(46, 90, 87, 0.18), 0 2px 6px rgba(46, 90, 87, 0.08);
  background: var(--mist);
}
.hero-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-split h1 { text-align: left; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.hero h1 { margin-bottom: 1rem; color: var(--ink); }
.hero p.lede {
  font-size: 1.2rem;
  color: var(--slate);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease;
  border-bottom: 0;
}
.btn-primary {
  background: var(--deep-teal);
  color: var(--fog);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--teal);
  color: var(--fog);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--deep-slate);
  border: 1px solid var(--stone);
}
.btn-ghost:hover {
  background: var(--mist);
  color: var(--ink);
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .muted { color: var(--slate); font-size: 0.95rem; }

/* ---------- Post cards ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}
.post-card {
  background: #ffffff;
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 180ms ease, box-shadow 200ms ease, border-color 160ms ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--pale-teal);
}
.post-card .meta {
  font-size: 0.82rem;
  color: var(--slate);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.post-card h3 {
  margin: 0;
  font-size: 1.35rem;
}
.post-card h3 a {
  color: var(--ink);
  border-bottom: 0;
}
.post-card h3 a:hover { color: var(--deep-teal); }
.post-card p {
  color: var(--slate);
  margin: 0;
  font-size: 0.98rem;
}
.post-card .read-more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--deep-teal);
  font-weight: 500;
  border-bottom: 0;
}
.post-card .read-more:after {
  content: " →";
  transition: margin-left 160ms ease;
  display: inline-block;
}
.post-card:hover .read-more:after { margin-left: 4px; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mist);
  color: var(--slate);
  border-bottom: 0;
}
.tag.teal { background: var(--pale-teal); color: var(--deep-teal); }

/* ---------- Archive list ---------- */
.archive {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--mist);
}
.archive li {
  border-bottom: 1px solid var(--mist);
}
.archive a {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  color: var(--ink);
  border-bottom: 0;
}
.archive a:hover { color: var(--deep-teal); background: linear-gradient(90deg, transparent, rgba(185,210,207,0.2), transparent); }
.archive .date { color: var(--slate); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.archive .title { font-family: var(--serif); font-size: 1.2rem; }
.archive .chev { color: var(--stone); }

/* ---------- Article (single post) ---------- */
.article {
  padding: 4rem 0 5rem;
}
.article header {
  text-align: center;
  margin-bottom: 3rem;
}
.article header .meta {
  color: var(--slate);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.article header h1 {
  max-width: 42rem;
  margin: 0 auto 0.75rem;
}
.article-body {
  font-size: 1.08rem;
  line-height: 1.8;
}
.article-body h2 { margin-top: 2.4rem; }
.article-body h3 { margin-top: 2rem; }
.article-body blockquote {
  margin: 2rem 0;
  padding: 0.5rem 1.5rem;
  border-left: 3px solid var(--pale-teal);
  color: var(--deep-slate);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-bottom: 0.45rem; }
.article-body code {
  background: var(--mist);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
}
.article-body figure {
  margin: 2.2rem 0;
}
.article-body figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.article-body figcaption {
  text-align: center;
  color: var(--slate);
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

/* ---------- Callout ---------- */
.callout {
  background: linear-gradient(135deg, rgba(185, 210, 207, 0.35), rgba(233, 238, 241, 0.5));
  border: 1px solid var(--pale-teal);
  border-left: 4px solid var(--deep-teal);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  color: var(--deep-slate);
}
.callout strong { color: var(--deep-teal); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(135deg, var(--deep-slate), #1c262c);
  color: var(--fog);
  padding: 4rem 0;
  text-align: center;
}
.newsletter h2 { color: var(--fog); }
.newsletter p { color: var(--stone); max-width: 34rem; margin: 0 auto 1.5rem; }
.newsletter form {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter input[type="email"] {
  flex: 1 1 220px;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  background: rgba(246, 248, 249, 0.08);
  color: var(--fog);
  outline: none;
}
.newsletter input[type="email"]::placeholder { color: rgba(199, 209, 214, 0.7); }
.newsletter input[type="email"]:focus { border-color: var(--pale-teal); background: rgba(246, 248, 249, 0.12); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--mist);
  color: var(--slate);
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--stone);
  font-size: 0.92rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep-slate);
  margin: 0 0 0.75rem;
}
.site-footer a { color: var(--deep-slate); border-bottom: 0; }
.site-footer a:hover { color: var(--deep-teal); }
.site-footer .cols ul {
  list-style: none; padding: 0; margin: 0;
}
.site-footer .cols li { margin-bottom: 0.4rem; }
.copyright {
  border-top: 1px solid var(--stone);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- About page specifics ---------- */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}
.about-hero img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--mist);
}

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 34rem;
  margin: 2rem auto 0;
  display: grid;
  gap: 1rem;
}
.contact-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--deep-slate);
  letter-spacing: 0.02em;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(91, 138, 135, 0.15);
}
.contact-form textarea { min-height: 160px; resize: vertical; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav ul { gap: 1rem; }
  .nav ul li:not(:last-child) { display: none; } /* crude; keep last as "Blog" */
  .nav ul li:last-child { display: list-item; }
  .nav ul li:nth-last-child(2) { display: list-item; }
  .nav ul li:nth-last-child(3) { display: list-item; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0 3.5rem; }
  .hero-split .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-split h1, .hero-split .hero-text p.lede { text-align: center; }
  .hero-split .hero-text { max-width: none; }
  .hero-split .hero-ctas { justify-content: center; }
  .hero-figure { order: -1; max-width: 24rem; }
  .about-hero { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .archive a { grid-template-columns: 90px 1fr; }
  .archive .chev { display: none; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
