/* ---------- Tokens ---------- */
:root {
  --canvas: #FFF9FC;
  --ink: #24131E;
  --surface: #FFFFFF;
  --muted: #685C66;
  --accent: #E0267F;          /* tuned from #F43F9B for AA text contrast on light */
  --accent-fill: #F43F9B;     /* buttons / decoration */
  --accent-ink: #FFFFFF;
  --soft: #FCE4F0;
  --soft-2: #FFF0F7;
  --border: #F3D6E5;
  --shadow: 0 1px 2px rgba(36, 19, 30, .04), 0 8px 24px -12px rgba(244, 63, 155, .25);
  --cta-bg: #1C1219;
  --cta-ink: #FFF9FC;
  --photo-filter: none;

  /* Hero photo framing — adjust these when you swap assets/bee.jpg */
  --photo-zoom: 1.25;  /* 1 = no zoom */
  --photo-x: 50%;      /* horizontal focus point */
  --photo-y: 42%;      /* vertical focus point */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-script: "Caveat", cursive;

  --radius: 22px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: #100D13;
  --ink: #F9F3F8;
  --surface: #1D1721;
  --muted: #B9ABB7;
  --accent: #FF70B7;
  --accent-fill: #FF5AAD;
  --accent-ink: #1A0712;
  --soft: #2A1A26;
  --soft-2: #1A1219;
  --border: #39303B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(255, 90, 173, .25);
  --cta-bg: #F9F3F8;
  --cta-ink: #1A0712;
  --photo-filter: brightness(.92) contrast(1.05);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-fill); color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  color: var(--accent);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 14px 24px; border-radius: 999px;
  font: 600 15px/1 var(--font-body); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-primary { background: var(--accent-fill); color: #fff; box-shadow: 0 8px 20px -8px rgba(244, 63, 155, .6); }
:root[data-theme="dark"] .btn-primary { color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(244, 63, 155, .7); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand {
  font: 700 24px/1 var(--font-display); text-decoration: none; letter-spacing: -.02em; white-space: nowrap;
  display: inline-flex; align-items: flex-start;
}
.brand-fly { width: 22px; height: 19px; fill: var(--accent-fill); color: var(--accent-fill); margin-left: 2px; transform: rotate(14deg) translateY(-4px); }
.nav { display: flex; gap: clamp(18px, 2vw, 28px); }
.nav a { white-space: nowrap; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); position: relative; padding: 6px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent-fill); transform: scaleX(0); transition: transform .25s ease; transform-origin: left;
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav a[aria-current="true"] { color: var(--accent); }
/* Tooltip with the section's description (hover / keyboard focus) */
.nav .tip {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translate(-50%, -4px);
  width: max-content; max-width: 220px; padding: 8px 12px; border-radius: 10px;
  background: var(--ink); color: var(--canvas); font-size: 13px; font-weight: 500; line-height: 1.35; text-align: center; white-space: normal;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 60;
  box-shadow: 0 10px 24px -10px rgba(36, 19, 30, .45);
}
.nav .tip::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; background: inherit;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.nav a:hover .tip, .nav a:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(-12deg); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; grid-area: 1 / 1; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

/* Land section headings below the sticky header */
section[id], [id^="p-"] { scroll-margin-top: 84px; }

/* ---------- Phone / tablet menu ---------- */
.menu-toggle {
  display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer; place-items: center;
}
.menu-bars { display: grid; gap: 4px; width: 18px; }
.menu-bars span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;   /* floats over the page, so nothing shifts */
  border-top: 1px solid var(--border); background: var(--canvas);
  max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px); overflow-y: auto;
  box-shadow: 0 18px 30px -18px rgba(36, 19, 30, .35);
}
.mobile-menu ul { list-style: none; margin: 0; padding: 10px 0 18px; display: grid; }
.mobile-menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 4px; font-size: 18px; font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a::after { content: "→"; color: var(--accent); opacity: .5; transition: transform .2s ease, opacity .2s ease; }
.mobile-menu a:hover::after, .mobile-menu a[aria-current="true"]::after { opacity: 1; transform: translateX(3px); }
.mobile-menu a[aria-current="true"] { color: var(--accent); }
.mobile-menu a { padding: 11px 4px; }
.mm-text { display: grid; gap: 1px; }
.mm-name { font-size: 18px; font-weight: 500; }
.mm-desc { font-size: 13.5px; color: var(--muted); font-weight: 400; }
.mobile-menu .mm-connect { color: var(--accent); font-weight: 600; border-bottom: 0; }
.mobile-menu .mm-connect::after { content: none; }

/* ---------- Section bar (phones / tablets) ---------- */
.section-strip { display: none; }
@media (max-width: 1100px) {
  .section-strip {
    display: flex; align-items: center; position: relative;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .3s ease, opacity .25s ease;
  }
  .site-header.show-strip .section-strip { max-height: 48px; opacity: 1; border-top: 1px solid var(--border); }
  section[id], [id^="p-"] { scroll-margin-top: 128px; }   /* header + section bar */
  .strip-scroll {
    display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
    padding: 10px var(--gutter) 12px; padding-right: 56px; flex: 1;
  }
  .strip-scroll::-webkit-scrollbar { display: none; }
  .strip-scroll a {
    flex: 0 0 auto; white-space: nowrap; text-decoration: none; color: var(--muted);
    font-size: 14.5px; font-weight: 500; padding: 4px 2px; position: relative;
    transition: color .2s ease;
  }
  .strip-scroll a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
    background: var(--accent-fill); transform: scaleX(0); transition: transform .25s ease;
  }
  .strip-scroll a[aria-current="true"] { color: var(--accent); font-weight: 600; }
  .strip-scroll a[aria-current="true"]::after { transform: scaleX(1); }
  /* the nudge: a fade + chevron at the right edge, hidden once you reach the end */
  .strip-more {
    position: absolute; right: 0; top: 0; bottom: 0; width: 56px; border: 0; cursor: pointer;
    display: grid; place-items: center end; padding-right: 12px; color: var(--accent);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--canvas) 92%, transparent) 45%);
  }
  .strip-more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s ease-in-out 3; }
  @keyframes nudge { 50% { transform: translateX(4px); } }
  .strip-more svg { transition: transform .25s ease; }
  .site-header.menu-open .strip-more svg { transform: rotate(90deg); animation: none; }
}

/* dim layer behind the open menu; tapping it closes the menu */
.menu-backdrop {
  position: fixed; inset: 0; z-index: 45; background: rgba(36, 19, 30, .28);
  animation: fade-in .2s ease;
}
.menu-backdrop[hidden] { display: none; }
:root[data-theme="dark"] .menu-backdrop { background: rgba(0, 0, 0, .5); }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--accent); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .2s ease, opacity .25s ease;
}
.to-top:hover { transform: translateY(-3px); }
.to-top[hidden], .mobile-menu[hidden] { display: none; }
.mobile-menu { display: block; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle { display: grid; }
}
@media (max-width: 520px) {
  .header-actions .btn-sm { display: none; }   /* Connect lives in the menu on small phones */
}

/* ---------- Decorative butterflies ---------- */
.fly { position: absolute; fill: var(--accent-fill); color: var(--accent-fill); pointer-events: none; }
.fly-h1 { position: relative; display: inline-block; width: .55em; height: .46em; margin-left: .25em; vertical-align: .55em; transform: rotate(16deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 80% at 85% 10%, var(--soft) 0%, transparent 60%),
    linear-gradient(180deg, var(--soft-2), var(--canvas));
  padding: clamp(28px, 4vw, 48px) 0 clamp(24px, 2.5vw, 32px);
}
.swoosh {
  position: absolute; left: 0; right: 0; bottom: 6%; width: 100%; height: 34%;
  fill: none; stroke: var(--accent-fill); stroke-width: 1.5; opacity: .45; pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
.hero-copy { grid-column: 1 / span 7; position: relative; z-index: 2; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1; letter-spacing: -.03em; font-weight: 600;
  margin: 14px 0 18px;
  font-variation-settings: "opsz" 144;
}
.hero-title .line { display: block; }
.hero-title .line + .line { margin-top: .22em; }  /* breathing room between Hi / name / tagline */
.hero-title .name { display: block; white-space: nowrap; margin-top: .22em; }
.hero-title .accent { color: var(--accent); }
.hero-tag {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.01em;
  white-space: nowrap;
}
.hero-what { color: var(--muted); font-size: clamp(16px, 1.35vw, 18px); line-height: 1.55; max-width: 36em; margin-top: 12px; }
.hero-hook { font-size: clamp(18px, 1.7vw, 21px); font-weight: 600; margin: 20px 0 30px; }

.hero-photo {
  grid-column: 8 / span 5; margin: 0; position: relative;
  aspect-ratio: 3 / 4;
  /* on laptops, size the photo to the screen so the logo strip stays above the fold */
  height: min(100%, max(380px, calc(100vh - 330px))); width: auto; justify-self: center;
}
.hero-photo::before {
  /* offset pink frame */
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--accent-fill); border-radius: 999px 999px 28px 28px; opacity: .55;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: var(--photo-x) var(--photo-y);
  transform: scale(var(--photo-zoom)); transform-origin: var(--photo-x) var(--photo-y);
  filter: var(--photo-filter);
}
.photo-frame {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 999px 999px 28px 28px; box-shadow: var(--shadow);
  background: var(--soft);
}
.fly-photo-1 { width: 40px; height: 34px; top: 4%; left: -8%; transform: rotate(-18deg); }
.fly-photo-2 { width: 26px; height: 22px; bottom: 16%; right: -7%; transform: rotate(20deg); opacity: .8; }

/* ---------- Logo strip (hero) ---------- */
.logo-strip {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 20px;
  margin-top: clamp(28px, 3vw, 36px); padding-top: 18px;
  border-top: 1px solid var(--border);
  text-decoration: none; color: var(--ink);
}
.strip-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.strip-logos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip {
  height: 46px; min-width: 64px; padding: 0 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: transform .2s ease, border-color .2s ease;
}
.chip img { max-height: 26px; width: auto; }
.chip .chip-nimc { max-height: 36px; border-radius: 6px; }
.chip .chip-glo { max-height: 32px; }
.chip .chip-nomba { max-height: 15px; }
.chip .chip-carbon { max-height: 20px; }
.chip .chip-seamfix { max-height: 16px; }
.chip .chip-shiga { max-height: 20px; }
/* logos with a light and a dark version */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }
.chip-mtn { background: #FFCB05; border-color: #FFCB05; }
.chip-mtn img { max-height: 22px; }
.strip-arrow { margin-left: auto; color: var(--accent); font-size: 20px; transition: transform .2s ease; }
.logo-strip:hover .chip { border-color: color-mix(in srgb, var(--accent-fill) 45%, var(--border)); }
.logo-strip:hover .strip-arrow { transform: translateY(3px); }
:root[data-theme="dark"] .chip .chip-nimc { background: #fff; padding: 2px; }

/* ---------- Sections ---------- */
.section { padding: clamp(36px, 4.5vw, 56px) 0; position: relative; }
.section-tight { padding: clamp(24px, 3vw, 40px) 0; }
#work { padding-top: clamp(28px, 4vw, 48px); }  /* sits right under the hero logo strip */
.section-tint { background: linear-gradient(180deg, var(--canvas), var(--soft-2) 30%, var(--soft-2) 70%, var(--canvas)); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 4vw, 44px); }
.section-head h2, .human h2 {
  font-family: var(--font-display); font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08; letter-spacing: -.025em; margin: 14px 0 18px;
  font-variation-settings: "opsz" 144;
}
.lede { color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); max-width: 60ch; margin-inline: auto; }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px 30px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent-fill) 40%, var(--border)); }
.logo-wrap { height: 72px; display: grid; place-items: center; margin-bottom: 18px; }
.logo { max-height: 56px; width: auto; }
.logo-nimc { max-height: 70px; border-radius: 12px; }
.logo-glo { max-height: 60px; }
.logo-nomba { max-height: 30px; }
.logo-carbon { max-height: 40px; }
.logo-seamfix { max-height: 28px; }
.logo-plate.mtn { background: #FFCB05; border-radius: 14px; padding: 12px 16px; display: grid; place-items: center; }
.logo-plate.mtn .logo { height: 34px; }
:root[data-theme="dark"] .logo-mono { filter: brightness(0) invert(1); }
:root[data-theme="dark"] .logo-nimc { background: #fff; padding: 4px; }

.tag { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.work-card h3 { font-size: 19px; letter-spacing: -.01em; margin-bottom: 10px; }
.work-card .q { font-weight: 500; }
.work-card .a { color: var(--muted); font-size: 15.5px; margin-top: 8px; line-height: 1.55; max-width: 30ch; }
.work-card-more { background: var(--soft); border-color: transparent; grid-column: 1 / -1; }
.more-link {
  margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none;
  border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.more-link:hover { border-bottom-style: dashed; }
.built-at {
  margin-top: auto; padding-top: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.built-at img { height: 14px; width: auto; }
.work-card .a { margin-bottom: 0; }
.heart { width: 46px; height: 46px; fill: none; stroke: var(--accent-fill); stroke-width: 1.8; stroke-linejoin: round; }
.work-card-more:hover .heart { animation: beat .9s ease; }
@keyframes beat { 30% { transform: scale(1.18); } 60% { transform: scale(.96); } }
.footnote { text-align: center; color: var(--muted); font-size: 15px; margin-top: 32px; font-style: italic; }

/* ---------- Hats ---------- */
.hat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hat {
  background: var(--soft); border-radius: var(--radius); padding: 32px 24px; text-align: center;
  border: 1px solid transparent;
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}
.hat:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent-fill) 45%, transparent); }
.hat svg { width: 38px; height: 38px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 16px; }
.hat h3 { font-size: 19px; margin-bottom: 6px; }
.hat p { color: var(--muted); max-width: 22ch; margin-inline: auto; }

/* ---------- Selected engineering work ---------- */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent-fill) 40%, var(--border)); }
.project h3 { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -.02em; }
.project-tag { color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.project-body { color: var(--muted); }
.project-role { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); font-size: 15px; font-weight: 500; }
.project-role span {
  display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px;
}
.project-meta { color: var(--muted); font-size: 14px; font-style: italic; }

.project-featured {
  grid-column: 1 / -1; flex-direction: row; gap: clamp(24px, 4vw, 56px); align-items: stretch;
  background: linear-gradient(135deg, var(--surface) 55%, var(--soft));
}
.project-main { display: flex; flex-direction: column; gap: 14px; flex: 1 1 60%; }
.project-featured .project-role { margin-top: 4px; }
.project-shift {
  flex: 0 0 min(34%, 300px); align-self: center; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.shift-from, .shift-to {
  width: 100%; border-radius: 14px; padding: 14px 18px; font-weight: 600; font-size: 15.5px; line-height: 1.35;
}
.shift-from span, .shift-to span {
  display: block; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 4px;
}
.shift-from { border: 1.5px dashed var(--border); color: var(--muted); background: var(--canvas); }
.shift-from span { color: var(--muted); }
.shift-to { background: var(--soft); color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--accent-fill) 45%, transparent); }
.shift-to span { color: var(--accent); }
.shift-arrow { color: var(--accent); font-size: 22px; line-height: 1; }

.badge-live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--accent);
}
.badge-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-fill);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.pipeline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pipeline li {
  font-size: 13.5px; font-weight: 500; padding: 6px 11px; border-radius: 10px;
  background: var(--canvas); border: 1px solid var(--border); white-space: nowrap;
}
.pipeline li:not(:last-child)::after { content: "→"; color: var(--accent); margin-left: 9px; margin-right: -3px; }
.pipeline li:last-child { border-color: color-mix(in srgb, var(--accent-fill) 45%, var(--border)); }

.traits { display: flex; flex-wrap: wrap; gap: 8px; }
.traits li {
  font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  background: var(--soft); color: var(--accent);
}

/* ---------- Career ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 960px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 200px; top: 8px; bottom: 8px; width: 2px;
  background: var(--border); border-radius: 2px;
}
/* the pink line "draws itself" as you scroll; --p is set by main.js (0 → 1) */
.timeline::after {
  content: ""; position: absolute; left: 200px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--accent-fill), color-mix(in srgb, var(--accent-fill) 70%, var(--soft)));
  transform-origin: top; transform: scaleY(var(--p, 0));
}
.tl-item { display: grid; grid-template-columns: 200px 1fr; gap: 0 40px; position: relative; padding-bottom: clamp(28px, 4vw, 40px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 194px; top: 8px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--canvas); border: 2px solid var(--border); z-index: 1;
  transition: border-color .35s ease, background-color .35s ease, box-shadow .35s ease, transform .35s ease;
}
.tl-item.reached::before { border-color: var(--accent-fill); transform: scale(1.1); }
.tl-current.reached::before { background: var(--accent-fill); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-fill) 22%, transparent); }
.tl-item .tl-years { transition: color .35s ease; }
.tl-item.reached .tl-years { color: var(--accent); }
.tl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-right: 30px; text-align: right; }
.tl-logo { height: 30px; display: flex; align-items: center; justify-content: flex-end; }
.tl-logo img { max-height: 26px; max-width: 130px; width: auto; }
.tl-years { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.tl-body h3 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 8px; }
.tl-current .tl-body h3 { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 28px); }
.tl-at { color: var(--muted); font-weight: 500; }
.tl-body p { color: var(--muted); margin-bottom: 10px; max-width: 62ch; }
.tl-current .tl-body {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 28px); margin-top: -6px;
}

.ladder { list-style: none; margin: 4px 0 16px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ladder li { white-space: nowrap; font-size: 13.5px; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--canvas); border: 1px solid var(--border); color: var(--muted); }
.ladder li:not(:last-child)::after { content: "→"; color: var(--accent); margin-left: 9px; margin-right: -3px; }
.ladder li.now { background: var(--soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent-fill) 40%, var(--border)); font-weight: 600; }

.tl-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 0; }
.tl-links span { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; width: 100%; }
.tl-links a { color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.tl-links a:hover { border-bottom-style: dashed; }
.tl-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tl-stack li { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }

/* ---------- Skills ---------- */
.skill-block { max-width: 1080px; margin-inline: auto; }
.skill-block h3 { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.015em; }
.skill-intro { text-align: center; margin-bottom: clamp(24px, 3vw, 36px); }
.skill-intro h3, .skill-human h3 { color: var(--accent); font-size: 13px; font-family: var(--font-body); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.skill-thesis { font-family: var(--font-display); font-style: italic; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; }
.skill-sub { color: var(--muted); margin-top: 8px; }

.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px 24px; transition: transform .25s ease, border-color .25s ease;
}
.stack:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent-fill) 40%, var(--border)); }
.stack-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--accent); margin-bottom: 14px; }
.stack-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stack h4 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.stack p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.stack .stack-prev { font-size: 13.5px; font-style: italic; margin-top: 6px; }
.stack .stack-tools { font-size: 13.5px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.tool-groups { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); display: grid; gap: 6px; }
.tool-groups { gap: 8px; }
.tool-groups > div { display: grid; gap: 1px; }
.tool-groups dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tool-groups dd { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.stack-wide-body .tool-groups { margin-top: 0; padding-top: 0; border-top: 0; padding-left: 24px; border-left: 1px dashed var(--border); }
.stack-wide { grid-column: 1 / -1; display: flex; gap: 18px; align-items: flex-start; }
.stack-wide .stack-icon { flex: 0 0 auto; margin-bottom: 0; }
.stack-wide-body { flex: 1; display: grid; grid-template-columns: 2fr 1fr; gap: 10px 32px; align-items: end; }
.stack-wide-body .stack-tools { margin-top: 0; padding-top: 0; border-top: 0; padding-left: 24px; border-left: 1px dashed var(--border); }

.skill-quote {
  margin: clamp(28px, 4vw, 44px) auto 0; max-width: 46ch; text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45;
  padding-top: 24px; position: relative;
}
.skill-quote::before { content: ""; position: absolute; top: 0; left: 50%; width: 48px; height: 2px; background: var(--accent-fill); transform: translateX(-50%); border-radius: 2px; }

.skill-human { margin-top: clamp(40px, 5vw, 64px); text-align: center; }
.skill-human h3 { margin-bottom: 16px; }
.skill-human .chips { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 8px 16px; font-size: 15px; font-weight: 500;
  transition: border-color .2s ease, color .2s ease;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Human ---------- */
.human { text-align: center; max-width: 760px; }
.lol { font-family: var(--font-script); color: var(--accent); font-weight: 600; font-size: 1.1em; }
.human-turn { margin-top: 14px; font-size: clamp(17px, 1.5vw, 19px); font-weight: 500; }
.text-link {
  display: inline-block; margin-top: 24px; color: var(--accent); font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.text-link:hover { border-bottom-style: dashed; }
.human-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; }

/* ---------- Philosophy ---------- */
.philosophy {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--accent-fill) 22%, var(--soft)));
  border-radius: 32px; text-align: center;
  padding: clamp(48px, 7vw, 80px) clamp(24px, 6vw, 64px);
}
.philosophy .script { font: 600 clamp(34px, 4.2vw, 50px)/1.05 var(--font-script); color: var(--ink); margin-bottom: 10px; }
.fw-tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(19px, 2vw, 23px); }
.fw-intro { color: var(--muted); max-width: 52ch; margin: 6px auto clamp(24px, 3.5vw, 40px); }
.philo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; position: relative; z-index: 1; }
.philo {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-fill) 18%, transparent);
  border-radius: var(--radius); padding: clamp(18px, 2.2vw, 24px);
  display: flex; flex-direction: column;
}
.philo-label { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.philo h3 { font-family: var(--font-body); font-weight: 700; font-size: clamp(20px, 2vw, 24px); letter-spacing: -.02em; line-height: 1.2; margin-bottom: 4px; }
.philo-body { color: var(--muted); font-size: 15.5px; line-height: 1.5; margin-bottom: 10px; }
.shred { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.shred li {
  font-size: 14.5px; font-weight: 500; padding: 6px 12px; border-radius: 999px;
  background: var(--canvas); border: 1px solid var(--border);
}
.shred b { color: var(--accent); font-weight: 700; }
.philo .shred { margin-top: 4px; gap: 6px; }
.philo .shred li { font-size: 13.5px; padding: 4px 10px; }
.philo .steps { gap: 6px; }
.philo .steps li { padding: 6px 10px; font-size: 14px; }
.defs { margin: 2px 0 12px; display: grid; gap: 5px; }
.defs > div { display: grid; grid-template-columns: 7em 1fr; gap: 10px; align-items: baseline; padding-bottom: 5px; border-bottom: 1px dashed var(--border); }
.defs > div:last-child { border-bottom: 0; padding-bottom: 0; }
.defs dt { font-weight: 600; font-size: 14px; color: var(--ink); }
.defs dt b { color: var(--accent); }
.defs dd { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.fw-for { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.fw-line { font-family: var(--font-display); font-style: italic; font-size: 16.5px; line-height: 1.4; color: var(--ink); margin-top: 2px; margin-bottom: 2px; }
.fw-note { color: var(--muted); font-size: 13px; }
.philo .shred, .philo .steps { margin-bottom: 12px; }
.philo-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px 40px; align-items: end; }
.philo-wide .philo-body { margin-bottom: 0; }
.philo-wide .fw-note { margin-bottom: 0; }
.fw-closing { position: relative; z-index: 1; margin-top: clamp(28px, 4vw, 44px); }
.fw-closing-title { font-family: var(--font-display); font-style: italic; font-size: clamp(20px, 2.1vw, 24px); line-height: 1.3; margin-bottom: 6px; }
.fw-closing p:last-child { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.steps { list-style: none; counter-reset: step; margin: 6px 0 16px; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.steps li {
  counter-increment: step; display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 12px;
  background: var(--canvas); border: 1px solid var(--border);
}
.steps li::before {
  content: counter(step); flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-fill); color: #fff; font-size: 12px; font-weight: 700;
}
:root[data-theme="dark"] .steps li::before { color: var(--accent-ink); }
.fly-philo-1 { width: 44px; height: 38px; top: 6%; left: 4%; transform: rotate(-22deg); opacity: .7; }
.fly-philo-2 { width: 30px; height: 26px; bottom: 10px; right: 12px; transform: rotate(18deg); opacity: .7; }

/* ---------- Connect ---------- */
.connect-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.connect-grid > li { flex: 0 1 calc((100% - 28px) / 3); }
.connect-card .connect-desc { overflow-wrap: anywhere; }
.connect-card {
  height: 100%; display: flex; flex-direction: column; gap: 6px;
  padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.connect-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent-fill) 45%, var(--border)); }
.connect-icon {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--accent); margin-bottom: 10px;
}
.connect-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.connect-name { font-weight: 600; font-size: 18px; display: flex; justify-content: space-between; align-items: baseline; }
.connect-name .out { color: var(--accent); transition: transform .2s ease; }
.connect-card:hover .out { transform: translate(2px, -2px); }
.connect-desc { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; margin-top: 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.socials { display: flex; gap: 6px; }
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  color: var(--ink); transition: background-color .2s ease, color .2s ease;
}
.socials a:hover { background: var(--soft); color: var(--accent); }
.socials svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- 404 ---------- */
.btn-ghost { border: 1.5px solid var(--border); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.notfound {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 72px - 120px); display: grid; place-items: center;
  padding: clamp(56px, 10vw, 120px) 0;
  background:
    radial-gradient(90% 70% at 50% 0%, var(--soft) 0%, transparent 65%),
    linear-gradient(180deg, var(--soft-2), var(--canvas));
}
.notfound-inner { position: relative; text-align: center; max-width: 680px; }
.notfound h1 {
  font-family: var(--font-display); font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05; letter-spacing: -.03em; margin: 16px 0 18px;
  font-variation-settings: "opsz" 144;
}
.notfound .lede { margin-bottom: 32px; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.notfound-flies { position: relative; height: 72px; margin-bottom: 8px; }
.nf-fly { position: absolute; fill: var(--accent-fill); color: var(--accent-fill); animation: drift 6s ease-in-out infinite; }
.nf-fly-1 { width: 54px; height: 46px; left: calc(50% - 27px); top: 10px; }
.nf-fly-2 { width: 26px; height: 22px; left: calc(50% + 60px); top: 0; opacity: .7; animation-delay: -2s; }
.nf-fly-3 { width: 20px; height: 17px; left: calc(50% - 90px); top: 34px; opacity: .55; animation-delay: -4s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50% { transform: translate(6px, -10px) rotate(8deg); }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .work-grid, .hat-grid, .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .connect-grid > li { flex-basis: calc((100% - 14px) / 2); }
  .hero-copy { grid-column: 1 / span 7; }
  .hero-photo { grid-column: 8 / span 5; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .logo-strip { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; }
  .strip-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
  .chip { height: 42px; min-width: 0; padding: 0 8px; flex: 0 0 calc((100% - 24px) / 4); }
  .chip img { max-width: 100%; }
  .strip-arrow { display: none; }
  /* Photo sits beside the headline, layered behind the text */
  .hero { padding-top: 28px; }
  .hero-grid { display: block; }
  .hero-copy { position: relative; z-index: 2; }
  .hero-tag { font-size: 22px; }
  .hero-what { font-size: 15px; line-height: 1.5; margin-top: 8px; max-width: 64%; }  /* stop before the photo */
  .hero-hook { font-size: min(17px, 4.05vw); margin: 14px 0 24px; }
  .hero-photo {
    position: absolute; z-index: 1; top: 34px; bottom: 0; right: calc(var(--gutter) * -1 + 10px);
    width: 50%; max-width: 320px; height: auto; aspect-ratio: auto;
  }
  .hero-photo img { transform: scale(var(--photo-zoom-mobile, 1.08)); object-position: var(--photo-x-mobile, 22%) var(--photo-y); }
  .fly-h1 { display: none; }
  .hero-photo::before { inset: 10px -10px -10px 10px; }
  .photo-frame {
    -webkit-mask-image: linear-gradient(100deg, transparent 0%, rgba(0,0,0,.18) 30%, #000 72%), linear-gradient(to top, transparent 0%, #000 22%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(100deg, transparent 0%, rgba(0,0,0,.18) 30%, #000 72%), linear-gradient(to top, transparent 0%, #000 22%);
    mask-composite: intersect;
    box-shadow: none;
  }
  .fly-photo-1 { left: auto; right: 8%; top: -22px; width: 28px; height: 24px; }
  .fly-photo-2 { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .timeline::before, .timeline::after { left: 7px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 32px; }
  .tl-item::before { left: 1px; top: 4px; }
  .tl-meta { flex-direction: row; justify-content: space-between; align-items: center; padding-right: 0; text-align: left; margin-bottom: 10px; }
  .tl-logo { justify-content: flex-start; }
  .tl-current .tl-body { margin-top: 0; }
  .stack-wide { flex-direction: column; gap: 14px; }
  .stack-wide-body { grid-template-columns: 1fr; }
  .stack-wide-body .stack-tools, .stack-wide-body .tool-groups { padding-left: 0; border-left: 0; padding-top: 10px; border-top: 1px dashed var(--border); }
  .project-featured { flex-direction: column; }
  .project-shift { flex-basis: auto; align-self: stretch; }
  .philo-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .philo-wide { grid-template-columns: 1fr; }
  .defs > div { grid-template-columns: 1fr; gap: 2px; }
  .philosophy { padding: 40px 12px 16px; border-radius: 26px; }
  .fly-philo-1 { top: 10px; left: 10px; width: 24px; height: 20px; }
  .philosophy .script { font-size: 32px; }
  .philo { padding: 22px 18px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .work-grid, .hat-grid, .stack-grid { grid-template-columns: 1fr; }
  .connect-grid > li { flex-basis: 100%; }
  .header-actions .btn-sm { padding: 9px 14px; font-size: 13px; }
  .header-actions { gap: 8px; }
  .theme-toggle { width: 38px; height: 38px; }
  .brand { font-size: 20px; }
  .brand-fly { width: 17px; height: 15px; }
  .hat { padding: 26px 20px; }
}

@media (max-width: 400px) {
  .header-actions .btn-sm > span[aria-hidden] { display: none; }
}
@media (max-width: 380px) {
  .btn-extra { display: none; }
}
@media (max-width: 350px) {
  .brand { font-size: 18px; }
  .header-actions .btn-sm { padding: 9px 11px; }
}
