/* Simple, clean portfolio — layout modeled on jemma.lol */
:root {
  --bg: #ffffff;
  --text: #061b31;
  --body: #50617a;
  --muted: #64748d;
  --line: #e3e8ef;
  --ring-color: #cfd6df;
  --amex: #006fcf;
  --logo-word: #393c40;
  --soft: #f5f5f4;
  --accent: #446df6;
  --wrap: 1000px;
  --gap: 40px;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) {
    --bg: #161616; --text: #ededed; --body: #b8b8b8; --muted: #8e8e8e;
    --line: #2b2b2b; --soft: #1f1f1f; --ring-color: #3a3a3a; --amex: #3d95e6; --logo-word: #ffffff; --accent: #8aa4ff; color-scheme: dark;
  }
}
:root[data-mode="dark"] {
  --bg: #161616; --text: #ededed; --body: #b8b8b8; --muted: #8e8e8e;
  --line: #2b2b2b; --soft: #1f1f1f; --ring-color: #3a3a3a; --amex: #3d95e6; --logo-word: #ffffff; --accent: #8aa4ff; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; box-sizing: content-box; }
.accent { color: var(--accent); }
.accent:hover { opacity: .75; }

/* Pages load with transitions off (class removed by site.js after first paint) */
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-head nav { display: flex; align-items: center; gap: 28px; }
.nav-link { font-weight: 600; font-size: 15px; transition: opacity .2s; }
.nav-link:hover { opacity: .6; }

/* Theme toggle: jemma.lol's two circles; they swap sides in dark mode */
.theme-toggle { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.theme-toggle svg { width: 26px; height: 18px; display: block; transition: transform .5s cubic-bezier(.23,1,.32,1); }
.theme-toggle .tt-o { fill: var(--bg); stroke: currentColor; }
.theme-toggle .tt-f { fill: currentColor; }
.theme-toggle:hover svg { transform: scale(1.08); }
:root[data-mode="dark"] .theme-toggle svg { transform: scaleX(-1); }
:root[data-mode="dark"] .theme-toggle:hover svg { transform: scaleX(-1) scale(1.08); }

/* ---------- Home hero: one short centered sentence with glyphs, then logos ---------- */
.hero { padding: 104px 0 8px; text-align: center; }
.hero-text {
  font-size: 40px; line-height: 1.4; font-weight: 400; letter-spacing: -0.025em;
  max-width: 1000px; margin: 0 auto; text-wrap: pretty; color: var(--text);
}
.hero-text em { font-style: italic; font-weight: 600; }
/* Rounded-square icon boxes in the hero; icons inside cycle (see site.js), like reboot.studio */
.ibox {
  position: relative; display: inline-block; width: 1.08em; height: 1.08em;
  margin: 0 .2em 0 .06em; vertical-align: -0.2em;
  border: 2px solid currentColor; border-radius: 30%; overflow: hidden;
}
.ibox .ic {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transform: translateY(70%) rotate(-12deg) scale(.7);
  transition: opacity .45s ease, transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
.ibox .ic svg { width: 64%; height: 64%; }
.ibox .ic.on { opacity: 1; transform: none; }
.ibox .ic.out { opacity: 0; transform: translateY(-70%) rotate(10deg) scale(.7); }
/* Icon boxes are filled with their color; hovering the box itself switches it to the outline style */
.phrase { white-space: nowrap; }
.tone-data { --tone: #12a150; }
.tone-ai { --tone: #7c4dff; }
.tone-startup { --tone: #f2542d; }
.ibox { background: var(--tone); transition: background-color .7s ease; }
.ibox .ic { color: #fff; transition: opacity .45s ease, transform .7s cubic-bezier(.34, 1.56, .64, 1), color .25s ease; }
.ibox:hover { background: transparent; }
.ibox:hover .ic { color: currentColor; }
/* Scramble keeps its width while letters shuffle */
.scramble { display: inline-block; white-space: nowrap; }
.scramble .sl { display: inline-block; text-align: center; vertical-align: top; }
.scramble .sl.sc { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ibox .ic { transition: none; } }
/* Amex wordmark sits on the baseline at cap height, so it reads as part of the sentence */
.amex { display: inline-block; height: .62em; width: auto; vertical-align: 0; margin: 0 .05em; fill: var(--amex); }

.prev { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 14px; row-gap: 12px; margin-top: 36px; color: var(--muted); font-size: 18px; }
.prev-logos { display: inline-flex; align-items: center; gap: 24px; }
.prev a { display: block; line-height: 0; }
.prev .logo { display: block; width: auto; }
/* Logos are gray until hovered, then show their real colors */
.prev .logo .book, .prev .logo .word, .prev .logo .bars { fill: var(--muted); transition: fill .25s ease; }
.prev .logo-rfy:hover .book { fill: #24affe; }
.prev .logo-pwc:hover .bars { fill: #fd5108; }
.prev .logo:hover .word { fill: var(--logo-word); }
/* Sized so the lowercase letters of both wordmarks match */
.logo-rfy { height: 25px; }
.logo-pwc { height: 30px; margin-top: -5px; }
.section-label { font-size: 28px; font-weight: 700; color: var(--muted); margin: 96px 0 48px; }

/* ---------- Project cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 56px var(--gap); }
.cards .card:nth-child(even) { margin-top: 64px; }
.card { display: block; }
.card .ring { padding: 10px; border: 1px solid var(--line); border-radius: 4px; transition: border-color .3s ease; }
.card .art { transition: transform .5s var(--ease); }
.card:hover .ring, .card:focus-visible .ring { border-color: var(--muted); }
.card:hover .art, .card:focus-visible .art { transform: scale(.97); }
.card .meta { text-align: center; padding: 24px 20px 0; }
.card h2 { font-size: 24px; line-height: 1.2; }
.tags { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tag {
  font-family: var(--mono); font-size: 11.5px; line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px 5px; white-space: nowrap;
}
.tag-kind { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.card p { margin-top: 10px; font-size: 19px; line-height: 1.55; color: var(--muted); }

/* Square artwork: a colored placeholder sits under the image.
   Drop a file at /images/projects/<slug>.jpg and it covers the placeholder. */
.art { position: relative; aspect-ratio: 1 / 1; background: var(--c, var(--soft)); overflow: hidden; }
.art .ph {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer (modeled on joseph.cv): dark dot grid in both themes ---------- */
.site-foot {
  --fa: color-mix(in srgb, var(--foot-accent, #446df6) 78%, #fff);
  margin-top: 140px; padding: 20px 0 72px;
  background-color: #1c1c1c; color: #f4f4f5;
  background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 0);
  background-size: 20px 20px; background-position: -19px -19px;
  font-size: 15px; font-weight: 500; line-height: 1.4;
}
:root[data-mode="dark"] .site-foot { border-top: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) .site-foot { border-top: 1px solid var(--line); } }
.foot-grid { display: grid; grid-template-columns: 5fr 2fr 3fr; gap: 32px; }
.foot-meta, .foot-links, .foot-cta { display: flex; flex-direction: column; gap: 6px; }
.foot-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.mono { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.dim { color: #71717a; }
.pill { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--fa); border: 1px solid var(--fa); border-radius: 999px; padding: 2px 8px 1px; }
/* Dotted underline that turns yellow on hover */
.dl {
  padding: 2px 2px 0; transition: color .15s, background-color .15s;
  background-image: linear-gradient(90deg, rgba(255,255,255,.4) 50%, transparent 0);
  background-position: 0 1.44em; background-repeat: repeat-x; background-size: 2px 1px;
}
.dl:hover, .dl:focus-visible { color: var(--fa); background-color: color-mix(in srgb, var(--fa) 12%, transparent); background-image: linear-gradient(90deg, var(--fa) 50%, transparent 0); }
.arr { font-size: 10px; line-height: 0; color: var(--fa); margin-left: 1px; font-weight: 300; }

/* ---------- Case study ---------- */
.cs-hero { display: grid; grid-template-columns: 1fr 540px; gap: var(--gap); align-items: center; padding-top: 72px; }
.cs-hero h1 { font-size: 36px; line-height: 1.2; }
.cs-hero .sub, .cs-hero .when { font-size: 22px; line-height: 1.3; color: var(--muted); margin-top: 10px; }
.cs-hero .sub { margin-top: 14px; }
.cs-hero .tagline { margin-top: 28px; font-size: 17px; line-height: 1.6; color: var(--body); max-width: 380px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 64px 0 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.45; }

.sec { padding-top: 88px; }
.sec-label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.sec h2 { font-size: 28px; line-height: 1.3; max-width: 720px; }
.prose { max-width: 680px; }
.prose > * + * { margin-top: 18px; }
.sec h2 + * { margin-top: 20px; }
.prose p { font-size: 17px; line-height: 1.7; color: var(--body); }
.prose h3 { font-size: 19px; font-weight: 700; margin-top: 44px; }
.prose a { color: var(--accent); }

.feat { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.feat li { font-size: 15px; line-height: 1.6; color: var(--body); }
.feat strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 4px; }

.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 44px 1fr; padding: 18px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.6; color: var(--body); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font-family: var(--mono); color: var(--accent); font-weight: 500; font-size: 13px; padding-top: 2px; }
.steps strong { display: block; color: var(--text); }

/* Stats: a small graphic draws itself when the row scrolls into view (same set as jorellp.com) */
.stats { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 32px 24px; margin-top: 40px; }
.stat { border-top: 1px solid var(--text); padding-top: 14px; }
.stat b { display: block; font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 6px; font-variant-numeric: tabular-nums; color: var(--text); }
.stat span { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }
.stat .sv { display: block; height: 46px; width: auto; max-width: 100%; margin-bottom: 14px; color: var(--brand-ink, var(--accent)); overflow: visible; }
.stat .sv * { vector-effect: non-scaling-stroke; }
.sv .ln { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s cubic-bezier(.3,.7,.2,1); }
.sv .ar { fill: currentColor; opacity: 0; transition: opacity 1s .6s; }
.sv .bar { fill: currentColor; transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0); transition: transform 1.1s cubic-bezier(.3,.7,.2,1); }
.sv .bar.ghost { fill: var(--line); }
.sv .dot { fill: currentColor; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); transition: opacity .3s, transform .4s cubic-bezier(.3,1.4,.4,1); }
.sv .dot.off { fill: var(--line); }
.sv .track { fill: none; stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.sv .arc { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s cubic-bezier(.3,.7,.2,1); }
.sv .needle { stroke: var(--text); stroke-width: 2; stroke-linecap: round; transform-origin: 32px 40px; transform: rotate(-90deg); transition: transform 1.4s cubic-bezier(.3,.7,.2,1); }
.sv .knob { fill: var(--text); }
.sv .tg { fill: var(--line); transition: fill .4s .5s; }
.sv .tk { fill: var(--bg); transition: transform .5s cubic-bezier(.3,1.3,.4,1) .5s; }
.stat.in .sv .ln, .stat.in .sv .arc { stroke-dashoffset: 0; }
.stat.in .sv .ar { opacity: .12; }
.stat.in .sv .bar { transform: none; }
.stat.in .sv .dot { opacity: 1; transform: none; }
.stat.in .sv .needle { transform: rotate(var(--deg, 60deg)); }
.stat.in .sv .tg { fill: currentColor; }
.stat.in .sv .tk { transform: translateX(22px); }

.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.personas div { background: var(--soft); padding: 22px; }
.personas .tag { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.personas strong { display: block; margin: 10px 0 6px; font-size: 16px; line-height: 1.35; }
.personas div > span:last-child { font-size: 14px; line-height: 1.55; color: var(--body); }

/* Media */
.fig { margin-top: 48px; }
.fig .frame { background: var(--soft); overflow: hidden; }
.fig img, .fig video { width: 100%; height: auto; }
.fig figcaption, .side figcaption, .scroller figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.fig.narrow { max-width: 680px; }
.fig .frame.dark { background: #0d0d0d; display: grid; place-items: center; padding: 32px 0; }
.fig .frame.dark video { width: auto; height: 520px; }
/* Before / After: one frame, a segmented switch, crossfading videos */
.ba-bar { margin-bottom: 16px; }
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 7px; background: var(--soft); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; padding: 6px 18px; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); background: none; border: 0; border-radius: 5px; cursor: pointer; transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--text); }
.seg-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 5px; background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.ba[data-state="after"] .seg-pill { transform: translateX(100%); }
.ba-media { position: relative; aspect-ratio: 16 / 9; background: #000; }
.ba-v { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.ba-v video, .ba-v img { width: 100%; height: 100%; object-fit: contain; }
.ba[data-state="before"] .ba-v[data-v="before"], .ba[data-state="after"] .ba-v[data-v="after"] { opacity: 1; visibility: visible; }
.ba figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ba .ba-c { display: none; }
.ba[data-state="before"] .ba-c[data-v="before"], .ba[data-state="after"] .ba-c[data-v="after"] { display: inline; }
.ba-t { flex: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Every image on the site: thin border, slightly rounded corners, and an offset stroke around it */
.fig .frame, .side .frame, .scroller .frame, .masonry .frame, .ba-media, .about-photos img, .about-photos .ph-img {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  outline: 1px solid var(--line); outline-offset: 6px; }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; margin-top: 56px; }
.side .frame { background: var(--soft); overflow: hidden; }
.side img { width: 100%; height: auto; }
.side .feat { grid-template-columns: 1fr; gap: 18px; }
.side h3, .stack h3 { font-size: 19px; margin-bottom: 20px; }
.stack .copy { margin-top: 32px; max-width: 680px; }
.scroller { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 24px; padding: 8px 8px 16px; scroll-padding: 8px; }
.scroller figure { flex: none; scroll-snap-align: start; }
.scroller .frame { height: 400px; background: var(--soft); }
.scroller img { height: 100%; width: auto; max-width: none; }

/* Quotes — one style everywhere */
.quote { margin-top: 56px; padding-left: 28px; border-left: 3px solid var(--accent); max-width: 760px; }
.quote p { font-size: 26px; line-height: 1.45; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.quote figcaption { margin-top: 14px; font-size: 15px; color: var(--muted); }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.quotes .quote { margin-top: 32px; }
.quotes .quote p { font-size: 20px; }

.nda { margin-top: 40px; font-size: 24px; line-height: 1.45; font-weight: 700; color: var(--muted); max-width: 720px; }
.nda a { color: var(--accent); }

/* Next project */
.next { margin-top: 120px; padding-top: 40px; border-top: 1px solid var(--line); }
.next .k { font-size: 28px; font-weight: 700; color: var(--muted); margin-bottom: 32px; }
.next .cards .card:nth-child(even) { margin-top: 0; }


/* ---------- Case study page (format modeled on austlee.com/glean) ---------- */
.case { --brand-ink: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) .case { --brand-ink: color-mix(in srgb, var(--brand) 62%, #fff); } }
:root[data-mode="dark"] .case { --brand-ink: color-mix(in srgb, var(--brand) 62%, #fff); }
.case .wrap { max-width: 760px; }

.progress { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; height: 3px; width: 100%; z-index: 30;
  transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }

.case-open { position: relative; min-height: 380px; display: grid; place-items: center; padding: 96px 24px 64px; overflow: hidden; }
.case-title { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.case-logo { color: var(--brand-ink); display: flex; justify-content: center; }
.case-logo svg { height: 34px; width: auto; display: block; }
.case-logo .amex { height: 30px; fill: var(--brand-ink); }
.case-logo .logo .book { fill: #24affe; }
.case-logo .logo .word { fill: var(--logo-word); }
.case-logo .logo .bars { fill: #fd5108; }
.case-logo .logo-pwc { height: 46px; }
.case-logo .logo-splitt { height: 40px; color: var(--brand-ink); }
.wordmark-splitt { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; color: var(--brand-ink); line-height: 1; }
.case-title h1 { font-size: clamp(36px, 6.4vw, 72px); line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.case-title h1 span { background: var(--brand); color: #fff; padding: .04em .32em .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.read { color: var(--muted); margin-top: 8px; }
/* Cover sits inside the page width at its natural shape, framed like the project cards */
.case-cover { max-width: 1000px; margin: 0 auto; padding: 0 24px; box-sizing: content-box; }
.case-cover .cover-ring { padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.case-cover .cover-ring { border-radius: 10px; }
.case-cover img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; border: 1px solid var(--line); border-radius: 5px; background: var(--soft); }

.case .sec { padding-top: 72px; }
.case .sec > * + * { margin-top: 28px; }
.case .sec h2 + * { margin-top: 20px; }
.case .sec h2 { color: var(--brand-ink); font-size: 29px; line-height: 1.22; font-weight: 700; letter-spacing: -0.015em; }
.case .sec-label { color: var(--text); font-size: 13px; letter-spacing: .1em; margin-bottom: 14px; }
.case .prose { max-width: none; }
.case .prose p { font-size: 18px; line-height: 1.65; }
.context .facts { margin: 0; padding: 0; border: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 28px; }
.context .facts dt { font-family: var(--font); text-transform: none; letter-spacing: -0.01em; font-size: 24px; font-weight: 700; color: var(--brand-ink); margin-bottom: 4px; }
.context .facts dd { font-size: 16px; line-height: 1.5; color: var(--body); }
.context .lede { margin-top: 36px; font-size: 20px; line-height: 1.55; color: var(--text); font-weight: 500; }

.band {
  margin-top: 96px; color: #fff; padding: 72px 0 96px;
  background-color: var(--brand);
  background-image: radial-gradient(color-mix(in srgb, #fff 22%, transparent) 1px, transparent 0);
  background-size: 20px 20px; background-position: -19px -19px;
}
.band .sec-label { color: rgba(255,255,255,.85); }
.band h2 { font-size: 29px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }

.case .fig, .case .side, .case .scroller { margin-top: 40px; }
.case .fig.narrow { max-width: none; }
.case .fig figcaption, .case .side figcaption, .case .scroller figcaption {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; text-align: center; margin-top: 14px;
}
.case .side { gap: 28px; }
.case .steps .n, .case .personas .tag { color: var(--brand-ink); }
.case .quote { border-left-color: var(--brand); }
.case .nda a { color: var(--brand-ink); }
.thanks { margin-top: 120px; text-align: center; font-size: 22px; font-weight: 600; }
.case .next { margin-top: 64px; }

/* ---------- Gallery ---------- */
.page-intro { padding-top: 80px; }
.page-intro h1 { font-size: 36px; line-height: 1.5; font-weight: 400; max-width: 800px; }
.filters { display: flex; gap: 24px; margin: 48px 0 32px; }
.filters button { font: inherit; font-size: 16px; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { color: var(--accent); }
.masonry { columns: 3 280px; column-gap: 28px; padding: 8px; }
.masonry figure { break-inside: avoid; margin: 0 0 28px; padding: 7px; cursor: zoom-in; }
.masonry figure[hidden] { display: none; }
.masonry .frame { background: var(--soft); overflow: hidden; }
.masonry img { width: 100%; height: auto; transition: transform .5s var(--ease); }
.masonry figure:hover img { transform: scale(.97); }
.masonry figcaption { margin-top: 16px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }

/* ---------- About ---------- */
.about-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 64px; padding: 0 7px; }
.about-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--soft); }
.sig { height: 40px; width: auto; margin-top: 28px; }
:root[data-mode="dark"] .sig { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode]) .sig { filter: invert(1); } }
.xp { margin-top: 24px; }
.xp .co { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.xp .co:last-child { border-bottom: 1px solid var(--line); }
.xp .co .h { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.xp .co .h img { width: 22px; height: 22px; object-fit: contain; }
.xp .role + .role { margin-top: 16px; }
.xp h3 { font-size: 16px; }
.xp p { font-size: 15px; line-height: 1.6; color: var(--body); margin-top: 4px; }

/* ---------- Load-in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(10px); animation: rise .9s var(--ease) forwards; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cs-hero { grid-template-columns: 1fr; }
  .cs-hero .art { order: -1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .side { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-head nav { gap: 18px; }
  .case-open { min-height: 0; padding: 64px 16px 40px; }
  .case .sec h2, .band h2 { font-size: 23px; }
  .context .facts dt { font-size: 20px; }
  .case .prose p { font-size: 17px; }
  .band { margin-top: 64px; padding: 48px 0 64px; }
  .hero { padding-top: 48px; }
  .page-intro h1 { font-size: 26px; }
  .hero { padding-top: 56px; }
  .hero-text { font-size: 28px; line-height: 1.4; }
  .prev { font-size: 15px; gap: 12px 22px; }
  .logo-rfy { height: 20px; }
  .logo-pwc { height: 21px; }
  .hero .more { font-size: 18px; }
  .section-label { font-size: 22px; margin: 64px 0 28px; }
  .cards { grid-template-columns: 1fr; gap: 48px; }
  .cards .card:nth-child(even) { margin-top: 0; }
  .card h2 { font-size: 21px; }
  .card p { font-size: 17px; }
  .cs-hero { padding-top: 40px; }
  .cs-hero h1 { font-size: 30px; }
  .cs-hero .sub, .cs-hero .when { font-size: 19px; }
  .sec { padding-top: 64px; }
  .sec h2 { font-size: 23px; }
  .feat, .personas, .quotes { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 28px; }
  .quote p { font-size: 21px; }
  .fig .frame.dark video { height: 420px; }
  .scroller .frame { height: 280px; }
  .about-photos { grid-template-columns: 1fr 1fr; }
  .xp .co { grid-template-columns: 1fr; gap: 10px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Before/After caption reads as a sentence, with the loop tag on the right */
.case .fig.ba figcaption { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 14px; text-align: left; color: var(--muted); }
.case .fig.ba .ba-t { font-family: var(--mono); }
/* Room for the offset stroke above captions */
.case .fig figcaption, .case .side figcaption { margin-top: 20px; }

/* Testimonials: brand-tinted cards in the site's own style (thin border, offset stroke, mono captions) */
.t-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 7px; }
.case .sec .t-grid { margin-top: 32px; }
.t-card {
  --tint: var(--brand, var(--accent));
  margin: 0; padding: 32px 30px 28px; border-radius: 8px; display: flex; flex-direction: column; gap: 20px;
  background: color-mix(in srgb, var(--tint) 6%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--tint) 22%, var(--line));
  outline: 1px solid var(--line); outline-offset: 6px;
}
.tq-mark { width: 26px; height: auto; color: var(--brand-ink, var(--accent)); }
.t-card blockquote { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.t-card figcaption { margin-top: auto; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--tint) 22%, var(--line)); display: flex; flex-direction: column; gap: 4px; }
.t-card .t-name { font-weight: 600; font-size: 15px; color: var(--text); width: fit-content; text-decoration: none; transition: color .2s; }
.t-card a.t-name::after { content: " \2197"; color: var(--brand-ink, var(--accent)); }
.t-card a.t-name:hover { color: var(--brand-ink, var(--accent)); }
.t-card .t-role { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .t-grid { grid-template-columns: 1fr; } .t-card { padding: 26px 22px 22px; } .t-card blockquote { font-size: 17px; } }

/* Case title: the logo and title always fit the screen */
.case-title { min-width: 0; max-width: 100%; }
.case-logo { max-width: 100%; }
.case-logo svg { max-width: 100%; }
.case-title h1 { overflow-wrap: break-word; }

/* Hero: each phrase keeps its icon, words and punctuation together */
.hero-text .ln { white-space: nowrap; }

@media (max-width: 680px) {
  /* Case title */
  .case-logo .amex { height: auto; width: min(280px, 100%); }
  .case-logo svg { height: 28px; }
  .case-title h1 { font-size: clamp(30px, 9vw, 40px); }

  /* Hero: one idea per line, centered, so text and icons balance */
  .hero-text { font-size: clamp(21px, 6.3vw, 27px); line-height: 1.45; }
  .hero-text .ln, .hero-text .phrase { display: block; }
  .hero-text .phrase { margin-top: .12em; }
  .hero-text .ibox { margin: 0 .28em 0 0; }

  /* Nav: a floating pill at the bottom of the screen */
  .site-head {
    position: fixed; top: auto; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
    border: 1px solid var(--line); border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    box-shadow: 0 10px 30px rgba(6,27,49,.14), 0 2px 6px rgba(6,27,49,.08);
  }
  .site-head .wrap { height: 62px; padding: 0 30px; gap: 30px; max-width: none; }
  .site-head nav { gap: 30px; }
  .site-head .nav-link { font-size: 17px; }
  .site-foot { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}

/* Hero on wider screens: exactly three centered lines, sized to fit the screen */
@media (min-width: 681px) {
  .hero-text { font-size: min(40px, calc((100vw - 64px) / 25)); max-width: none; width: max-content;
    margin-left: 50%; transform: translateX(-50%); }
  .hero-text .row { display: block; white-space: nowrap; }
}
@media (max-width: 680px) { .hero-text .row { display: contents; } }

/* Desktop nav: links get a soft gray tab with accent text on hover */
@media (min-width: 681px) {
  .site-head nav { gap: 6px; }
  .site-head .nav-link { padding: 7px 12px; border-radius: 8px; transition: background-color .2s, color .2s; }
  .site-head .wrap > .nav-link { margin-left: -12px; }
  .site-head .theme-toggle { margin-left: 14px; }
  .site-head .nav-link:hover { opacity: 1; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--accent); }
}

/* About intro: icon glyphs in the sentence, like the home hero */
.tone-smile { --tone: #FF7262; }
.ibox.tone-smile { transition: background-color .7s ease; }
.about-intro .ibox .ic svg { width: 66%; height: 66%; }
.ios-cam { display: inline-block; width: 1.08em; height: 1.08em; margin: 0 .2em 0 .06em; vertical-align: -0.2em;
  filter: drop-shadow(0 1px 1.5px rgba(6,27,49,.18)); transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.ios-cam svg { display: block; width: 100%; height: 100%; }
.ios-cam:hover { transform: rotate(-8deg) scale(1.06); }
.about-story { max-width: 720px; }
.about-story .prose a { color: var(--text); text-decoration: underline 1px var(--line); text-underline-offset: 4px; transition: text-decoration-color .2s, color .2s; }
.about-story .prose a:hover { color: var(--accent); text-decoration-color: currentColor; }
.about-intro h1 { text-wrap: balance; }
.about-intro .ibox, .about-intro .ios-cam { margin: 0 .05em; }
@media (max-width: 680px) { .about-photos { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0 6px; } .about-photos img { outline-offset: 4px; } }
.about-intro .nw { white-space: nowrap; }

/* Gallery intro icons (same boxes as home/about) */
.tone-logo { --tone: #F24E1E; }
.tone-side { --tone: #A259FF; }
.tone-club { --tone: #1ABCFE; }
.tone-lab { --tone: #0ACF83; }
.icon-intro h1 { text-wrap: balance; }
.icon-intro .nw { white-space: nowrap; }
.icon-intro .ibox { margin: 0 .22em 0 .04em; }
.icon-intro .ibox .ic svg { width: 64%; height: 64%; }

/* About photo box: background eases between each icon's color as it cycles */
.tone-photo { --tone: #1ABCFE; }
.ibox.tone-photo { transition: background-color .7s ease; }
.about-intro .ibox .ic svg, .icon-intro .ibox .ic svg { width: 64%; height: 64%; }

/* Covers: show the whole image (no cropping) */
.case-cover img { max-height: none; object-fit: contain; }

/* About story matches the case study text: same column width, size and rhythm */
.about-story { max-width: 760px; }
.about-story .sec h2 { font-size: 29px; line-height: 1.22; font-weight: 700; letter-spacing: -0.015em; }
.about-story .prose { max-width: none; }
.about-story .prose p { font-size: 18px; line-height: 1.65; }
@media (max-width: 680px) { .about-story .sec h2 { font-size: 23px; } .about-story .prose p { font-size: 17px; } }

/* Custom cursor: Figma's arrow, eased toward the pointer (mouse/trackpad only) */
.fcur { position: fixed; left: 0; top: 0; z-index: 9999; width: 22px; height: 22px; pointer-events: none;
  opacity: 0; transition: opacity .2s; will-change: transform; }
.fcur svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 3px 2px; transition: transform .2s cubic-bezier(.3,1.4,.5,1);
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.28)); }
.fcur.on { opacity: 1; }
.fcur.link svg { transform: scale(1.18); }
.fcur.down svg { transform: scale(.88); }


/* About photo captions */
.about-photos figure { margin: 0; }
.about-photos figcaption { margin-top: 16px; font-size: 13px; line-height: 1.4; color: var(--muted); padding: 0 2px; }
@media (max-width: 680px) { .about-photos figcaption { font-size: 12px; margin-top: 12px; } }

/* Zoomable images + lightbox (same behavior as jorellp.com) */
.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(24px, env(safe-area-inset-bottom, 0px));
  background: rgba(12,12,11,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .28s; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lb-inner { margin: 36px 0 96px; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
.lb-inner img { max-width: min(92vw, 1200px); max-height: calc(100dvh - 230px); width: auto; height: auto; border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35); transform: scale(.96); transition: transform .32s cubic-bezier(.2,.7,.2,1), opacity .16s; cursor: default; background: #2a2a28; }
.lightbox.open .lb-inner img { transform: scale(1); }
.lb-inner img.swap { opacity: 0; }
.lb-inner figcaption { color: rgba(255,255,255,.85); font-size: 14px; text-align: center; white-space: pre; }
.lb-inner figcaption:empty { display: none; }
.lb-close, .lb-nav { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12);
  color: #fff; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; font-family: var(--font); }
.lb-close { top: max(16px, env(safe-area-inset-top, 0px)); right: 16px; width: 40px; height: 40px; font-size: 22px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; padding-bottom: 4px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-nav[hidden], .lb-thumbs[hidden] { display: none; }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-nav:focus-visible, .lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lb-thumbs { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: flex; gap: 8px; padding: 6px; border-radius: 8px; background: rgba(0,0,0,.25); max-width: calc(100vw - 32px); overflow-x: auto; cursor: default; }
.lb-thumbs button { flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden;
  background: none; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.lb-thumbs button:hover { opacity: .9; }
.lb-thumbs button[aria-current="true"] { opacity: 1; border-color: #fff; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .lb-nav { width: 40px; height: 40px; font-size: 26px; top: auto; bottom: 84px; transform: none; }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
  .lb-inner { margin: 40px 0 150px; }
  .lb-inner img { max-height: calc(100dvh - 300px); }
}
@media (prefers-reduced-motion: reduce) { .lightbox, .lb-inner img { transition: none; } }

/* About captions: snug under the photo's stroke on tablet/desktop; hidden on phones (still shown when zoomed) */
.about-photos figcaption { margin-top: 15px; padding: 0 1px; }
@media (max-width: 680px) { .about-photos figcaption { display: none; } }
.lb-inner figcaption { white-space: pre-line; max-width: min(92vw, 640px); line-height: 1.45; padding: 0 8px; }

/* About: a stepping carousel. One photo and a half show; every few seconds the strip moves one photo left. */
.about-reel { display: block; margin-top: 64px; padding: 8px 0 4px 8px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
          mask-image: linear-gradient(90deg, #000 78%, transparent); }
.reel-track { display: flex; transition: transform .8s cubic-bezier(.65,0,.25,1); will-change: transform; }
.reel-track.jump { transition: none; }
.reel-track figure { flex: 0 0 calc(100% / 1.5); margin: 0; padding-right: 28px; }
.reel-track img, .reel-track .ph-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 680px) {
  .about-reel { margin-top: 40px; }
  .reel-track figure { padding-right: 16px; }
  .reel-track img, .reel-track .ph-img { aspect-ratio: 3 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  .reel-track { transition: none; }
  .about-reel { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* About experience: real company logos */
.xp .co .h { align-items: flex-start; padding-top: 2px; }
.xp .co .h svg { display: block; width: auto; max-width: 180px; }
.xp .co .h .amex { height: 15px; fill: var(--amex); vertical-align: 0; margin: 3px 0 0; }
.xp .co .h .logo-rfy { height: 22px; }
.xp .co .h .logo-rfy .book { fill: #24affe; }
.xp .co .h .logo-pwc { height: 30px; margin-top: -6px; }
.xp .co .h .logo-pwc .bars { fill: #fd5108; }
.xp .co .h .logo .word { fill: var(--logo-word); }
.xp .co .h .logo-ccs { height: 22px; }
/* CougarCS: black cougar outline and dark gray wordmark in light mode; light outline and white text in dark mode */
.logo-ccs .ccs-ol { fill: #0b0b0b; }
.logo-ccs .ccs-in { fill: #fff; }
:root[data-mode="dark"] .logo-ccs .ccs-ol { fill: #f2f2f2; }

/* Reel spacing: room for each photo's offset stroke (top, bottom, and between photos) */
.about-reel { padding: 8px 0 12px 8px; }
.reel-track figure { padding-right: 44px; }
@media (max-width: 680px) { .reel-track figure { padding-right: 30px; } .about-reel { padding-bottom: 10px; } }
/* CougarCS on About: black cougar outline and black wordmark in light mode */
.xp .co .h .logo-ccs .word { fill: #0b0b0b; }
:root[data-mode="dark"] .xp .co .h .logo-ccs .word { fill: #fff; }

/* Home cards on phones: roomier stack, like jemma.lol */
@media (max-width: 680px) { .cards { gap: 112px; } .card .meta { padding-top: 28px; } }

/* About experience: a bit more room between the logo and the roles */
.xp .co { padding: 30px 0; column-gap: 32px; }
@media (max-width: 680px) { .xp .co { gap: 18px; padding: 28px 0; } }


/* Mobile pill nav: the current page (and a tapped link) sits in a soft rounded box */
@media (max-width: 680px) {
  .site-head .wrap { padding: 0 10px; gap: 4px; }
  .site-head nav { gap: 4px; }
  .site-head .nav-link { padding: 9px 15px; border-radius: 999px; transition: background-color .2s, color .2s; }
  .site-head .nav-link[aria-current="page"], .site-head .nav-link:active {
    background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--accent); opacity: 1; }
  .site-head .theme-toggle { width: 44px; height: 40px; }
  .site-head .theme-toggle svg { width: 30px; height: 21px; }
}

/* Footer links with small outline icons */
.site-foot .fi { display: flex; align-items: center; gap: 8px; }
.site-foot .fi svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Site loader (first visit per session), like jorellp.com */
#loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .35s, visibility .35s; }
#loader.done { opacity: 0; visibility: hidden; }
.ld-box { display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .55s; }
#loader.done .ld-box { transform: translateY(-6px); }
.ld-dial { position: relative; width: 120px; height: 72px; }
.ld-gauge { width: 120px; height: 72px; overflow: visible; }
.ld-gauge * { fill: none; stroke-linecap: round; }
.ld-track { stroke: var(--line); stroke-width: 4; }
.ld-arc { stroke: var(--muted); stroke-width: 4; stroke-dasharray: 100; stroke-dashoffset: var(--off, 100); transition: stroke-dashoffset .25s; }
.ld-pct { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--mono); font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ld-txt { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--muted); opacity: .8; }

/* Home hero: a few pixel-art stickers float at the page sides (desktop only), like family.co's characters */
.hero { position: relative; }
.px-deco { display: none; }
@media (min-width: 1300px) and (hover: hover) {
  .px-deco { display: block; position: absolute; inset: 0; pointer-events: none; }
  .px-stk { position: absolute; display: block; transform: rotate(var(--r)); animation: px-bob 5.5s ease-in-out infinite; }
  .px-stk svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
}
@keyframes px-bob { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(calc(var(--r) * .6)) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .px-stk { animation: none; } }

/* Pixel stickers: inner wrapper takes the playful hover effects (outer keeps its tilt and bob) */
.px-stk { pointer-events: auto; }
.px-in { display: block; transform-origin: 50% 50%; }
.px-stk svg { display: block; width: 100%; height: auto; }

/* About photos: a little sticker stuck on each photo's top-right corner, clear of the subject */
.about-reel { padding-top: 32px; }
.reel-track figure { position: relative; }
.px-photo { position: absolute; z-index: 2; top: -22px; right: 18px; width: 66px; transform: rotate(var(--r)); cursor: default; }
@media (max-width: 680px) { .about-reel { padding-top: 24px; } .px-photo { width: 46px; top: -16px; right: 12px; } }
