:root {
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-2: #efebe3;
  --ink: #1b1f1c;
  --muted: #5d645e;
  --line: #e2dcd1;
  --accent: #1f5c4a;
  --accent-ink: #ffffff;
  --accent-soft: #e2ece6;
  --shadow: 0 1px 2px rgba(27, 31, 28, .04), 0 12px 32px -12px rgba(27, 31, 28, .12);
  --radius: 16px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121513;
    --surface: #191d1a;
    --surface-2: #20251f;
    --ink: #ece8e0;
    --muted: #a2a99f;
    --line: #2b312c;
    --accent: #7cc4a4;
    --accent-ink: #0f1a15;
    --accent-soft: #1d2b24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif); font-size: 15px; font-weight: 600;
}
.logo-mark.small { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
.logo-name { font-size: 15px; }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 14px; color: var(--muted); }
.nav nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.nav .nav-cta:hover { border-color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fa66b; box-shadow: 0 0 0 4px color-mix(in srgb, #3fa66b 20%, transparent); }
h1 { font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02; margin: 0 0 18px; }
.headline { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 26px); color: var(--accent); margin: 0 0 18px; }
.tagline { font-size: 18px; color: var(--muted); max-width: 580px; margin: 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 500; font-size: 15px;
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary span { transition: transform .2s; }
.btn.primary:hover span { transform: translateX(3px); }

.portrait { justify-self: end; position: relative; }
.portrait::before {
  content: ""; position: absolute; inset: -18px;
  border: 1px solid var(--line); border-radius: 50%;
}
.avatar {
  width: 300px; height: 300px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 55%, var(--surface)), var(--accent) 70%);
  background-size: cover; background-position: center;
  color: var(--accent-ink); font-family: var(--serif); font-size: 84px; font-weight: 500;
  box-shadow: var(--shadow);
}

/* Stats & clients */
.stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats li { padding: 28px 24px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats strong { display: block; font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 14px; }
.clients { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 28px 0 8px; }
.clients-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.clients ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; }
.clients li { font-family: var(--serif); font-size: 21px; color: var(--ink); opacity: .78; }

/* Sections */
.section { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding-top: 96px; padding-bottom: 8px; }
.section-head { position: sticky; top: 96px; align-self: start; }
.section-head .num { display: block; font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 18px; margin-bottom: 6px; }
h2 { font-size: 34px; line-height: 1.15; margin: 0; }
.sub { font-size: 22px; margin: 48px 0 16px; }
.prose p { margin: 0 0 18px; font-size: 17px; color: var(--muted); }
.prose p:first-child { font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--ink); }
.lede { margin: 0 0 20px; color: var(--muted); font-size: 17px; }

.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }

/* Career journey */
.journey {
  list-style: none; margin: 0 0 32px; padding: 28px 24px 24px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative;
}
.journey li { position: relative; }
.journey li::before { /* connecting line */
  content: ""; position: absolute; top: 37px; left: 0; right: 0; height: 2px;
  background: var(--line);
}
.journey li:first-child::before { left: 50%; }
.journey li:last-child::before { right: 50%; }
.journey a { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; }
.journey .when { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 15px; height: 24px; }
.journey .node {
  width: 14px; height: 14px; border-radius: 50%; margin: 6px 0 14px;
  background: var(--surface); border: 2px solid var(--accent);
  transition: transform .2s, background .2s;
}
.journey .now .node { background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.journey strong { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 1.25; }
.journey .what { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.journey .dur {
  margin-top: 10px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); padding: 3px 9px; border-radius: 999px;
}
.journey a:hover .node { transform: scale(1.25); background: var(--accent); }
.journey a:hover strong { color: var(--accent); }
.js .reveal .journey li { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--n) * 90ms + 150ms); }
.js .reveal.in .journey li { opacity: 1; transform: none; }
.timeline > li { scroll-margin-top: 90px; }

/* Technology toolkit */
.toolkit { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.toolkit > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.toolkit > div:nth-child(odd) { padding-right: 24px; }
.toolkit > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.toolkit dt { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.toolkit dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.toolkit dd span { font-size: 13px; padding: 3px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.timeline > li {
  padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .25s, border-color .25s;
}
.timeline > li:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.timeline .period {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.timeline .role { font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.timeline .company { color: var(--muted); margin-top: 4px; }
.timeline ul { margin: 16px 0 0; padding: 0; list-style: none; }
.timeline ul li { position: relative; padding-left: 20px; margin: 8px 0; color: var(--muted); }
.timeline .tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.timeline .tech span { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.timeline ul li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 1.5px; background: var(--accent); }

/* Credentials */
.certs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.certs li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.certs li div { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.certs strong { font-weight: 500; font-size: 15px; }
.certs li span:not(.badge) { color: var(--muted); font-size: 13px; margin-top: 2px; }
.badge {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent);
  font-family: var(--serif); font-weight: 600; font-size: 15px;
}
.badge.logo { background: #fff; border: 1px solid var(--line); }
.badge.logo::after {
  content: ""; width: 24px; height: 24px; background: var(--brand);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.awards { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.awards li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.awards strong { font-family: var(--serif); font-weight: 500; font-size: 19px; }
.awards span { color: var(--muted); font-size: 14px; text-align: right; }

/* Beyond work */
.community { list-style: none; margin: 0; padding: 0; }
.community li {
  padding: 28px 30px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
}
.community .kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.community strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 26px; margin-top: 6px; }
.community em { font-family: var(--serif); color: var(--accent); }
.community p { margin: 12px 0 0; color: var(--muted); max-width: 620px; }
.interests { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.interests li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: transform .2s, box-shadow .2s;
}
.interests li:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.interests .icon { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.interests strong { font-family: var(--serif); font-weight: 500; font-size: 19px; }
.interests li > span:last-child { color: var(--muted); font-size: 14px; }

/* Booking */
.booking { display: grid; grid-template-columns: minmax(230px, 280px) 1fr; gap: 16px; align-items: start; }
.booking-info {
  position: sticky; top: 96px;
  padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
.booking-info h3 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.booking-info > p:first-of-type { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.facts { list-style: none; margin: 0 0 22px; padding: 0 0 20px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.facts svg {
  flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 8px;
  background: var(--accent-soft); stroke: var(--accent);
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.topics-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.topics { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.topics li { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; }
.calendar { min-width: 0; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.calendar.calendly-inline-widget { height: 660px; }
.calendar.placeholder { padding: 40px; text-align: center; color: var(--muted); }
.booking-alt { margin: 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; }
.booking-alt a { color: var(--accent); font-weight: 500; }
.booking-alt a:hover { text-decoration: underline; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); font: inherit; cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card strong { font-family: var(--serif); font-size: 21px; font-weight: 500; }
.card span { color: var(--muted); font-size: 14px; }
.card i { position: absolute; top: 22px; right: 22px; font-style: normal; color: var(--accent); transition: transform .2s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--ink); transform: translateY(-2px); }
.card:hover i { transform: translate(2px, -2px); }

.footer { display: flex; justify-content: space-between; margin-top: 96px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer a:hover { color: var(--ink); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Chat */
.chat-toggle {
  position: fixed; right: 24px; bottom: 24px; z-index: 20;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform .2s;
}
.chat-toggle:hover { transform: scale(1.06); }
.chat-toggle svg { width: 24px; height: 24px; fill: currentColor; }
.chat {
  position: fixed; right: 24px; bottom: 96px; z-index: 20;
  width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); overflow: hidden;
}
.chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-id { display: flex; align-items: center; gap: 10px; }
.chat-head strong { font-size: 15px; }
.chat-head small { display: block; color: var(--muted); font-size: 12px; }
.chat-head button { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg a { color: var(--accent); text-decoration: underline; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-quick button {
  font: inherit; font-size: 12px; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.chat-quick button:hover { border-color: var(--accent); color: var(--accent); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1; padding: 11px 14px; border-radius: 999px; font: inherit; font-size: 14px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); outline: none;
}
.chat-form input:focus { border-color: var(--accent); }
.chat-form button { width: 42px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 18px; cursor: pointer; }

/* Responsive */
@media (max-width: 900px) {
  .section { grid-template-columns: 1fr; gap: 24px; padding-top: 72px; }
  .section-head { position: static; }
  .booking { grid-template-columns: 1fr; }
  .booking-info { position: static; }
  /* Journey turns vertical on narrow screens */
  .journey { grid-auto-flow: row; grid-auto-columns: auto; padding: 20px; }
  .journey li::before { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .journey li:first-child::before { left: 6px; top: 50%; }
  .journey li:last-child::before { right: auto; bottom: 50%; }
  .journey a {
    display: grid; grid-template-columns: 14px 64px 1fr auto; column-gap: 14px; align-items: center;
    text-align: left; padding: 12px 0;
  }
  .journey .node { grid-row: 1 / 3; grid-column: 1; margin: 0; }
  .journey .when { grid-row: 1 / 3; grid-column: 2; height: auto; }
  .journey strong { grid-column: 3; grid-row: 1; }
  .journey .what { grid-column: 3; grid-row: 2; margin: 0; }
  .journey .dur { grid-column: 4; grid-row: 1 / 3; margin: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .wrap, .nav-inner { padding-left: 16px; padding-right: 16px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .logo-name { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 40px; }
  .portrait { justify-self: start; order: -1; }
  .portrait::before { inset: -10px; }
  .avatar { width: 120px; height: 120px; font-size: 40px; }
  .stats li { padding: 20px 16px; }
  .stats strong { font-size: 34px; }
  .timeline > li { padding: 22px 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .interests { grid-template-columns: repeat(2, 1fr); }
  .toolkit { grid-template-columns: 1fr; }
  .toolkit > div:nth-child(n) { padding: 14px 0; border-left: 0; }
  .booking-info { padding: 22px 20px; }
  .calendar.calendly-inline-widget { height: 760px; }
  .community li { padding: 22px 20px; }
  .awards li { flex-direction: column; gap: 2px; }
  .awards span { text-align: left; }
  .footer { flex-direction: column; gap: 8px; }
  .chat { right: 16px; bottom: 88px; }
  .chat-toggle { right: 16px; bottom: 16px; }
}
