/* Theme: deep teal + warm ivory, Fraunces serif headings.
   Webfonts loaded in each page's <head> via Google Fonts. */
:root {
  --ink: #1a2420;
  --ink-soft: #44544d;
  --muted: #788a82;
  --line: #e4e7e0;
  --bg: #fbfaf6;
  --bg-alt: #f2efe7;
  --accent: #0f5e55;
  --accent-soft: #e2efe9;
  --head-font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 760px;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
}

h1, h2, h3, h4, .hero h1, .article-head h1 {
  font-family: var(--head-font);
  font-weight: 700;
}
.brand .brand-tagline { font-family: var(--head-font); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  gap: 16px;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.brand .brand-text { display: flex; flex-direction: column; justify-content: center; }
.brand .brand-tagline {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .brand .brand-tagline { font-size: 0.75rem; white-space: normal; }
}
/* Static 3-bar mark (decorative) + "M" monogram; the brand is clickable to open menu */
.brand { cursor: pointer; }
.brand .bars { flex: 0 0 auto; display: block; }
.brand .bars line { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.brand .brand-mark { flex: 0 0 auto; display: block; }
.brand .brand-mark .mono-bg { fill: var(--accent); }
.brand .brand-mark .mono-letter { fill: #fff; }

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.nav a:hover, .nav a.active { color: var(--accent); }

.site-header .wrap { position: relative; }
.brand { margin-right: auto; }   /* pushes the horizontal nav to the far right */

/* The dropdown panel the clickable brand opens (reuses the same links) */
.menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 22px;
  z-index: 30;
  flex-direction: column;
  align-items: stretch;
  min-width: 210px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(22, 32, 42, 0.10);
}
.menu-panel.open { display: flex; }
.menu-panel a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.98rem;
}
.menu-panel a:hover { background: var(--accent-soft); color: var(--accent); }

/* Horizontal nav: links inline on the right (desktop) */
.nav {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.nav a { margin-left: 22px; font-size: 0.95rem; }

/* Small mobile: hide the inline horizontal links; keep the 3-bar dropdown */
@media (max-width: 560px) {
  .nav { display: none; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.hero .hero-art {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 46%;
  min-width: 320px;
  pointer-events: none;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .hero .hero-art { opacity: 0.35; width: 70%; }
}
.hero h1 {
  font-size: 2.3rem;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
}
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  margin-left: 8px;
}

/* Sections */
main { padding: 52px 0; }
section { margin-bottom: 48px; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font-size: 1.15rem; margin: 30px 0 10px; }
p { margin: 0 0 16px; color: var(--ink); }
.muted { color: var(--muted); }

ul, ol { padding-left: 22px; }
li { margin-bottom: 8px; }

a { color: var(--accent); }

/* Cards (perspectives list) */
.cards { display: grid; gap: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card .kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card h3 { margin: 6px 0 8px; color: var(--ink); }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* Article */
.article-head { padding: 48px 0 10px; border-bottom: 1px solid var(--line); }
.article-head .wrap { max-width: var(--max); }
.article-head h1 { font-size: 2rem; line-height: 1.22; margin: 10px 0 10px; letter-spacing: -0.02em; }
.article-meta { color: var(--muted); font-size: 0.9rem; }
article.post { padding: 36px 0 20px; }
article.post p, article.post li { font-size: 1.05rem; }
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 20px 0;
}
.callout p { margin: 0; }
.next-up { font-style: italic; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 32px; }
article.post pre {
  background: #10302b;
  color: #e9f1ee;
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.92rem;
  line-height: 1.55;
}
article.post pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
article.post code {
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; margin-left: 18px; }
.site-footer a:first-child { margin-left: 0; }

@media (max-width: 620px) {
  body { font-size: 17px; }
  .hero h1 { font-size: 1.9rem; }
}

/* Figures / diagrams (inline SVG, no hosted images) */
figure.diagram {
  margin: 28px 0;
  padding: 22px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
figure.diagram svg { display: block; width: 100%; height: auto; }
figure.diagram figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.diagram .d-box { fill: #fff; stroke: var(--accent); stroke-width: 1.5; }
.diagram .d-box-soft { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.diagram .d-label { fill: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600; }
.diagram .d-sub { fill: var(--muted); font-family: inherit; font-size: 11px; }
.diagram .d-arrow { stroke: var(--accent); stroke-width: 1.5; fill: none; marker-end: url(#arrowhead); }
.diagram .d-flag { fill: var(--accent); font-family: inherit; font-size: 12px; font-weight: 700; }

/* Home "how I work" 3-step strip */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 0; }
.steps .step { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 18px; background: var(--bg); }
.steps .step .n { color: var(--accent); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; }
.steps .step h4 { margin: 6px 0 6px; font-size: 1rem; }
.steps .step p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
