:root {
  --bg: #faf7f1;
  --bg-2: #f1ece1;
  --paper: #ffffff;
  --ink: #0c1916;
  --ink-2: #233330;
  --ink-3: #4b5d59;
  --ink-4: #7a8a86;
  --line: #e3ddce;
  --line-2: #efe9da;
  --brand: #0b3b3a;
  --brand-2: #134a48;
  --brand-soft: #e6f0ee;
  --accent: #d68b1f;
  --accent-2: #f5c25b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-md: 0 10px 30px -12px rgba(12,25,22,.18), 0 2px 6px rgba(12,25,22,.04);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.65;
}
::selection { background: var(--brand); color: var(--accent-2); }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 28px; }
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,247,241,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
  flex: 0 0 auto;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  color: var(--ink-3);
  font-size: 14.5px;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}
.nav-cta:hover { background: var(--brand-2); }
.page-hero {
  padding: 88px 0 52px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 360px at 90% -10%, rgba(214,139,31,.10), transparent 60%),
    radial-gradient(620px 320px at 10% 110%, rgba(11,59,58,.07), transparent 60%);
  pointer-events: none;
}
.page-hero .wrap-narrow { position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 15%, transparent);
}
h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -.022em;
  font-weight: 500;
  margin: 22px 0 18px;
}
.lede {
  color: var(--ink-3);
  font-size: 18px;
  max-width: 720px;
  margin: 0;
}
.content {
  padding: 64px 0 88px;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px;
}
.panel h2,
.panel h3 {
  letter-spacing: -.012em;
  line-height: 1.2;
  color: var(--ink);
}
.panel h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 14px;
}
.panel h3 {
  font-size: 18px;
  margin: 30px 0 8px;
}
.panel p,
.panel li {
  color: var(--ink-3);
  font-size: 15.5px;
}
.panel p { margin: 0 0 14px; }
.panel ul { margin: 0 0 18px; padding-left: 20px; }
.panel strong { color: var(--ink-2); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.contact-card h2 {
  font-size: 18px;
  margin: 0 0 8px;
}
.contact-card p {
  color: var(--ink-3);
  margin: 0 0 14px;
  font-size: 14.5px;
}
.contact-card a {
  color: var(--brand);
  font-weight: 600;
}
.side-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 12px;
}
.side-nav a,
.side-box {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  border-radius: var(--radius);
  padding: 13px 15px;
  color: var(--ink-3);
  font-size: 14px;
}
.side-nav a:hover { color: var(--brand); border-color: var(--brand); }
.side-box {
  color: var(--ink-4);
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--brand); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--paper); border-color: var(--ink-4); }
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 24px;
}
footer {
  padding: 56px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}
.foot-grid h4 {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 14px;
}
.foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.foot-grid a { color: var(--ink-3); font-size: 14px; }
.foot-grid a:hover { color: var(--brand); }
.foot-about {
  color: var(--ink-3);
  font-size: 14px;
  margin: 12px 0 0;
  max-width: 320px;
}
.foot-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-4);
  font-size: 13px;
  gap: 16px;
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; gap: 32px; }
  .side-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav-inner { align-items: flex-start; flex-direction: column; padding: 14px 28px; }
  .nav-links { justify-content: flex-start; gap: 16px; }
  .nav-links a:not(.nav-cta) { display: inline-flex; }
  .page-hero { padding: 64px 0 42px; }
  .content { padding: 44px 0 68px; }
  .panel { padding: 24px; }
  .card-grid,
  .side-nav,
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- BLOG INDEX ---------- */
.post-list {
  display: grid;
  gap: 22px;
  margin-top: 8px;
}
.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  display: block;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}
.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-4);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.post-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.post-card h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.012em;
  margin: 0 0 12px;
  color: var(--ink);
}
.post-card p {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 15.5px;
}
.post-card .read-more {
  color: var(--brand);
  font-weight: 500;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card .read-more::after {
  content: "→";
  transition: transform .15s ease;
}
.post-card:hover .read-more::after { transform: translateX(3px); }

/* ---------- BLOG POST ---------- */
.post-hero {
  padding: 76px 0 32px;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 320px at 90% -10%, rgba(214,139,31,.10), transparent 60%),
    radial-gradient(560px 280px at 5% 110%, rgba(11,59,58,.06), transparent 60%);
  pointer-events: none;
}
.post-hero .wrap-narrow { position: relative; }
.post-hero .crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-4);
  margin-bottom: 22px;
}
.post-hero .crumbs a { color: var(--brand); }
.post-hero .crumbs a:hover { text-decoration: underline; }
.post-hero h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  margin: 18px 0 18px;
}
.post-hero .post-meta { margin-bottom: 0; }
.post-hero .lede {
  margin-top: 22px;
  font-size: 19px;
  color: var(--ink-2);
  max-width: 720px;
}
article.post {
  padding: 36px 0 84px;
}
article.post .wrap-narrow {
  max-width: 760px;
}
article.post h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -.012em;
  line-height: 1.2;
  margin: 48px 0 14px;
  color: var(--ink);
}
article.post h3 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 32px 0 10px;
  color: var(--ink-2);
}
article.post p,
article.post li {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.72;
}
article.post p { margin: 0 0 18px; }
article.post ul,
article.post ol {
  margin: 0 0 22px;
  padding-left: 24px;
}
article.post li { margin-bottom: 8px; }
article.post strong { color: var(--ink); font-weight: 600; }
article.post a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
article.post a:hover { color: var(--brand-2); }
article.post code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink-2);
}
article.post pre {
  margin: 22px 0;
  background: #07201f;
  color: #f3ecdc;
  border: 1px solid rgba(245,194,91,.18);
  border-radius: 14px;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
}
article.post pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
article.post blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft, #fbf1dd);
  border-radius: 0 12px 12px 0;
  color: var(--ink-2);
  font-style: italic;
}
article.post blockquote p:last-child { margin-bottom: 0; }
article.post .callout {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: var(--radius);
}
article.post .callout h3 {
  margin-top: 0;
  font-size: 16px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
}
article.post .callout p:last-child { margin-bottom: 0; }
article.post .toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 8px 0 36px;
}
article.post .toc h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 10px;
}
article.post .toc ol {
  margin: 0;
  padding-left: 20px;
}
article.post .toc li {
  font-size: 14.5px;
  margin-bottom: 4px;
}
article.post .toc a {
  text-decoration: none;
  color: var(--ink-2);
}
article.post .toc a:hover { color: var(--brand); }

.post-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.post-footer h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 18px;
}
.post-footer .related {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.post-footer .related a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--paper);
  color: var(--ink-2);
  text-decoration: none;
  display: block;
  transition: border-color .2s ease, transform .15s ease;
}
.post-footer .related a:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.post-footer .related strong {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--ink);
}
.post-footer .related span {
  font-size: 13px;
  color: var(--ink-4);
}
.post-cta {
  margin-top: 48px;
  padding: 30px 32px;
  background: var(--brand);
  color: #f3ecdc;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.post-cta h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -.01em;
  text-transform: none;
}
.post-cta p { margin: 0; color: #d6cdb9; font-size: 14.5px; }
.post-cta .btn-primary {
  background: var(--accent-2);
  color: var(--brand);
}
.post-cta .btn-primary:hover { background: #ffd478; }

@media (max-width: 760px) {
  .post-card { padding: 22px 22px; }
  .post-card h2 { font-size: 22px; }
  article.post .wrap-narrow { padding: 0 24px; }
  article.post p, article.post li { font-size: 16px; }
  .post-footer .related { grid-template-columns: 1fr; }
  .post-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
}
