:root {
  --ink: #14161a;
  --ink-soft: #5a5e68;
  --paper: #ffffff;
  --panel: #f7f6f3;
  --line: #e6e4de;
  --accent: #1f3a5f;
  --max: 1120px;
  --measure: 700px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 22px; } }

/* Nav */
header.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .bar { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.nav .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; text-decoration: none; color: var(--ink);
  letter-spacing: -0.01em; white-space: nowrap;
}
.nav .links { display: flex; gap: 30px; }
.nav .links a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none;
}
.nav .links a:hover { color: var(--ink); }
.nav .actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 780px) { .nav .links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 16px 28px; font-size: 15px; }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-grid .portrait-wrap { order: -1; max-width: 200px; } }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(24px, 3.1vw, 36px); line-height: 1.22;
  max-width: 32ch; margin-bottom: 20px;
}
.hero .greeting { font-size: 20px; color: var(--ink); font-weight: 600; margin-bottom: 16px; }
.hero p.lede { font-size: 15px; color: var(--ink-soft); max-width: 52ch; margin-bottom: 32px; line-height: 1.9; }
.hero p.lede .sep { color: var(--line); margin: 0 3px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.portrait-wrap { display: flex; justify-content: center; }
.portrait-frame {
  width: 100%; max-width: 320px; aspect-ratio: 1 / 1; border-radius: 50%;
  background: var(--panel); padding: 12px; display: flex;
}
.portrait {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
}

/* Stat row */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); margin-top: 64px;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 24px 20px 0 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
@media (max-width: 700px) { .stat:nth-child(2n) { border-right: none; } }
.stat strong {
  display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.stat span { font-size: 13px; color: var(--ink-soft); }

/* Section shell */
section.block { padding: 96px 0; }
section.block.tight { padding: 64px 0; }
section.block.on-panel { background: var(--panel); }
.section-head { max-width: var(--measure); margin-bottom: 48px; }
.section-head .idx { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 17px; max-width: 58ch; }

/* Case studies */
.case { padding: 72px 0; border-top: 1px solid var(--line); }
.case:first-of-type { border-top: none; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr; gap: 32px; } }
.case-grid.flip .case-media { order: 2; }
@media (max-width: 900px) { .case-grid.flip .case-media { order: -1; } }
.case-media img {
  border-radius: 16px; width: 100%; object-fit: cover;
  aspect-ratio: 4 / 3;
}
.case-media .secondary { margin-top: 14px; aspect-ratio: 16 / 9; }
.case .tag {
  font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 14px;
}
.case h3 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 18px; max-width: 18ch; }
.case p { font-size: 16px; color: var(--ink-soft); margin-bottom: 16px; }
.case p strong { color: var(--ink); font-weight: 600; }
.case-stats { display: flex; flex-wrap: wrap; gap: 28px 36px; margin: 24px 0; }
.case-stats div strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.case-stats div span { font-size: 13px; color: var(--ink-soft); }
.case .takeaway {
  font-size: 15px; color: var(--ink); border-left: 2px solid var(--ink); padding-left: 16px;
  margin-top: 20px;
}

/* Work index (vertical list, home page overview) */
.work-index { border-top: 1px solid var(--line); }
.work-row {
  display: flex; align-items: center; gap: 24px; padding: 36px 0;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.work-row .icon {
  width: 48px; height: 48px; border-radius: 50%; background: var(--panel);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.2s ease;
}
.work-row .icon svg { width: 21px; height: 21px; color: var(--ink); }
.work-row:hover .icon { background: var(--ink); }
.work-row:hover .icon svg { color: #fff; }
.work-row .main { flex: 1; min-width: 0; }
.work-row .row-label {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.work-row h3 { font-size: clamp(19px, 2.4vw, 25px); font-weight: 700; transition: text-decoration 0.15s ease; }
.work-row:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.work-row .stat { text-align: right; flex-shrink: 0; padding: 0 8px; }
.work-row .stat strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.work-row .stat span { font-size: 12px; color: var(--ink-soft); }
.work-row .arrow { flex-shrink: 0; color: var(--ink-soft); transition: transform 0.2s ease, color 0.2s ease; }
.work-row:hover .arrow { transform: translateX(4px); color: var(--ink); }
@media (max-width: 700px) {
  .work-row { gap: 16px; padding: 26px 0; }
  .work-row .stat span { display: none; }
  .work-row .stat strong { font-size: 19px; }
}

/* Case study detail article */
.breadcrumb { font-size: 14px; color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.breadcrumb:hover { color: var(--ink); }
.article-hero-media { border-radius: 20px; overflow: hidden; margin-top: 40px; }
.article-hero-media img { width: 100%; object-fit: cover; max-height: 560px; }
.article-body { max-width: var(--measure); margin: 0 auto; }
.article-body.wide { max-width: 780px; }
.article-body h2 { font-size: 22px; margin: 56px 0 18px; }
.article-body h2:first-child { margin-top: 0; }
.article-body p { font-size: 17px; color: var(--ink-soft); margin-bottom: 18px; }
.article-body p strong { color: var(--ink); font-weight: 600; }
.article-body ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.article-body li { font-size: 16px; color: var(--ink); padding-left: 22px; position: relative; }
.article-body li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--ink-soft);
}
.article-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; }
@media (max-width: 700px) { .article-gallery { grid-template-columns: 1fr; } }
.article-gallery img, .article-gallery-full img { border-radius: 14px; width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.article-gallery-full { margin: 40px 0; }
.article-gallery-full img { aspect-ratio: 16 / 9; }
.article-gallery figcaption, .article-gallery-full figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.stat-grid-full { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 24px 0 32px; }
@media (max-width: 600px) { .stat-grid-full { grid-template-columns: 1fr; } }
.stat-grid-full div { background: var(--panel); padding: 22px 24px; }
.stat-grid-full div strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.stat-grid-full div span { font-size: 13.5px; color: var(--ink-soft); }
.pull-quote {
  font-size: 20px; line-height: 1.5; font-weight: 600; letter-spacing: -0.01em;
  border-left: 2px solid var(--ink); padding-left: 22px; margin: 44px 0;
}
.callout {
  background: var(--panel); border-radius: 14px; padding: 26px 28px; margin: 32px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.callout p { font-size: 15px; color: var(--ink-soft); margin: 0; max-width: 52ch; }
.callout p strong { color: var(--ink); }
.article-nav { display: flex; justify-content: space-between; padding-top: 40px; margin-top: 60px; border-top: 1px solid var(--line); gap: 20px; flex-wrap: wrap; }
.article-nav a { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); }
.article-nav a:hover { text-decoration: underline; }

/* Illustrative notice banner (Ledgerly page) */
.illustrative-banner {
  background: #fff4e6; border-bottom: 1px solid #f0dcc0; color: #6b4a1a;
  font-size: 13.5px; text-align: center; padding: 12px 20px;
}
.illustrative-banner strong { font-weight: 700; }

/* Clean lists (replaces pill/bubble tags) */
.prose-line { font-size: 16px; color: var(--ink-soft); max-width: 66ch; }
.prose-line strong { color: var(--ink); font-weight: 600; }
.prose-line + .prose-line { margin-top: 10px; }

/* About narrative */
.narrative { max-width: var(--measure); }
.narrative p { font-size: 17px; color: var(--ink-soft); margin-bottom: 18px; }
.narrative p strong { color: var(--ink); font-weight: 600; }
.narrative p.intro { font-size: 21px; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 26px; }

/* Testimonials (dark) */
section.testimonials { background: var(--ink); color: #fff; padding: 96px 0; }
.testimonials .section-head { max-width: none; text-align: center; margin: 0 auto 56px; }
.testimonials .section-head p { margin: 0 auto; }
.testimonials .section-head .idx { color: #9aa0ac; }
.testimonials .section-head h2 { color: #fff; }
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 36px; }
@media (max-width: 900px) { .t-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .t-grid { grid-template-columns: 1fr; } }
.t-card p.quote { font-size: 15px; color: #d7d9de; margin-bottom: 20px; }
.t-card p.quote strong { color: #fff; font-weight: 700; }
.t-who { display: flex; align-items: center; gap: 12px; }
.t-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.t-who .name { font-size: 14px; font-weight: 700; color: #fff; }
.t-who .role { font-size: 12.5px; color: #9aa0ac; margin-top: 1px; }
.t-who .li-badge { margin-left: auto; opacity: 0.5; flex-shrink: 0; }

/* Timeline (experience) */
.role { padding: 28px 0; border-top: 1px solid var(--line); }
.role:first-of-type { border-top: none; }
.role-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 6px; }
.role-head .company { font-size: 18px; font-weight: 700; }
.role-head .dates { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.role .title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.role .meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.role .scope { font-size: 15px; color: var(--ink-soft); max-width: 66ch; margin-bottom: 12px; }
.role .highlights { font-size: 13.5px; color: var(--ink-soft); }
.role .highlights strong { color: var(--ink); font-weight: 600; }
.role.earlier p { font-size: 15px; color: var(--ink); max-width: 62ch; }

/* CTA band */
.cta-band {
  background: var(--panel); border-radius: 20px; padding: 64px 44px; text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 14px; }
.cta-band p { color: var(--ink-soft); font-size: 16px; margin-bottom: 28px; max-width: 48ch; margin-left: auto; margin-right: auto; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Connect */
.connect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; max-width: var(--measure); }
@media (max-width: 620px) { .connect-grid { grid-template-columns: 1fr; } }
.connect-card { border-top: 1px solid var(--line); padding: 20px 0; }
.connect-card h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 8px; }
.connect-card a.link { font-size: 17px; color: var(--ink); text-decoration: none; font-weight: 600; }
.connect-card a.link:hover { text-decoration: underline; }

footer.site-footer { padding: 48px 0 64px; border-top: 1px solid var(--line); }
footer.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer.site-footer .links { display: flex; gap: 22px; font-size: 14px; color: var(--ink-soft); }
footer.site-footer .links a { text-decoration: none; }
footer.site-footer .links a:hover { color: var(--ink); }
footer.site-footer .copy { font-size: 13px; color: var(--ink-soft); }
