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

:root {
  --paper:   #FAFAF6;
  --white:   #FFFFFF;
  --ink:     #101413;
  --ink-60:  #555C58;
  --ink-35:  #9AA19C;
  --line:    #E2E4DC;
  --green:   #0D5F4E;
  --green-bright: #35B792;
  --green-tint:   #EBF2EE;
  --nav-bg:  #F0F1E9;
  --font-heading: var(--gh-font-heading, 'Space Grotesk', sans-serif);
  --font-body:    var(--gh-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ═══ NAV ═══ */
.dg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 200;
}

.dg-nav-logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  transition: color 0.18s;
}

.dg-nav-logo:hover { color: var(--green); }

.dg-logo-glyph { width: 21px; height: 17px; flex-shrink: 0; }

.dg-nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}

.dg-nav-links li a {
  text-decoration: none;
  color: var(--ink-60);
  font-size: 13.5px;
  font-weight: 500;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color 0.18s, background-size 0.22s ease;
}

.dg-nav-links li a:hover {
  color: var(--ink);
  background-size: 100% 1.5px;
}

.dg-nav-links li a.btn { color: #fff; background-image: none; }
.dg-nav-links li a.btn:hover { color: #fff; }

/* ═══ BUTTONS & LINKS ═══ */
.btn {
  display: inline-block;
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 12px 26px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
  white-space: nowrap;
}

.btn:hover { background: var(--green); border-color: var(--green); }

.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn-nav { padding: 8px 18px; font-size: 12.5px; }

.link-arrow {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.16s, gap 0.16s;
}

.link-arrow::after { content: '→'; }
.link-arrow:hover { color: var(--green); gap: 11px; }

.link-back::before { content: '←'; }
.link-back::after  { content: none; }

/* ═══ HAMBURGER / MOBILE MENU ═══ */
.dg-nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.dg-nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.dg-nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dg-nav-hamburger.open span:nth-child(2) { opacity: 0; }
.dg-nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dg-mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0; right: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  padding: 22px 26px 30px;
  z-index: 199;
  flex-direction: column;
  gap: 20px;
}

.dg-mobile-menu.open { display: flex; }

.dg-mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.dg-mobile-menu a.mobile-cta {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: 6px;
  align-self: flex-start;
}

/* ═══ LABEL ═══ */
.label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.label svg { flex-shrink: 0; }

/* ═══ HERO ═══ */
#hero {
  position: relative;
  padding: 104px 48px 118px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-tree {
  position: absolute;
  right: 30px;
  bottom: 0;
  width: 52%;
  height: 96%;
  pointer-events: none;
  user-select: none;
  transform-origin: 72% 100%;
  animation: sway 16s ease-in-out infinite alternate;
}

@keyframes sway {
  from { transform: rotate(-0.5deg); }
  to   { transform: rotate(0.6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-tree { animation: none; }
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(46px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 26px 0 28px;
}

.hero-headline .accent { color: var(--green); }

.hero-sub {
  font-size: 15.5px;
  color: var(--ink-60);
  max-width: 470px;
  line-height: 1.75;
  margin-bottom: 44px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

/* ═══ SERVICES ═══ */
#services {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 96px 48px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1280px;
}

.col-heading {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 10px 0 26px;
}

.ledger { list-style: none; }

.ledger li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.ledger li:last-child { border-bottom: 1px solid var(--line); }

.ledger strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink);
  transition: color 0.16s;
}

.ledger li:hover strong { color: var(--green); }

.ledger p {
  font-size: 13.5px;
  color: var(--ink-60);
  line-height: 1.62;
}

.col-ctas { margin-top: 34px; }

/* ═══ INSIGHTS ═══ */
#writing {
  padding: 96px 48px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.writing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  max-width: 1280px;
}

.writing-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}

.writing-sub {
  font-size: 13.5px;
  color: var(--ink-60);
  max-width: 460px;
  line-height: 1.65;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1280px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 30px 32px 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.16s;
}

.article-card:hover { border-color: var(--ink); }

.article-meta {
  font-family: var(--font-heading);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-card .card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.article-card .card-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.16s;
}

.article-card .card-title a:hover { color: var(--green); }

.article-excerpt {
  font-size: 13.5px;
  color: var(--ink-60);
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
}

/* ═══ WHAT I BRING ═══ */
#different {
  background: var(--ink);
  padding: 96px 48px;
}

.different-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  max-width: 1280px;
  align-items: start;
}

#different .label { color: var(--green-bright); }

.different-heading {
  font-family: var(--font-heading);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--paper);
  margin: 14px 0 24px;
}

.different-p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(250,250,246,0.82);
  margin-bottom: 16px;
}

.different-p-dim {
  font-size: 13.5px;
  line-height: 1.8;
  color: rgba(250,250,246,0.48);
}

.diff-list { list-style: none; }

.diff-list li {
  padding: 22px 0;
  border-top: 1px solid rgba(250,250,246,0.14);
}

.diff-list li:last-child { border-bottom: 1px solid rgba(250,250,246,0.14); }

.diff-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 6px;
}

.diff-text {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(250,250,246,0.5);
}

/* ═══ CONTACT ═══ */
#contact {
  padding: 104px 48px 110px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.contact-heading {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 14px 0 16px;
}

.contact-sub {
  font-size: 14px;
  color: var(--ink-60);
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.75;
}

.contact-email {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  border-bottom: 3px solid var(--line);
  padding-bottom: 8px;
  transition: border-color 0.16s, color 0.16s;
}

.contact-email:hover { border-color: var(--green); color: var(--green); }

.contact-links {
  margin-top: 36px;
  display: flex;
  gap: 28px;
  align-items: center;
}

/* ═══ ARTICLE / POST ═══ */
.article-top {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 48px 0;
}

.article-header {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 48px 44px;
  border-bottom: 1px solid var(--line);
}

.article-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 18px 0 20px;
}

.article-deck {
  font-size: 17px;
  color: var(--ink-60);
  line-height: 1.7;
  margin-bottom: 34px;
  max-width: 600px;
}

.feature-image { margin: 6px 0 34px; }

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: cover;
}

.feature-image figcaption {
  font-size: 12.5px;
  color: var(--ink-35);
  margin-top: 10px;
  line-height: 1.5;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.byline-mark {
  width: 42px;
  height: 42px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.byline-mark svg { width: 20px; height: 16px; }

.byline-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.byline-meta {
  font-size: 12.5px;
  color: var(--ink-35);
  margin-top: 2px;
}

/* post content — Ghost renders directly into this container */
.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 52px 48px 12px;
}

.article-body p {
  font-size: 16.5px;
  line-height: 1.85;
  color: #26302B;
  margin-bottom: 28px;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 52px 0 20px;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 14px;
}

.article-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 28px 22px;
  font-size: 16px;
  line-height: 1.8;
  color: #26302B;
}

.article-body li { margin-bottom: 8px; }

.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 6px 0 6px 30px;
  margin: 44px 0;
}

.article-body blockquote p {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.article-body pre {
  background: var(--ink);
  color: var(--paper);
  padding: 22px 26px;
  overflow-x: auto;
  font-size: 13.5px;
  margin-bottom: 28px;
}

.article-body code { font-size: 0.92em; }

/* Ghost image & card support */
.article-body .kg-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.article-body figure { margin: 34px 0; }

.article-body figcaption {
  font-size: 12.5px;
  color: var(--ink-35);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.article-body .kg-width-wide {
  margin-left: calc(50% - 50vw + 48px);
  margin-right: calc(50% - 50vw + 48px);
  max-width: none;
  width: calc(100vw - 96px);
}

.article-body .kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
  width: 100vw;
}

.article-body .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-body .kg-gallery-row { display: flex; gap: 6px; }

.article-body .kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body .kg-bookmark-card { border: 1px solid var(--line); margin: 34px 0; }

.article-body .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.article-body .kg-bookmark-content { padding: 20px 24px; flex: 1; }

.article-body .kg-bookmark-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.article-body .kg-bookmark-description {
  font-size: 13px;
  color: var(--ink-60);
  line-height: 1.5;
  margin-bottom: 10px;
}

.article-body .kg-bookmark-metadata {
  font-size: 12px;
  color: var(--ink-35);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-body .kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }

.article-body .kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* branch divider */
.branch-divider {
  display: flex;
  justify-content: center;
  padding: 28px 0 0;
}

.branch-divider svg { width: 26px; height: 21px; opacity: 0.85; }

/* ═══ AUTHOR BIO ═══ */
.author-bio {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 48px 90px;
}

.author-bio-inner {
  border-top: 1px solid var(--line);
  padding-top: 44px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
}

.bio-mark {
  width: 64px;
  height: 64px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bio-mark svg { width: 30px; height: 24px; }

.bio-name {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 10px 0 12px;
}

.bio-text {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.75;
  margin-bottom: 26px;
  max-width: 560px;
}

.bio-ctas {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ═══ LISTING (index) ═══ */
#listing {
  padding: 72px 48px 96px;
  background: var(--paper);
}

.listing-header { margin-bottom: 44px; max-width: 1280px; }

.pagination {
  max-width: 1280px;
  margin-top: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 13px;
}

.pagination a { color: var(--ink); text-decoration: none; }
.pagination a:hover { color: var(--green); }
.page-number { color: var(--ink-35); }

/* ═══ INSIGHTS FILTER ═══ */
.insights-filter {
  max-width: 1280px;
  margin: -12px 0 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.filter-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-60);
  text-decoration: none;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.filter-link:hover { color: var(--ink); border-color: var(--ink); }

.filter-link.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-count {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-35);
}

.filter-link.is-active .filter-count { color: var(--green-bright); }

.listing-empty {
  grid-column: 1 / -1;
  font-size: 14px;
  color: var(--ink-60);
}

.listing-empty a { color: var(--green); }

/* Current section in the top nav */
.dg-nav-links li a.is-current { color: var(--ink); background-size: 100% 1.5px; }
.dg-mobile-menu a.is-current { color: var(--green); }

/* ═══ FOOTER ═══ */
.dg-footer {
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.dg-footer-copy { font-size: 12.5px; color: var(--ink-35); }

.dg-footer-links { display: flex; gap: 26px; list-style: none; }

.dg-footer-links a {
  font-size: 12.5px;
  color: var(--ink-35);
  text-decoration: none;
  transition: color 0.16s;
}

.dg-footer-links a:hover { color: var(--ink); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .dg-nav { padding: 0 26px; }
  .dg-nav-links { display: none; }
  .dg-nav-hamburger { display: flex; }

  #hero      { padding: 68px 26px 84px; }
  .hero-tree { width: 90%; height: 60%; opacity: 0.4; }
  #services  { padding: 72px 26px; }
  #writing   { padding: 72px 26px; }
  #different { padding: 72px 26px; }
  #contact   { padding: 76px 26px; }
  #listing   { padding: 56px 26px 72px; }
  .dg-footer { padding: 18px 26px; }

  .two-col         { grid-template-columns: 1fr; gap: 56px; }
  .different-inner { grid-template-columns: 1fr; gap: 48px; }
  .articles-grid   { grid-template-columns: 1fr; }
  .writing-header  { flex-direction: column; align-items: flex-start; gap: 20px; }

  .article-top    { padding: 30px 26px 0; }
  .article-header { padding: 28px 26px 36px; }
  .article-body   { padding: 42px 26px 8px; }
  .author-bio     { padding: 28px 26px 70px; }

  .article-body .kg-width-wide {
    margin-left: calc(50% - 50vw + 26px);
    margin-right: calc(50% - 50vw + 26px);
    width: calc(100vw - 52px);
  }
}

@media (max-width: 560px) {
  .dg-nav { padding: 0 20px; }

  #hero      { padding: 56px 20px 72px; }
  #services  { padding: 60px 20px; }
  #writing   { padding: 60px 20px; }
  #different { padding: 60px 20px; }
  #contact   { padding: 64px 20px; }
  #listing   { padding: 48px 20px 60px; }
  .dg-footer { padding: 16px 20px; flex-direction: column; gap: 12px; text-align: center; }

  .hero-headline { font-size: clamp(40px, 11vw, 56px); }
  .hero-ctas     { flex-direction: column; align-items: flex-start; gap: 16px; }
  .contact-email { font-size: clamp(19px, 6.4vw, 30px); }

  .article-top    { padding: 24px 20px 0; }
  .article-header { padding: 24px 20px 32px; }
  .article-body   { padding: 36px 20px 6px; }
  .author-bio     { padding: 24px 20px 60px; }

  .article-body p { font-size: 15.5px; }
  .article-body blockquote p { font-size: 18px; }
  .author-bio-inner { grid-template-columns: 1fr; gap: 20px; }
  .dg-footer-links  { justify-content: center; gap: 18px; }
}
