/* Site styles — based on the Prisma Framer template (prismaportfolio.framer.website) */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/InstrumentSerif-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: block;
  src: url("fonts/Geist-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "Gambarino"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/Gambarino-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: block;
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
}
/* ---------- Tokens (light) ---------- */
:root {
  --bg: #ffffff;
  --surface: #f8f8f8;
  --border: #eeeeee;
  --stroke: rgba(0, 0, 0, 0.1);
  --text: #212121;
  --muted: #6e6e6e;
  --card: rgba(248, 248, 248, 0.84);
  --shadow: 0 0 4px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --on-pill: #212121;

  --purple: #c8adfa;
  --orange: #fac99c;
  --green: #b0e3b6;
  --pink: #f8a9a8;
  --blue: #9fd8ff;
  --yellow: #f7e5b7;
  --teal: #a8e6df;


  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}


/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, figure { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* dotted pixel texture behind everything */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("images/dots.png") left top / 200px auto repeat, var(--bg);
}

/* ---------- Home: intro card ---------- */
.home {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; padding: 24px 16px 140px;
}
.intro-wrap { position: relative; }
.intro {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 20px; border-radius: 24px;
  background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: clamp(22px, 3.2vw, 32px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  text-align: center;
}
.intro-line { display: flex; align-items: center; justify-content: center; gap: 0.3em; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 0.25em;
  padding: 0.12em 0.3em; border-radius: 0.3em; color: var(--on-pill);
  transition: transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.tag:hover { transform: scale(1.04) rotate(-1deg); }
.tag-purple { background: var(--purple); }
.tag-orange { background: var(--orange); }
.tag-green  { background: var(--green); }
.tag img { width: 1.05em; height: 1.05em; border-radius: 50%; object-fit: cover; }
.tag svg { width: 0.85em; height: 0.85em; stroke-width: 2.2; }

/* images that fan out from behind the card on hover */
.fan { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fan > * {
  position: absolute; left: 50%; top: 50%; width: 140px; aspect-ratio: 4 / 3;
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--stroke);
  background: var(--surface);
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  transition: transform .6s cubic-bezier(.2, 1.2, .4, 1), opacity .35s ease;
}
.fan img { width: 100%; height: 100%; object-fit: cover; }
.fan .shot { background: #edeff3; }
.fan .shot img { object-fit: contain; transform: scale(1.35); }
.fan .ph-purple { background: var(--purple); }
.fan .ph-orange { background: var(--orange); }
.fan .ph-green  { background: var(--green); }
.intro-wrap:hover .fan > *, .intro-wrap:focus-within .fan > * { opacity: 1; }
.intro-wrap:hover .fan > :nth-child(1), .intro-wrap:focus-within .fan > :nth-child(1) { transform: translate(-170%, -125%) rotate(-12deg); }
.intro-wrap:hover .fan > :nth-child(2), .intro-wrap:focus-within .fan > :nth-child(2) { transform: translate(-50%, -150%) rotate(3deg); }
.intro-wrap:hover .fan > :nth-child(3), .intro-wrap:focus-within .fan > :nth-child(3) { transform: translate(70%, -125%) rotate(12deg); }
.intro-wrap:hover .fan > :nth-child(4), .intro-wrap:focus-within .fan > :nth-child(4) { transform: translate(-160%, 30%) rotate(8deg); }
.intro-wrap:hover .fan > :nth-child(5), .intro-wrap:focus-within .fan > :nth-child(5) { transform: translate(60%, 30%) rotate(-8deg); }

/* ---------- Dock ---------- */
.dock-wrap {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dock {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px;
  border-radius: 20px; background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.dock-divider { width: 1px; height: 28px; align-self: center; background: var(--stroke); margin-inline: 4px; }
.dock-item {
  position: relative; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--stroke); color: var(--text);
  font: inherit; padding: 0;
}
/* hover: fill with the icon's own color, no movement */
.dock-item:hover, .dock-item:focus-visible { background: var(--accent); color: var(--on-pill); border-color: transparent; }
.dock-item[aria-current="page"] { background: var(--accent, var(--orange)); color: var(--on-pill); border-color: transparent; }
/* label that pops up above the icon */
.dock-item .tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 13px; font-weight: 600; color: var(--text);
  opacity: 0;
}
.dock-item:hover .tip, .dock-item:focus-visible .tip, .dock-item.is-copied .tip { opacity: 1; }

/* ---------- Inner pages (Projects, About) ---------- */
.page { max-width: 840px; margin-inline: auto; padding: clamp(48px, 10vh, 96px) 16px 160px; }
.page-head { margin-bottom: 28px; }
.page-title { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.page-sub { color: var(--muted); margin-top: 8px; }

/* small outlined tags (case study header, profile card) */
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tags span {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--stroke); color: var(--muted);
}

/* ---------- Frame card: mono label above a white box; on hover the whole box gets a purple
   selection border with corner handles (pattern from handoff-portfolio.framer.website) ---------- */
.fc { --sel: #5b45ec; --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; display: flex; flex-direction: column; color: var(--text); }
/* non-clickable frames highlight in blue; clickable ones keep purple */
.fc-static { --sel: #2f80ed; }
.fc-label { margin: 0 0 6px; font: 400 14px/1.4 var(--mono); color: var(--muted); transition: color .15s ease; }
.fc-box {
  position: relative; background: #fff; border: 1px solid var(--border); padding: 18px;
  transition: border-color .15s ease;
}
.fc-box::before, .fc-box::after, .fc-h::before, .fc-h::after {
  content: ""; position: absolute; z-index: 3; width: 6px; height: 6px;
  background: #fff; border: 1px solid var(--sel); opacity: 0; transition: opacity .15s ease;
}
.fc-box::before { left: -4px; top: -4px; }
.fc-box::after { right: -4px; top: -4px; }
.fc-h { position: absolute; inset: 0; pointer-events: none; }
.fc-h::before { left: -4px; bottom: -4px; }
.fc-h::after { right: -4px; bottom: -4px; }
.fc:is(:hover, :focus-visible, :focus-within) .fc-label { color: var(--sel); }
.fc:is(:hover, :focus-visible, :focus-within) .fc-box { border-color: var(--sel); }
.fc:hover .fc-box::before, .fc:hover .fc-box::after, .fc:hover .fc-h::before, .fc:hover .fc-h::after,
.fc:focus-visible .fc-box::before, .fc:focus-visible .fc-box::after, .fc:focus-visible .fc-h::before, .fc:focus-visible .fc-h::after,
.fc:focus-within .fc-box::before, .fc:focus-within .fc-box::after, .fc:focus-within .fc-h::before, .fc:focus-within .fc-h::after { opacity: 1; }
.fc:focus-visible { outline: none; }

/* ---------- Project cards (pattern from handoff-portfolio.framer.website, in purple) ---------- */
.case-grid { --sel: #5b45ec; --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  display: grid; align-items: stretch; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.case-card .fc-box { padding: 0; height: 100%; }
.case-media { position: relative; aspect-ratio: 1.6 / 1; border-bottom: 1px solid var(--border); }
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-media.shot { background: #edeff3; }
.case-clip { position: absolute; inset: 0; overflow: hidden; } /* clips the zoomed image, not the hover tag */
.case-media.shot img { object-fit: contain; transform: scale(1.35) translateX(var(--nudge-x, 0)); }
.case-media.ph-purple { background: linear-gradient(180deg, var(--purple), color-mix(in srgb, var(--purple) 50%, #fff)); }
.case-media.ph-orange { background: linear-gradient(180deg, var(--orange), color-mix(in srgb, var(--orange) 50%, #fff)); }
.case-media.ph-green  { background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 50%, #fff)); }
.case-platform {
  position: absolute; z-index: 2; left: 50%; top: 100%; transform: translate(-50%, -50%);
  padding: 1px 6px; border-radius: 3px; background: var(--sel); color: #fff;
  font: 500 11px/1.5 var(--mono); white-space: nowrap; opacity: 0; transition: opacity .15s ease;
}
.case-card:is(:hover, :focus-visible) .case-platform { opacity: 1; }
.case-body { padding: 22px 18px 20px; }

.case-meta { font: 400 14px/1.4 var(--mono); color: var(--muted); }
.case-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.case-desc { color: var(--muted); margin-top: 6px; font-size: 15px; line-height: 1.5; }
/* measurement line: end ticks, metric pill in the middle, caption under */
.case-metric { position: relative; margin-top: 22px; padding-top: 22px; text-align: center; }
.case-metric::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 9px;
  border-inline: 1px solid var(--sel);
  background: linear-gradient(var(--sel), var(--sel)) center / 100% 1px no-repeat;
}
.case-pill {
  position: absolute; left: 50%; top: 2px; transform: translateX(-50%);
  padding: 2px 9px; border-radius: 999px; background: var(--sel); color: #fff;
  font: 500 14px/1.4 var(--mono); white-space: nowrap;
}
.case-cap { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* full-height white column (same as the case study pages), dots on either side */
.page-col {
  max-width: 1048px; min-height: 100vh; min-height: 100svh; margin-inline: auto;
  background: #fff; border-inline: 1px solid var(--border);
}

/* ---------- About (layout + breakpoints from prismaportfolio.framer.website/about-me) ---------- */
.about {
  /* sits inside .page, which sets the width, title spacing, and bottom room for the dock */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start;
}
.about-left { position: sticky; top: 24px; }
.about-right { display: flex; flex-direction: column; gap: 24px; }
.a-body p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.a-body p + p { margin-top: 12px; }
.a-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.a-body .tool-marquee { margin: 4px -18px 4px; }

.profile-photo { border-radius: 16px; overflow: hidden; aspect-ratio: 1.05 / 1; margin-bottom: 16px; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.profile-card .tags { margin-top: 14px; }
.profile-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.profile-role { color: var(--text) !important; font-weight: 500; font-size: 14px !important; margin: 4px 0 12px !important; }
.profile-actions { display: flex; gap: 8px; margin-top: 18px; }
.profile-actions .pbtn { width: auto; white-space: nowrap; }
.profile-actions .copy-btn { flex: 1 1 auto; min-width: 0; }
.profile-actions .pbtn-light { flex: none; }
.pbtn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 12px;
  border-radius: 10px; font: 600 14px/1.2 var(--sans); cursor: pointer; transition: background-color .2s ease, border-color .2s ease;
}
.pbtn svg { width: 16px; height: 16px; flex: none; }
.pbtn-dark { background: var(--text); color: #fff; border: 1px solid var(--text); }
.pbtn-dark:hover { background: #000; }
.pbtn-light { background: #fff; color: var(--text); border: 1px solid var(--stroke); }
.pbtn-light:hover { background: var(--surface); }
.tags span { display: inline-flex; align-items: center; gap: 5px; }
.tags svg { width: 12px; height: 12px; }

.job + .job { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke); }
.job-co {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--stroke); background: var(--border); font-size: 13px; font-weight: 600;
}
.job-co svg { width: 13px; height: 13px; }
.job h3 { font-size: 15px; font-weight: 600; margin: 10px 0 4px; }

.skills { position: relative; height: 200px; margin-top: 8px; }
.skill {
  position: absolute; padding: 4px 9px; border-radius: 6px; white-space: nowrap;
  background: var(--c); color: var(--on-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  animation: drift 6s ease-in-out infinite; animation-delay: calc(var(--d) * -1);
}
/* little cursor arrow on each tag, like the template */
.skill::before {
  content: ""; position: absolute; left: -9px; top: -9px; width: 12px; height: 12px; background: var(--c);
  clip-path: polygon(0 0, 100% 45%, 50% 55%, 40% 100%);
}
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -6px); } }

.tool-marquee { overflow: hidden; margin: 24px -16px 12px; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.tool-track { display: flex; gap: 10px; width: max-content; animation: tools 24s linear infinite; }
.tool-track span {
  padding: 10px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--stroke);
  font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow);
}
@keyframes tools { to { transform: translateX(calc(-50% - 5px)); } }

.say-hi { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.hi-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 9px;
  border-radius: 8px; border: 1px solid var(--stroke); background: var(--border); color: var(--text);
  font: 600 14px/1.2 var(--sans); cursor: pointer; transition: background-color .2s ease;
}
.hi-btn:hover { background: var(--stroke); }
.hi-btn svg { width: 15px; height: 15px; }
.copy-labels { display: grid; }
.copy-labels > span { grid-area: 1 / 1; transition: opacity .2s ease; }
.copy-hover-text, .copy-done-text { opacity: 0; }
.copy-btn:is(:hover, :focus-visible):not(.is-copied) .copy-email-text { opacity: 0; }
.copy-btn:is(:hover, :focus-visible):not(.is-copied) .copy-hover-text { opacity: 1; }
.copy-btn.is-copied .copy-email-text { opacity: 0; }
.copy-btn.is-copied .copy-done-text { opacity: 1; }

/* phone ≤809px: single column, profile card on top */
@media (max-width: 809px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-left { position: static; }
  /* tags wrap in loose rows instead of fixed positions */
  .skills { height: auto; display: flex; flex-wrap: wrap; gap: 22px 18px; padding: 16px 4px 8px 12px; }
  .skill { position: relative; left: auto !important; top: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  .skill, .tool-track { animation: none; }
}

/* ---------- Case study (layout + breakpoints from prismaportfolio.framer.website/projects/nexus) ---------- */
/* desktop ≥1200px: 1000px media, 600px text column */
/* page content sits in a white column that runs the full height of the page, dots on either side */
.cs {
  max-width: 1048px; min-height: 100vh; min-height: 100svh; margin-inline: auto; padding: 24px 24px 64px; /* no dock on case studies, so less bottom room */
  background: #fff; border-inline: 1px solid var(--border);
}
/* close + next project, pinned to the top while scrolling */
.cs-bar {
  position: sticky; top: max(16px, env(safe-area-inset-top)); z-index: 40;
  display: flex; justify-content: center; gap: 8px; margin-bottom: 24px;
}
.cs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--text); font-size: 14px; font-weight: 600; transition: background-color .2s ease;
}
.cs-btn:hover { background: var(--border); }
.cs-close { width: 40px; }
.cs-next { padding-inline: 14px 12px; }
.cs-next svg { width: 16px; height: 16px; }
.cs-media { border-radius: 24px; overflow: hidden; border: 1px solid var(--stroke); }
.cs-media img { width: 100%; height: 100%; object-fit: cover; }
.cs-hero { aspect-ratio: 1.5 / 1; }
.cs-media.shot { background: #edeff3; }
.cs-media.shot img { object-fit: contain; transform: scale(1.2) translateX(var(--nudge-x, 0)); }
.cs-media.ph-purple { background: linear-gradient(180deg, var(--purple), color-mix(in srgb, var(--purple) 55%, var(--bg))); }
.cs-media.ph-orange { background: linear-gradient(180deg, var(--orange), color-mix(in srgb, var(--orange) 55%, var(--bg))); }
.cs-media.ph-green  { background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 55%, var(--bg))); }

.cs-text { max-width: 600px; margin: 40px auto 48px; }
.cs-title { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.cs-meta { color: var(--muted); font-size: 15px; margin-top: 6px; }
/* project facts table (pattern from lewius.framer.website) */
.cs-facts { margin: 20px 0 0; max-width: 360px; }
.cs-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--stroke); }
.cs-facts div:last-child { border-bottom: 0; }
.cs-facts dt { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cs-facts dd { margin: 0; font-size: 15px; font-weight: 500; color: var(--text); }
.cs-head .tags { margin-top: 16px; }
.cs-section { margin-top: 36px; }
.cs-section h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.cs-section h2 + p { margin-top: 8px; }
.cs-section p + h2 { margin-top: 28px; }
.cs-section h3 { font-size: 17px; font-weight: 600; line-height: 1.4; margin-top: 18px; }
.cs-section p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 8px; }

/* key findings: sits between the timeline and the annotated screenshot */
.cs-findings { margin-top: 56px; margin-bottom: 28px; }
.cs-kicker { font: 400 14px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.cs-findings h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-top: 8px; }
.cs-findings > p:not(.cs-kicker) { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 8px; }
.findings { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
/* grouped stack: only the outer corners are rounded */
.findings li { border-radius: 0; }
.findings li:first-child { border-top-left-radius: 16px; border-top-right-radius: 16px; }
.findings li:last-child { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
.findings li {
  display: flex; align-items: center; padding: 18px 20px;
  background: #FAE6EF;
  font-size: 14px; font-weight: 600; line-height: 1.35; color: #A80542;
}
.cs-figure { margin: 0 0 16px; }
.cs-figure-narrow { max-width: 820px; margin: 40px auto 0; }
.cs-figure-narrow:has(+ .cs-gallery) { margin-bottom: 72px; }
.model-pair + .cs-text { margin-top: 64px; }
.cs-figure-gray .fc-box { background: #fff; }
.cs-figure-engage .fc-box { background: #fff; }
.cs-bridge + .cs-figure-narrow { margin-top: 0; } /* matches the screenshots' own backdrop */
.cs-figure-narrow + .cs-figure-narrow { margin-top: 24px; }
/* positive outcomes: same stacked pattern, in green */
.findings-good li { background: #DCFACF; color: #00803C; }
.cs-text:has(> .findings-good) { margin: 28px auto 80px; }
.cs-findings > p + p { margin-top: 12px; }
.cs-figure .fc-box { padding: 0; }
.cs-figure img { width: 100%; height: auto; }
/* text + tall image side by side (Interviews) */
.cs-split {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: center;
  max-width: 820px; margin: 72px auto 0;
}
.cs-split h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-top: 8px; }
.cs-split-text > p:not(.cs-kicker) { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 8px; }
.cs-split-media { margin: 0; }
.cs-split-media .fc-box { padding: 0; }
.cs-split-media img { width: 100%; height: auto; }

/* transition into the next section */
.cs-bridge {
  max-width: 600px; margin: 64px auto 72px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cs-bridge-kicker { font: 400 14px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; /* + 10px flex gap = 16px */ }
.cs-bridge-q { font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; color: var(--text); text-wrap: balance; }
.cs-bridge-body { max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 4px; }
.cs-bridge-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; margin-top: 10px; border-radius: 50%;
  background: color-mix(in srgb, var(--purple) 35%, #fff); color: #5b45ec;
}
.cs-bridge-arrow svg { width: 18px; height: 18px; stroke-width: 2; }
@media (max-width: 809px) {
  .cs-split { grid-template-columns: 1fr; gap: 28px; }
  .cs-split-media { max-width: 260px; }
}

/* built-vs-used diagrams (Synthesis): two frames side by side, steps flow left to right */
.model-pair { max-width: 1000px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.model-pair .cs-figure { margin: 0; display: flex; flex-direction: column; }
.model-pair .fc-box { flex: 1; }
.cs-figure .model { padding: 40px 20px; display: flex; flex-direction: column; justify-content: center; }
.model-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; position: relative; }
.model-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--stroke); }
.model-steps li {
  position: relative; flex: 1 1 0; min-width: 0; display: grid; place-items: center; text-align: center;
  padding: 8px 4px; border-radius: 6px; background: #ececec; font-size: 12px; font-weight: 500; line-height: 1.2;
}
.model-steps li.is-hl { background: #FAE6EF; color: #A80542; }
.model-note { text-align: center; font-size: 13px; font-weight: 600; margin: 0; }
/* same 6-column grid as the steps, so the note centers under Proof (4th step) */
.model-under { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.model-under .model-note { grid-column: 4; justify-self: center; white-space: nowrap; }
.model-steps-linked li::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: var(--stroke); }
.model-band {
  margin-top: 12px; padding: 9px; border-radius: 6px; text-align: center;
  background: #DCFACF; color: #00803C; font-size: 13px; font-weight: 600;
}
@media (max-width: 809px) { .model-pair { grid-template-columns: 1fr; } }

/* foundational patterns: three looping demos */
.pattern-grid { max-width: 1000px; margin: 8px auto 72px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pattern { margin: 0; display: flex; flex-direction: column; }
.pattern .fc-box { padding: 0; flex: 1; }
.pattern-media { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; border-bottom: 1px solid var(--border); }
.pattern-body { padding: 16px 18px 18px; }
.pattern-body h3 { font-size: 16px; font-weight: 600; margin: 0; }
.pattern-body p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 4px; }
@media (max-width: 809px) { .pattern-grid { grid-template-columns: 1fr; } }

/* outcomes: three result cards + a closing note */
.outcome-grid { max-width: 820px; margin: 28px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.outcome { margin: 0; display: flex; flex-direction: column; }
.outcome .fc-box { flex: 1; padding: 22px 20px; }
.outcome h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0; color: #5b45ec; }
.outcome p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 8px; }
.cs-note { margin-top: 40px; margin-bottom: 24px; padding: 18px 20px; border-left: 2px solid var(--stroke); }
.cs-note p:not(.cs-kicker) { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 6px; }
@media (max-width: 809px) { .outcome-grid { grid-template-columns: 1fr; } }

.cs-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cs-gallery .cs-media { aspect-ratio: 1.7 / 1; }
.cs-gallery .cs-wide { grid-column: 1 / -1; aspect-ratio: 1.5 / 1; }

/* tablet 810–1199px: media spans the screen, text inset */
@media (max-width: 1199px) {
  .cs { max-width: none; }
  .cs-text { max-width: none; margin-inline: clamp(24px, 10vw, 100px); }
}
/* phone ≤809px: everything full width, gallery stacks */
@media (max-width: 809px) {
  .cs { padding-inline: 16px; }
  .cs-text { margin-inline: 0; margin-top: 28px; }
  .cs-title { font-size: 24px; }
  .cs-media { border-radius: 16px; }
  .cs-gallery { grid-template-columns: 1fr; gap: 12px; }
  .cs-gallery .cs-media, .cs-gallery .cs-wide { aspect-ratio: 1.3 / 1; }
}

/* ---------- Scroll-driven timeline (from kaycie.design/ia), themed for light/dark ---------- */
.signal-timeline {
  --st-line: var(--stroke);
  --st-energy: var(--purple);
  --st-lw: 2px;
  --st-glow: 0.7;
  --st-node: 16px;
  --st-bg: var(--bg);
  margin-top: 24px;
}
.st-track { position: relative; padding-block: 8px; }
.st-line { position: absolute; left: calc(var(--st-node) / 2 - var(--st-lw) / 2); width: var(--st-lw); background: var(--st-line); border-radius: 999px; pointer-events: none; }
.st-energy {
  position: absolute; inset: 0; background: var(--st-energy); border-radius: inherit;
  transform-origin: 50% 0; transform: scaleY(0);
  box-shadow: 0 0 calc(18px * var(--st-glow)) color-mix(in srgb, var(--st-energy) calc(70% * var(--st-glow)), transparent);
}
.st-head { position: absolute; left: calc(var(--st-node) / 2); top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; will-change: transform; }
.st-head.is-visible { opacity: 1; }
.st-head::before {
  content: ""; position: absolute; width: calc(var(--st-node) * 5); height: calc(var(--st-node) * 5); margin: calc(var(--st-node) * -2.5);
  border-radius: 50%; opacity: var(--st-glow);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--st-energy) 60%, transparent), transparent);
}
.st-head::after {
  content: ""; position: absolute; width: calc(var(--st-lw) * 3 + 2px); height: calc(var(--st-lw) * 3 + 2px); margin: calc((var(--st-lw) * 3 + 2px) / -2);
  border-radius: 50%; background: #fff; box-shadow: 0 0 12px var(--st-energy);
}
.st-items { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: clamp(40px, 8vh, 72px); }
.st-item { position: relative; padding-left: calc(var(--st-node) + 24px); }
.st-node {
  position: absolute; z-index: 1; left: 0; top: 4px; width: var(--st-node); height: var(--st-node); border-radius: 50%;
  background: var(--st-bg); border: max(1.5px, calc(var(--st-lw) * .9)) solid var(--st-line);
  transition: border-color .5s ease, background-color .5s ease, box-shadow .6s ease;
}
.st-pulse { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--st-energy); opacity: 0; }
.st-item.is-reached .st-node {
  border-color: color-mix(in srgb, var(--st-energy) 55%, var(--st-line));
  background: color-mix(in srgb, var(--st-energy) 25%, var(--st-bg));
  box-shadow: 0 0 calc(10px * var(--st-glow)) color-mix(in srgb, var(--st-energy) calc(30% * var(--st-glow)), transparent);
}
.st-item.is-current .st-node {
  border-color: var(--st-energy); background: var(--st-energy);
  box-shadow: 0 0 calc(28px * var(--st-glow)) color-mix(in srgb, var(--st-energy) calc(90% * var(--st-glow)), transparent);
}
.st-item.is-reached .st-pulse { animation: st-pulse 1.1s cubic-bezier(.2, .7, .3, 1) 1; }
@keyframes st-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.6); } }
.st-content {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  opacity: .28; transform: translateY(18px);
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.st-item.is-reached .st-content { opacity: .62; transform: none; }
.st-item.is-current .st-content { opacity: 1; }
.st-year { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--st-energy); }
.st-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.cs-section .st-text { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .st-content { opacity: 1; transform: none; }
  .st-pulse { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .case-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .dock { gap: 6px; padding: 6px; }
  .dock-item { width: 40px; height: 40px; }
  .dock .hide-sm { display: none; }
  .fan > * { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Stat figure: image panel + stat row ---------- */
.stat-figure .fc-box { padding: 0; }
.stat-media { background: #fff; padding: 40px 48px; border-bottom: 1px solid var(--border); }
.stat-media img { display: block; width: 100%; max-width: 620px; height: auto; margin: 0 auto; border-radius: 12px; }
.stat-row { list-style: none; margin: 0; padding: 28px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-row li { padding: 4px 24px; text-align: center; }
.stat-row li + li { border-left: 1px solid var(--border); }
.stat-num { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
.stat-label { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 809px) {
  .stat-media { padding: 24px; }
  .stat-row { grid-template-columns: 1fr; padding: 8px 0; }
  .stat-row li { padding: 20px 24px; }
  .stat-row li + li { border-left: 0; border-top: 1px solid var(--border); }
}

/* Single outcome card, aligned to the text column */
.outcome-grid-single { max-width: 600px; grid-template-columns: 1fr; margin-bottom: 80px; }
.outcome-grid-single .outcome h3 { font-size: 40px; }

/* Figure matched to the 600px text column */
.cs-figure-narrow.cs-figure-text { max-width: 600px; }

/* ---------- Site footer (all pages) ---------- */
.site-footer { width: 100%; padding: 36px 24px 20px; background: #0d0d0d; color: #fff; }
/* pages with the floating dock need room so it doesn't cover the footer */
body:has(.dock-wrap) .site-footer { padding-bottom: 96px; }
.sf-inner {
  max-width: 1000px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
}
.sf-title { margin: 0; max-width: none; font-family: "Instrument Serif", "Iowan Old Style", Georgia, serif; font-style: italic; font-size: clamp(28px, 3.6vw, 36px); font-weight: 400; letter-spacing: 0; line-height: 1.2; color: #fff; }
.sf-actions { display: flex; gap: 8px; justify-self: end; }
.sf-actions .pbtn { width: auto; white-space: nowrap; }
.sf-actions .pbtn-dark { background: #fff; color: #0d0d0d; border-color: #fff; }
.sf-actions .pbtn-dark:hover { background: #e9e9e9; border-color: #e9e9e9; }
.sf-actions .pbtn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.sf-actions .pbtn-light:hover { background: rgba(255, 255, 255, 0.1); }
.sf-bottom {
  max-width: 1000px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, 0.6);
}
.sf-links { display: flex; gap: 20px; }
.sf-links a { color: rgba(255, 255, 255, 0.6); text-decoration: none; }
.sf-links a:hover { color: #fff; }
/* footer now provides the bottom spacing */
.page { padding-bottom: 72px; }
.cs { padding-bottom: 48px; }
@media (max-width: 700px) {
  .site-footer { padding-top: 32px; }
  .sf-inner { grid-template-columns: 1fr; }
  .sf-actions { justify-self: start; flex-wrap: wrap; }
}

/* ---------- Tech stack logos (About) ---------- */
.tool-logos { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.tool-logo {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--stroke); box-shadow: var(--shadow);
}
.tool-logo svg { width: 28px; height: 28px; stroke: none; fill: currentColor; }

/* ---------- Growth comparison table (Personalize outcomes) ---------- */
.cs-findings > p + h2 { margin-top: 32px; }
.growth-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.growth-table th, .growth-table td { padding: 16px 20px; text-align: right; border-bottom: 1px solid var(--border); }
.growth-table tr:last-child > * { border-bottom: 0; }
.growth-table thead th { padding-block: 12px; font: 400 14px/1.4 var(--mono); color: var(--muted); }
.growth-table tbody th { text-align: left; font-size: 15px; font-weight: 500; color: var(--muted); }
.growth-table td { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); width: 28%; }
/* the 2-year column is the payoff, so it carries the emphasis */
.growth-table td:last-child { color: var(--text); font-size: 24px; }
.growth-table thead th:last-child { color: var(--text); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* column labels sit above the box, aligned to the value columns */
.growth-head { display: grid; grid-template-columns: 1fr 28% 28%; margin: 0 0 6px; padding-inline: 21px; }
.growth-head span { grid-column: auto; text-align: right; font: 400 14px/1.4 var(--mono); color: var(--muted); }
.growth-head span:first-child { grid-column: 2; }
.growth-head span:last-child { color: var(--text); }

/* 16px between every eyebrow and the heading that follows it */
.cs .cs-kicker + h2, .cs .cs-kicker + h3 { margin-top: 16px; }

/* ---------- Shared flow diagram (Personalize IA) ---------- */
/* one left-to-right line: start (type + template) -> the same 3 steps */
.cs-figure .flow { padding: 28px 24px; }
.flow-line { display: flex; align-items: stretch; gap: 10px; }
.flow-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flow-group { flex: none; }
.flow-group-steps { flex: 1; }
/* start boxes size to their text so labels stay on one line; the 3 steps share the rest */
.flow-box-start { flex: 0 0 auto; white-space: nowrap; padding-inline: 16px; }
.flow-glabel { margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--stroke); font: 400 11px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.flow-group-steps .flow-glabel { color: #5b45ec; border-color: color-mix(in srgb, #5b45ec 35%, #fff); }
.flow-items { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 8px; flex: 1; }
.flow-items > li { display: contents; }
.flow-box {
  flex: 1 1 0; min-width: 0; min-height: 76px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  padding: 12px 10px; border-radius: 10px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.25;
}
.flow-box small { font-size: 12px; font-weight: 500; color: var(--muted); }
.flow-box-start { background: #fff; border: 1px solid var(--stroke); color: var(--text); }
.flow-box-step { background: color-mix(in srgb, var(--purple) 35%, #fff); color: #3d2bb0; }
.flow-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #5b45ec; color: #fff; font: 600 12px/1 var(--sans); }
.flow-arrow { display: grid; place-items: center; flex: none; align-self: center; color: var(--muted); }
.flow-arrow svg { width: 16px; height: 16px; stroke-width: 2; }
.flow-line > .flow-arrow { align-self: center; }
@media (max-width: 809px) {
  .flow-line { flex-direction: column; align-items: stretch; }
  .flow-group, .flow-group-steps { flex: none; }
  .flow-items { flex-direction: column; }
  .flow-box { flex: none; flex-direction: row; justify-content: flex-start; min-height: 0; text-align: left; }
  .flow-box-start { flex-direction: column; align-items: flex-start; }
  .flow-arrow, .flow-line > .flow-arrow { height: auto; padding: 0; align-self: center; transform: rotate(90deg); }
}


/* ---------- Story map (Personalize scoping) ---------- */
.cs-figure .smap-box { padding: 24px; }
.smap-scroll { overflow-x: auto; }
.smap { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 8px 0; table-layout: fixed; }
.smap th, .smap td { vertical-align: top; text-align: left; padding: 0; }
.smap thead th:first-child, .smap tbody th { width: 104px; }
/* user goals: the backbone across the top */
.smap thead th:not(:first-child) {
  padding: 10px; border-radius: 8px; background: #DCEFFF; color: #0b4f86;
  font-size: 13px; font-weight: 600; line-height: 1.25;
}
.smap tbody th { padding-top: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.smap tbody th small { display: block; margin-top: 2px; font: 400 11px/1.3 var(--mono); color: var(--muted); }
.smap tbody tr:first-child > * { padding-top: 16px; }
.smap-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.smap-card { padding: 9px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; line-height: 1.3; }
.smap-mvp .smap-card { background: color-mix(in srgb, var(--purple) 35%, #fff); color: #3d2bb0; font-weight: 600; }
.smap-later .smap-card { background: #fff; border: 1px dashed var(--stroke); color: var(--muted); }
.smap-later th { color: var(--muted); }
/* the cut line between what shipped first and what waited */
.smap-cut td { padding: 18px 0 !important; }
.smap-cut span {
  display: flex; align-items: center; gap: 10px; font: 400 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: #5b45ec;
}
.smap-cut span::before, .smap-cut span::after { content: ""; flex: 1; border-top: 2px dashed #5b45ec; }
.smap-cut span::before { flex: 0 0 24px; }
/* on narrow screens the map scrolls sideways; fade the right edge so it's clear there's more */
@media (max-width: 809px) {
  .smap-scroll { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
/* sticky-note look: flat paper colors, square corners, a soft lift, a slight hand-placed tilt */
.smap thead th:not(:first-child), .smap-card {
  border-radius: 2px; border: 0; min-height: 64px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 4px 10px -2px rgba(0, 0, 0, .12);
}
.smap thead th:not(:first-child) { background: #9fd8ff; color: #0b3a5e; }
.smap-mvp .smap-card { background: #ffe27a; color: #3b2f00; font-weight: 600; }
.smap-later .smap-card { background: #ececec; color: #555; border: 0; }
.smap-cards li:nth-child(odd) { transform: rotate(-0.6deg); }
.smap-cards li:nth-child(even) { transform: rotate(0.5deg); }
.smap thead th:nth-child(even) { transform: rotate(0.4deg); }
.smap thead th:nth-child(odd):not(:first-child) { transform: rotate(-0.4deg); }
.smap-cards { gap: 8px; }
/* sticky notes: Inter, one fixed height for every note */
.smap thead th:not(:first-child), .smap-card {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: -0.005em;
  height: 96px; min-height: 0; overflow: hidden; box-sizing: border-box;
}
/* plain grey cut line, no label */
.smap-cut span { gap: 0; }
.smap-cut span::before { content: none; }
.smap-cut span::after { border-top: 2px dashed #c8c8c8; }
.smap-scroll { padding: 4px 4px 14px; margin: -4px -4px -14px; } /* room so note shadows aren't clipped */

/* profile card outline turns blue on hover */
.about-left .fc { --sel: #2f80ed; }

/* ---------- Experience timeline (About) ---------- */
.xp { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.xp-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.xp-date { padding-top: 3px; font: 400 14px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.xp-role { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--text); }
.xp-co { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; vertical-align: bottom; white-space: nowrap; }
.xp-co img { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; }
.xp-body p { margin-top: 4px; font-size: 14px !important; line-height: 1.55 !important; }
@media (max-width: 480px) {
  .xp-item { grid-template-columns: 1fr; gap: 4px; }
}
/* timeline: dates | dot on a connecting line | role + company */
.xp { gap: 0; }
.xp-item { grid-template-columns: 92px 14px minmax(0, 1fr); gap: 0 14px; position: relative; padding-bottom: 22px; }
.xp-item:last-child { padding-bottom: 0; }
.xp-item::before { /* the dot */
  content: ""; grid-column: 2; grid-row: 1; width: 10px; height: 10px; margin: 6px auto 0; border-radius: 50%;
  background: #fff; border: 2px solid #2f80ed; box-sizing: border-box; position: relative; z-index: 1;
}
.xp-item:first-child::before { background: #2f80ed; } /* most recent role */
.xp-item::after { /* the line down to the next dot */
  content: ""; position: absolute; left: calc(92px + 14px + 6px); top: 16px; bottom: -6px; width: 2px; background: var(--border);
}
.xp-item:last-child::after { content: none; }
.xp-date { grid-column: 1; grid-row: 1; }
.xp-body { grid-column: 3; grid-row: 1; }
.xp-role { line-height: 1.4; }
.xp-co { margin: 4px 0 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.xp-co img { width: 18px; height: 18px; }
@media (max-width: 480px) {
  .xp-item { grid-template-columns: 14px minmax(0, 1fr); gap: 0 12px; }
  .xp-item::before { grid-column: 1; }
  .xp-item::after { left: 6px; }
  .xp-date { grid-column: 2; grid-row: 1; padding-top: 0; }
  .xp-body { grid-column: 2; grid-row: 2; }
}
/* experience: date column + title / company / keywords (no timeline dots) */
.xp { gap: 24px; }
.xp-item { grid-template-columns: 92px minmax(0, 1fr); gap: 0 16px; padding-bottom: 0; }
.xp-item::before, .xp-item::after { content: none; }
.xp-date { grid-column: 1; padding-top: 3px; }
.xp-body { grid-column: 2; }
.xp-role { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--text); }
.xp-co { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--text); opacity: .8; }
.xp-body .xp-tags { margin-top: 6px; font-size: 13px !important; line-height: 1.5 !important; color: var(--muted); }
@media (max-width: 480px) {
  .xp-item { grid-template-columns: 1fr; gap: 4px; }
  .xp-date, .xp-body { grid-column: 1; }
  .xp-body { grid-row: 2; }
}
/* title and company share one line; title is a step down in size */
.xp-role { font-size: 14px; font-weight: 600; line-height: 1.5; }
.xp-role .xp-co { display: inline-flex; margin: 0 0 0 6px; font-size: 14px; font-weight: 500; opacity: 1; color: var(--muted); vertical-align: top; }
.xp-role .xp-co img { width: 16px; height: 16px; border-radius: 4px; }
.xp-body .xp-tags { margin-top: 4px; }
/* if the company wraps under a long title, it lines up flush left */
.xp-role { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.xp-role .xp-co { margin: 0; }
/* "Title, Company" as plain text */
.xp-role { display: block; }
.xp-role .xp-co { display: inline; margin: 0; }
/* logos back beside the company; compact year column */
.xp-role { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.xp-role .xp-co { display: inline-flex; align-items: center; gap: 6px; }
.xp-item { grid-template-columns: 52px minmax(0, 1fr); gap: 0 12px; }
/* experience grouped by company: company once, its roles beneath */
.xp-groups { display: flex; flex-direction: column; gap: 22px; }
.xp-group + .xp-group { padding-top: 22px; border-top: 1px solid var(--border); }
.xp-company { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.xp-company img { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; }
.xp-group .xp { gap: 16px; }
.xp-role { display: block; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--text); }

/* ---------- Home fan: cards are links ---------- */
/* hidden cards sit on top of the intro, so they only take clicks once fanned out */
.fan > a { display: block; color: var(--text); text-decoration: none; pointer-events: none; }
.intro-wrap:hover .fan > a, .intro-wrap:focus-within .fan > a { pointer-events: auto; }
.fan > a:hover, .fan > a:focus-visible { outline: 2px solid #2f80ed; outline-offset: 2px; z-index: 2; }
/* invisible hover area around the intro, so moving out to a card doesn't collapse the fan */
.intro-wrap::before { content: ""; position: absolute; inset: -170px -280px; }
.fan-label {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); box-shadow: var(--shadow);
  font-size: 11px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .15s ease;
}
.fan > a:hover .fan-label, .fan > a:focus-visible .fan-label { opacity: 1; }
.fan .fan-resume { display: grid; place-items: center; background: var(--yellow); }
.fan .fan-resume svg { width: 34px; height: 34px; stroke-width: 1.5; }
@media (hover: none) { .fan-label { opacity: 1; } } /* touch: always show labels */
/* cards are links now, so fan them further out from behind the intro card */
.intro-wrap:hover .fan > :nth-child(1), .intro-wrap:focus-within .fan > :nth-child(1) { transform: translate(-185%, -165%) rotate(-10deg); }
.intro-wrap:hover .fan > :nth-child(2), .intro-wrap:focus-within .fan > :nth-child(2) { transform: translate(-50%, -205%) rotate(3deg); }
.intro-wrap:hover .fan > :nth-child(3), .intro-wrap:focus-within .fan > :nth-child(3) { transform: translate(85%, -165%) rotate(10deg); }
.intro-wrap:hover .fan > :nth-child(4), .intro-wrap:focus-within .fan > :nth-child(4) { transform: translate(-175%, 75%) rotate(8deg); }
.intro-wrap:hover .fan > :nth-child(5), .intro-wrap:focus-within .fan > :nth-child(5) { transform: translate(75%, 75%) rotate(-8deg); }
/* case study heroes fill their card */
.fan > a.shot img { object-fit: cover; transform: none; }
/* resume icon sits toward the card's visible outer corner */
.fan .fan-resume { place-items: end; padding: 14px 16px; }
.intro-wrap::before { inset: -230px -320px; }
.home { overflow-x: clip; } /* the hover area must not cause sideways scrolling on phones */
/* simple solid project cards */
.fan .fan-card { display: grid; place-items: center; font-size: 15px; font-weight: 600; color: var(--on-pill); }
/* tech stack logos spread evenly across the card */
.tool-logos { justify-content: space-between; flex-wrap: nowrap; }

/* ---------- Next project: a distinct end-of-case-study block ---------- */
.up-next { max-width: 1000px; margin: 120px auto 80px; padding-top: 56px; border-top: 1px solid var(--border); }
.up-next-card { text-decoration: none; }
.up-next-card .fc-box {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center;
  gap: 40px; padding: 20px; background: var(--surface);
}
.up-next-media { aspect-ratio: 1.6 / 1; overflow: hidden; background: #edeff3; }
.up-next-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.up-next-card:hover .up-next-media img { transform: scale(1.03); }
.up-next-body { display: flex; flex-direction: column; align-items: flex-start; padding-right: 20px; }
.up-next-client { font-size: 14px; font-weight: 500; color: #5b45ec; }
.up-next-title { margin: 6px 0 0; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.up-next-desc { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.up-next-cta { width: auto; margin-top: 24px; padding-inline: 16px; }
.up-next-card:hover .up-next-cta { background: #000; }
.up-next-cta svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.up-next-card:hover .up-next-cta svg { transform: translateX(3px); }
@media (max-width: 1199px) { .up-next { margin-inline: clamp(24px, 6vw, 60px); } }
@media (max-width: 809px) {
  .up-next { margin: 80px 0 56px; padding-top: 40px; }
  .up-next-card .fc-box { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 14px; }
  .up-next-body { padding: 0 6px 8px; }
  .up-next-title { font-size: 22px; }
}

/* ---------- Figma-style filled frame + in-context callouts ---------- */
.fc-fill .fc-box { padding: 0; }
.fc-fill .fc-box img { display: block; width: 100%; height: auto; }
.fc-annotated { --gutter: 165px; --reach: 22px; padding-inline: var(--gutter); }
.fc-annotated.has-top { padding-top: 84px; }
.fc-annotated + .fc-annotated { margin-top: 72px; }
.anno-stage { position: relative; container-type: inline-size; }
.callout { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 0; height: 0; z-index: 4; }
.callout::before { /* circle on the spot in the mockup */
  content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: #8a8f98; z-index: 1;
}
.callout::after { /* dashed connector: sits on the image and spills off the edge */
  content: ""; position: absolute; border: 0 dashed #8a8f98;
}
.callout-left::after { top: 0; right: 0; width: calc(var(--x) * 1cqi + var(--reach)); border-top-width: 1.5px; }
.callout-right::after { top: 0; left: 0; width: calc((100 - var(--x)) * 1cqi + var(--reach)); border-top-width: 1.5px; }
.callout-top::after { bottom: 0; left: 0; height: calc(var(--y) * var(--ar) * 1cqi + var(--reach) + 20px); border-left-width: 1.5px; }
.callout-text {
  position: absolute; width: calc(var(--gutter) - var(--reach) - 14px);
  font-size: 16px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; color: var(--text);
}
.callout-text b { color: #5b45ec; font-weight: 600; }
.callout-left .callout-text { top: 0; right: calc(var(--x) * 1cqi + var(--reach) + 10px); text-align: right; transform: translateY(var(--ty, -50%)); }
.callout-right .callout-text { top: 0; left: calc((100 - var(--x)) * 1cqi + var(--reach) + 10px); transform: translateY(var(--ty, -50%)); }
.callout-top .callout-text {
  width: 260px; left: 0; text-align: center;
  bottom: calc(var(--y) * var(--ar) * 1cqi + var(--reach) + 28px); transform: translateX(-50%);
}
.callout-num, .anno-key { display: none; }
@media (max-width: 1199px) {
  .fc-annotated { --gutter: 135px; --reach: 16px; }
  .callout-text { font-size: 15px; }
}
/* small screens: numbered dots on the mockup, notes listed below it */
@media (max-width: 809px) {
  .fc-annotated, .fc-annotated.has-top { padding: 0; }
  .fc-annotated + .fc-annotated { margin-top: 48px; }
  .callout::before, .callout::after, .callout-text { display: none; }
  .callout-num {
    display: grid; place-items: center; position: absolute; left: -9px; top: -9px;
    width: 18px; height: 18px; border-radius: 50%; background: #5b45ec; color: #fff;
    font: 600 10px/1 var(--mono); box-shadow: 0 0 0 2px #fff;
  }
  .anno-key { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: anno; }
  .anno-key li {
    counter-increment: anno; display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start;
    font-size: 14px; line-height: 1.4; color: var(--text);
  }
  .anno-key li::before {
    content: counter(anno); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
    background: #5b45ec; color: #fff; font: 600 10px/1 var(--mono);
  }
  .anno-key b { color: #5b45ec; font-weight: 600; }
}

/* ---------- Case study intro: text first, then hero (layout after nodo-studio.framer.website) ---------- */
.cs-intro { max-width: 1000px; margin: 72px auto 56px; }
.cs-intro-kicker { font: 400 14px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cs-intro .cs-title { max-width: 880px; margin-top: 24px; font-size: 56px; line-height: 1.05; letter-spacing: -0.03em; }
.cs-intro .cs-meta { max-width: 620px; margin-top: 28px; font-size: 20px; line-height: 1.5; }
.cs-intro .cs-facts {
  display: flex; flex-wrap: wrap; gap: 16px 64px; max-width: none;
  margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--stroke);
}
.cs-intro .cs-facts div { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; }
.cs-intro .cs-facts dt { font: 400 14px/1.4 var(--mono); letter-spacing: .06em; }
.cs-intro .cs-facts dd { font-size: 16px; }
@media (max-width: 1199px) {
  .cs-intro { margin-inline: clamp(24px, 6vw, 60px); }
  .cs-intro .cs-title { font-size: 46px; }
}
@media (max-width: 809px) {
  .cs-intro { margin: 48px 0 40px; }
  .cs-intro .cs-title { margin-top: 18px; font-size: 34px; line-height: 1.1; }
  .cs-intro .cs-meta { margin-top: 20px; font-size: 17px; }
  .cs-intro .cs-facts { flex-direction: column; gap: 20px; margin-top: 28px; padding-top: 24px; }
}

/* ---------- Home: plain, left-aligned intro (no card, no badges) ---------- */
.home .intro-wrap { width: min(1000px, 100%); }
.home .intro {
  align-items: flex-start; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  text-align: left;
}
.home .intro-line { justify-content: flex-start; }

/* ---------- Inter Display: Inter's optical-size axis pinned to its display end ---------- */
body { font-variation-settings: normal; }

/* ---------- Home: name as the hero ---------- */
.home .intro { gap: 0; }
.hero-name { font-size: clamp(56px, 10vw, 120px); font-weight: 600; letter-spacing: -0.045em; line-height: 0.95; }
.hero-body {
  max-width: 640px; margin-top: 28px;
  font-size: clamp(18px, 2vw, 22px); font-weight: 400; line-height: 1.5; letter-spacing: -0.01em; color: var(--muted);
}

/* home hero typefaces */
.hero-name { font-family: "Geist", var(--sans); font-variation-settings: normal; letter-spacing: -0.05em; }
.hero-body { font-family: "Geist", var(--sans); font-variation-settings: normal; font-size: clamp(18px, 1.9vw, 22px); font-weight: 400; line-height: 1.5; letter-spacing: -0.015em; }
.home .intro-wrap::before { content: none; } /* the fan hover area is gone with the fan */
/* home: hero hugs the left edge with a smaller margin */
.home { padding-inline: clamp(20px, 5vw, 64px); }
.home .intro-wrap { width: 100%; }

/* ---------- Home: hero + selected work (card style after margin-notes-lite.framer.website) ---------- */
.home { display: block; min-height: 0; padding-bottom: 140px; }
.home .intro-wrap { min-height: calc(100vh - 270px); min-height: calc(100svh - 270px); display: flex; align-items: center; padding-top: 48px; }
.work { padding-top: 40px; } /* full width of the padded page, so cards grow with the screen and share the hero's left edge */
.work-kicker { font: 400 14px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.work-heading { margin-top: 14px; font-family: "Geist", var(--sans); font-variation-settings: normal; font-size: clamp(36px, 5vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 20px; margin-top: 32px; }
.work-card { display: block; color: var(--text); text-decoration: none; }
.work-media { aspect-ratio: 1.31 / 1; border-radius: 6px; overflow: hidden; background: #edeff3; }
.work-media img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.3) translateX(var(--nudge-x, 0)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.work-card:hover .work-media img { transform: scale(1.36) translateX(var(--nudge-x, 0)); }
.work-title { margin-top: 18px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.work-desc { max-width: 420px; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.work-card:focus-visible { outline: 2px solid #5b45ec; outline-offset: 6px; border-radius: 6px; }
@media (max-width: 809px) {
  .home .intro-wrap { min-height: calc(100svh - 250px); }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 24px; }
  .work-title { font-size: 20px; }
}

/* ---------- Nav dock pinned to the top ---------- */
.dock-wrap { top: max(16px, env(safe-area-inset-top)); bottom: auto; }
.dock-item .tip { bottom: auto; top: calc(100% + 10px); }
body:has(.dock-wrap) .site-footer { padding-bottom: revert-layer; }
.home { padding-bottom: 96px; }
.page { padding-top: clamp(104px, 14vh, 128px); } /* clear the top nav */



/* ---------- k.d logo, top left, centred on the nav bar ---------- */
.site-logo {
  position: fixed; z-index: 50; left: clamp(20px, 5vw, 64px);
  top: max(16px, env(safe-area-inset-top)); height: 62px; display: flex; align-items: center;
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-variation-settings: normal;
  font-size: 30px; font-weight: 400; letter-spacing: 0; line-height: 1;
  color: var(--text); text-decoration: none;
}
.site-logo span { color: #5b45ec; margin-inline: 0.04em; }
@media (max-width: 809px) { .site-logo { font-size: 28px; height: 58px; } }

/* home eyebrow in the logo's script */
.work-kicker { font: italic 400 24px/1.2 "Instrument Serif", Georgia, serif; font-variation-settings: normal; text-transform: none; letter-spacing: 0; color: var(--muted); }

/* logo hover: a little lift on the letters so the link reads as clickable */
.site-logo { transition: opacity .2s ease; }
.site-logo:hover { opacity: .7; }
.site-logo:focus-visible { outline: 2px solid #5b45ec; outline-offset: 4px; border-radius: 4px; }

/* home: hero + projects share one centred 1120px column (as on margin-notes-lite) */
.home .intro-wrap, .work { max-width: 1120px; margin-inline: auto; }
@media (max-width: 1199px) { .home { padding-inline: 32px; } }
@media (max-width: 809px) { .home { padding-inline: 20px; } }

/* ---------- Text nav: Projects, About, and a Copy email CTA ---------- */
.dock-text { align-items: center; gap: 2px; padding: 5px; border-radius: 999px; }
.nav-link {
  padding: 8px 14px; border-radius: 999px; color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500; line-height: 1.2; transition: background-color .2s ease;
}
.nav-link:hover, .nav-link:focus-visible { background: var(--border); outline: none; }
.nav-link[aria-current="page"] { background: var(--border); }
.nav-cta {
  margin-left: 4px; min-width: 104px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--text); color: #fff; font: 500 14px/1.2 var(--sans); text-align: center;
  transition: background-color .2s ease;
}
.nav-cta:hover, .nav-cta:focus-visible { background: #000; outline: none; }
.nav-cta.is-copied { background: #5b45ec; }
.nav-link, .nav-cta { white-space: nowrap; }
.site-logo { height: 45px; } /* centred on the slimmer text nav */
@media (max-width: 809px) {
  .site-logo { height: 45px; }
  .nav-link { padding-inline: 11px; }
  .nav-cta { min-width: 0; padding-inline: 14px; }
}

/* home sits in the same white column as the About page; content fits inside it */
.home.page-col { max-width: 1048px; padding-inline: clamp(20px, 4vw, 48px); }
.home.page-col .intro-wrap, .home.page-col .work { max-width: none; }
@media (max-width: 1199px) { .home.page-col { max-width: none; border-inline: 0; } }

/* About shares the home page's left edge and width inside the white column */
.page-col > .page { max-width: none; padding-inline: clamp(20px, 4vw, 48px); }

/* Home and About headings: same type, same distance from the top of the page */
:root { --hero-top: clamp(150px, 24vh, 240px); }
.home { padding-top: 0; }
.home .intro-wrap { align-items: flex-start; padding-top: var(--hero-top); }
.page-col > .page:has(.hero-name) { padding-top: var(--hero-top); }
.page-head .hero-name { font-size: clamp(56px, 10vw, 120px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; }
.page-head:has(.hero-name) { margin-bottom: 56px; }
@media (max-width: 809px) { :root { --hero-top: 130px; } }
@media (max-width: 809px) { .home .intro-wrap { min-height: 0; } .work { padding-top: 88px; } }

/* ---------- Case study header, after margin-notes-lite (work/ordinary-coffee) ---------- */
.cs-back {
  display: inline-flex; gap: 6px; margin-bottom: 36px; padding-bottom: 2px;
  border-bottom: 1px solid currentColor; color: var(--text); text-decoration: none;
  font-size: 16px; font-weight: 500; line-height: 1.2;
}
.cs-back:hover { color: #5b45ec; }
.cs-intro { margin-top: 64px; }
.cs-intro .cs-title {
  max-width: none; margin-top: 28px;
  font-family: "Geist", var(--sans); font-variation-settings: normal;
  font-size: clamp(40px, 6.4vw, 80px); font-weight: 500; letter-spacing: -0.045em; line-height: 1;
}
.cs-intro .cs-meta {
  max-width: 760px; margin-top: 28px;
  font-family: "Geist", var(--sans); font-variation-settings: normal;
  font-size: clamp(19px, 2.1vw, 26px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.35; color: var(--text);
}
.cs-intro .cs-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px;
  margin-top: 64px; padding-top: 0; border-top: 0;
}
.cs-intro .cs-facts div { gap: 12px; padding-top: 18px; border-top: 1px solid var(--stroke); }
.cs-intro .cs-facts dd { font-size: 15px; font-weight: 400; }
.cs-hero { border-radius: 10px; border: 0; }
.cs-intro + .cs-hero { margin-top: 72px; }
@media (max-width: 809px) {
  .cs-back { margin-bottom: 28px; }
  .cs-intro .cs-facts { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 44px; }
  .cs-intro .cs-facts div { padding: 18px 0 26px; }
  .cs-intro + .cs-hero { margin-top: 24px; }
}
.cs-intro { margin-top: 112px; } /* clear the fixed top nav */
@media (max-width: 809px) { .cs-intro { margin-top: 88px; } }

/* ---------- Case study body copy: Geist 24px, #787878 ---------- */
.cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker) {
  font-family: "Geist", var(--sans); font-variation-settings: normal;
  font-size: 24px; font-weight: 400; line-height: 1.45; letter-spacing: -0.015em; color: #787878;
}
.cs .cs-text > p + p, .cs .cs-section > p + p { margin-top: 0.6em; }
@media (max-width: 1199px) { .cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker) { font-size: 22px; } }
@media (max-width: 809px) { .cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker) { font-size: 18px; } }
/* case study section headings match the body size; colour unchanged */
.cs .cs-text h2, .cs .cs-section h2, .cs .cs-split-text h2 { font-size: 36px; line-height: 1.2; letter-spacing: -0.025em; }
@media (max-width: 1199px) { .cs .cs-text h2, .cs .cs-section h2, .cs .cs-split-text h2 { font-size: 30px; } }
@media (max-width: 809px) { .cs .cs-text h2, .cs .cs-section h2, .cs .cs-split-text h2 { font-size: 22px; } }

/* more room between case study sections (each section starts with an eyebrow) */
.cs .cs-text:has(> .cs-kicker), .cs .cs-text:has(> .cs-section > .cs-kicker), .cs .cs-split { margin-top: 128px; }
.cs .cs-section + .cs-section { margin-top: 96px; }
.cs .cs-bridge { margin-block: 112px; }
@media (max-width: 809px) {
  .cs .cs-text:has(> .cs-kicker), .cs .cs-text:has(> .cs-section > .cs-kicker), .cs .cs-split { margin-top: 80px; }
  .cs .cs-section + .cs-section { margin-top: 64px; }
  .cs .cs-bridge { margin-block: 72px; }
}

/* case study type scale: section headings 28px, body 18px */
.cs .cs-text h2, .cs .cs-section h2, .cs .cs-split-text h2 { font-size: 28px; line-height: 1.25; letter-spacing: -0.02em; }
.cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker) { font-size: 18px; line-height: 1.6; letter-spacing: -0.005em; }
.cs .cs-text h2 + p, .cs .cs-section h2 + p, .cs .cs-split-text h2 + p { margin-top: 12px; }
@media (max-width: 1199px) {
  .cs .cs-text h2, .cs .cs-section h2, .cs .cs-split-text h2 { font-size: 26px; }
  .cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker) { font-size: 18px; }
}
@media (max-width: 809px) {
  .cs .cs-text h2, .cs .cs-section h2, .cs .cs-split-text h2 { font-size: 22px; }
  .cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker) { font-size: 17px; }
}

/* ---------- Case study images: no frame UI (no label, border or selection handles) ---------- */
.cs figure.fc:not(.outcome):has(img) > .fc-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
} /* kept for screen readers as the figure caption */
.cs figure.fc:not(.outcome):has(img) .fc-box { border: 0; background: transparent; }
.cs figure.fc:not(.outcome):has(img) .fc-box::before,
.cs figure.fc:not(.outcome):has(img) .fc-box::after,
.cs figure.fc:not(.outcome):has(img) .fc-h { display: none; }
.cs figure.fc:not(.outcome):has(img) .fc-box > img,
.cs figure.fc:not(.outcome):has(img) .anno-stage > img,
.cs figure.fc:not(.outcome):has(img) .stat-media img { border-radius: 10px; }

/* ---------- Left sidebar navigation (layout after moritzpetersen.com) ---------- */
:root { --sb: 260px; --hero-top: clamp(72px, 12vh, 128px); }
.site-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: var(--sb);
  display: flex; flex-direction: column; padding: 48px 28px 32px 40px;
}
.sb-name { font-family: "Geist", var(--sans); font-variation-settings: normal; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.sb-role { margin-top: 4px; font-size: 15px; color: #787878; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; margin: 40px 0 0 -12px; }
.sb-link {
  display: block; width: 100%; padding: 9px 12px; border: 1px solid transparent; border-radius: 10px;
  background: none; color: #787878; text-align: left; text-decoration: none;
  font: 500 16px/1.3 var(--sans); transition: color .2s ease, background-color .2s ease;
}
.sb-link:hover, .sb-link:focus-visible { color: var(--text); background: var(--surface); outline: none; }
.sb-link[aria-current="page"] { color: var(--text); background: #fff; border-color: var(--stroke); box-shadow: var(--shadow); }
.sb-link.is-copied { color: #5b45ec; }
.sb-foot { margin-top: auto; display: flex; gap: 16px; font-size: 13px; }
.sb-foot a { color: #787878; text-decoration: none; }
.sb-foot a:hover { color: var(--text); }

/* content: white column fills everything right of the sidebar */
body { padding-left: var(--sb); }
.page-col, .cs { max-width: none; margin-inline: 0; border-right: 0; }
.home.page-col { max-width: none; }
.home .intro-wrap, .work, .home.page-col .intro-wrap, .home.page-col .work { max-width: 1120px; margin-inline: auto; }
.page-col > .page { max-width: 1120px; margin-inline: auto; }
.home.page-col { padding-inline: clamp(24px, 4vw, 64px); }
.home .intro-wrap { min-height: 0; padding-top: var(--hero-top); }
.work { padding-top: 120px; }
.cs-intro { margin-top: 72px; }

/* home: photo above the name */
.hero-photo { width: 112px; height: 112px; margin: 0 0 28px; border-radius: 50%; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* tablet + phone: sidebar becomes a header bar above the content */
@media (max-width: 999px) {
  body { padding-left: 0; }
  .site-sidebar {
    position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px;
    padding: 20px clamp(20px, 4vw, 48px); background: #fff; border-bottom: 1px solid var(--border);
  }
  .sb-role, .sb-foot { display: none; }
  .sb-nav { flex-direction: row; margin: 0 0 0 auto; }
  .sb-link { width: auto; padding: 7px 10px; font-size: 15px; }
  .cs-intro { margin-top: 48px; }
  .work { padding-top: 88px; }
}
@media (max-width: 560px) {
  .sb-nav { margin-left: -10px; width: 100%; }
  .hero-photo { width: 88px; height: 88px; }
}
/* About lines up with Home inside the wider white area */
.page-col { padding-inline: clamp(24px, 4vw, 64px); }
.page-col > .page { padding-inline: 0; }

/* sidebar: charcoal Copy email button pinned above the footer links */
.sb-cta {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 11px 14px; border: 0; border-radius: 10px; background: #2b2b2b; color: #fff;
  font: 500 15px/1.2 var(--sans); transition: background-color .2s ease;
}
.sb-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-cta:hover, .sb-cta:focus-visible { background: #111; outline: none; }
.sb-cta.is-copied { background: #5b45ec; }
.sb-cta + .sb-foot { margin-top: 16px; }
@media (max-width: 999px) {
  .sb-cta { margin: 0 0 0 auto; width: auto; padding: 8px 14px; font-size: 14px; }
  .sb-nav { margin-left: 0; }
}
@media (max-width: 560px) { .sb-cta { order: 1; } .sb-nav { order: 2; width: 100%; margin-left: -10px; } }

/* ---------- Floating panels: sidebar and content sit on the dotted background ---------- */
@media (min-width: 1000px) {
  :root { --gap: 16px; }
  body { padding-left: calc(var(--sb) + var(--gap) * 2); padding-right: var(--gap); }
  .site-sidebar {
    left: var(--gap); top: var(--gap); bottom: var(--gap); width: var(--sb);
    background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 32px 24px 24px 28px;
  }
  .page-col, .cs {
    margin-top: var(--gap); min-height: calc(100vh - var(--gap) * 2); min-height: calc(100svh - var(--gap) * 2);
    border: 1px solid var(--border); border-radius: 16px;
  }
  .site-footer { margin-block: var(--gap); border-radius: 16px; }
}

/* sidebar identity: avatar beside name + title */
.sb-id { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.sb-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; }
.sb-id .sb-name, .sb-id .sb-role { display: block; }
.sb-id .sb-name { font-size: 17px; line-height: 1.2; }
.sb-id .sb-role { margin-top: 2px; font-size: 14px; }
@media (max-width: 999px) { .sb-avatar { width: 36px; height: 36px; } .sb-id .sb-role { display: none; } }
@media (min-width: 1000px) {
  .site-sidebar { padding-inline: 16px; }
  .sb-nav { margin-inline: 0; }
}

/* ---------- Desktop: content scrolls inside its own panel; sidebar and margins stay put ---------- */
@media (min-width: 1000px) {
  html, body { height: 100%; overflow: hidden; }
  body { padding: 0; }
  .content-scroll {
    position: fixed; top: var(--gap); bottom: var(--gap); right: var(--gap); left: calc(var(--sb) + var(--gap) * 2);
    overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
  }
  .content-scroll > .page-col, .content-scroll > .cs { margin: 0; border: 0; border-radius: 0; min-height: 100%; }
  .content-scroll > .site-footer { margin: 0; border-radius: 0; }
}

/* Next project: same layout, no card (no label frame, border, fill or handles) */
.up-next-card .fc-box { padding: 0; background: none; border: 0; }
.up-next-card .fc-box::before, .up-next-card .fc-box::after, .up-next-card .fc-h { display: none; }
.up-next-card > .fc-label { margin-bottom: 16px; }
.up-next-card:is(:hover, :focus-visible, :focus-within) > .fc-label { color: var(--muted); }
.up-next-media { border-radius: 10px; }

/* ---------- Retire the Figma-style frame UI everywhere: no selection handles, no coloured hover outlines ---------- */
.fc-box::before, .fc-box::after, .fc-h, .fc-h::before, .fc-h::after { display: none !important; }
.fc:is(:hover, :focus-visible, :focus-within) .fc-box { border-color: var(--border) !important; }
.fc:is(:hover, :focus-visible, :focus-within) .fc-label { color: var(--muted) !important; }
.fc-box { transition: none; }
/* flow diagram: no frame border */
.fc-box.flow { border: 0 !important; background: transparent; }

/* About page: no frames — content sits directly on the page */
.about .fc-box { border: 0 !important; background: none; padding: 0; }
.about .fc + .fc { margin-top: 56px; }

/* steady page-to-page: reserve scrollbar space so content never shifts sideways */
.content-scroll { scrollbar-gutter: stable; }
html { scrollbar-gutter: stable; }

/* smooth page-to-page navigation: crossfade, with the sidebar held still (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
.site-sidebar { view-transition-name: sidebar; }
::view-transition-group(sidebar) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- h2: Geist 36/38, 400, -1.44px, #000 (footer quote keeps its serif) ---------- */
html body h2:not(.sf-title):not(.visually-hidden):not(.fc-label) {
  font-family: "Geist", var(--sans); font-variation-settings: normal;
  font-size: 36px; line-height: 38px; font-weight: 400; letter-spacing: -1.44px; color: #000;
}
@media (max-width: 809px) {
  html body h2:not(.sf-title):not(.visually-hidden):not(.fc-label) { font-size: 28px; line-height: 30px; letter-spacing: -1.1px; }
}

/* ---------- h1: Geist 40/42, 400, -1.6px, #000 ---------- */
html body h1:not(.visually-hidden):not(#_) {
  font-family: "Geist", var(--sans); font-variation-settings: normal;
  font-size: 40px; line-height: 42px; font-weight: 400; letter-spacing: -1.6px; color: #000;
}
@media (max-width: 809px) {
  html body h1:not(.visually-hidden):not(#_) { font-size: 32px; line-height: 34px; letter-spacing: -1.28px; }
}

/* ---------- Body copy: Geist 16/22, 400, 0 tracking, translucent black ---------- */
:root { --body-ink: rgba(0, 0, 0, 0.55); }
html body :is(
  .cs .cs-text > p:not(.cs-kicker), .cs .cs-section > p:not(.cs-kicker), .cs .cs-split-text > p:not(.cs-kicker),
  .about .a-body p, .up-next-desc
):not(#_) {
  font-family: "Geist", var(--sans); font-variation-settings: normal;
  font-size: 16px; line-height: 22px; font-weight: 400; letter-spacing: 0; color: var(--body-ink);
}
.cs .cs-text > p + p, .cs .cs-section > p + p, .about .a-body p + p { margin-top: 12px; }

/* ---------- Inter retired: all remaining copy uses the <p> body style (Geist 16/22, 400, 0) ---------- */
html body :is(
  .cs-section .st-text, .cs-bridge-body, .outcome p, .work-desc, .xp-body .xp-tags
):not(#_) {
  font-family: "Geist", var(--sans); font-size: 16px !important; line-height: 22px !important; font-weight: 400; letter-spacing: 0; color: var(--body-ink);
}

/* ---------- Footer as its own floating panel, a gap below the content panel ---------- */
@media (min-width: 1000px) {
  .content-scroll { background: transparent; border: 0; }
  .content-scroll > .page-col, .content-scroll > .cs {
    background: #fff; border: 1px solid var(--border); border-radius: 16px; min-height: 100%;
  }
  .content-scroll > .site-footer { margin-top: var(--gap); border-radius: 16px; }
}
/* home heading wraps right after "research," (scales with font size) */
.home .hero-name { max-width: 16em; }
.hero-muted { color: #787878; } /* same grey as the sidebar LinkedIn / Resume links */

/* Case study top bar: full-width white band holding "All work"; hides on scroll-down, returns on scroll-up */
.cs-topbar {
  position: sticky; top: 0; z-index: 30;
  margin: 28px -24px 0; padding: 20px 24px;
  background: #fff; transition: transform .28s ease, box-shadow .28s ease;
}
.cs-topbar .cs-back { margin: 0 auto; display: flex; width: fit-content; }
.cs-topbar .cs-back { margin-left: max(0px, calc((100% - 1000px) / 2)); }
.cs-topbar.is-stuck { box-shadow: 0 1px 0 var(--border); }
.cs-topbar.is-tucked { transform: translateY(-100%); }
.cs-topbar + .cs-intro { margin-top: 16px; }
@media (max-width: 1199px) { .cs-topbar .cs-back { margin-left: clamp(24px, 6vw, 60px); } }
@media (max-width: 809px) {
  .cs-topbar { margin: 12px -16px 0; padding: 16px; }
  .cs-topbar .cs-back { margin-left: 0; }
  .cs-topbar + .cs-intro { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cs-topbar { transition: none; } }

/* keep the content panel's rounded top border in view while its content scrolls */
@media (min-width: 1000px) {
  .content-scroll::before {
    content: ""; position: sticky; top: 0; z-index: 40; display: block; height: 16px; margin-bottom: -16px;
    border: 1px solid var(--border); border-bottom: 0; border-radius: 16px 16px 0 0; pointer-events: none;
  }
}
/* case study header: 16px between eyebrow, title and subtitle */
html body .cs-intro .cs-title:not(#_) { margin-top: 16px; }
html body .cs-intro .cs-meta:not(#_) { margin-top: 16px; }
/* gap from "All work" to the eyebrow matches the gap from the subtitle to the facts row */
.cs-topbar + .cs-intro { margin-top: 44px; }   /* 20px bar padding + 44px = 64px */
@media (max-width: 809px) { .cs-topbar + .cs-intro { margin-top: 28px; } }   /* 16px + 28px = 44px */
html body .cs-intro .cs-meta:not(#_) { color: #787878; } /* same grey as the home heading's muted words */

/* ---------- Red findings: numbered editorial list (number in cranberry, rule, grey body copy) ---------- */
html body .findings:not(.findings-good):not(#_) {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px 48px;
  margin-top: 32px; counter-reset: finding;
}
html body .findings:not(.findings-good) li:not(#_) {
  counter-increment: finding; display: block; padding: 0; border-radius: 0; background: none;
  font-family: "Geist", var(--sans); font-size: 16px; line-height: 22px; font-weight: 400; letter-spacing: 0; color: var(--body-ink);
}
html body .findings:not(.findings-good) li:not(#_)::before {
  content: counter(finding, decimal-leading-zero); display: block;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
  font-size: 20px; line-height: 24px; letter-spacing: -0.02em; color: #A80542;
}
/* red findings: one column, number on the left, text to its right, rule between rows */
html body .findings:not(.findings-good):not(#_) { display: flex; flex-direction: column; gap: 0; }
html body .findings:not(.findings-good) li:not(#_) {
  display: grid; grid-template-columns: 40px 1fr; align-items: baseline; column-gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
html body .findings:not(.findings-good) li:not(#_):first-child { border-top: 1px solid var(--border); }
html body .findings:not(.findings-good) li:not(#_)::before { padding: 0; margin: 0; border: 0; font-size: 16px; line-height: 22px; }
/* red findings: dividers only between rows */
html body .findings:not(.findings-good) li:not(#_):first-child { border-top: 0; padding-top: 0; }
html body .findings:not(.findings-good) li:not(#_):last-child { border-bottom: 0; padding-bottom: 0; }

/* smaller case study mockups (hero unchanged) */
.cs .cs-figure:not(.cs-figure-narrow):not(.fc-annotated) { max-width: 860px; margin-inline: auto; }
.cs .cs-figure-narrow:not(.cs-figure-text) { max-width: 700px; }
.cs .fc-annotated { --gutter: 150px; max-width: 1040px; margin-inline: auto; }
.cs .cs-figure.cs-figure-pivot.cs-figure-narrow { max-width: 1000px; } /* "Introducing Validity Engage" image, larger */
.up-next-title { margin-top: 0; }
.h-struck { color: #787878; text-decoration: line-through; text-decoration-thickness: 2px; }

/* wireframe mockups get a thin border; the new-IA site map is shown larger */
.cs .cs-figure-wire .anno-stage > img { border: 1px solid var(--stroke); }
.cs .cs-figure-ia { max-width: 1000px; }
/* site map image cropped tight to the diagram (original kept as engage-ia.orig.png) */
.cs .cs-figure.cs-figure-ia.cs-figure-narrow { max-width: 960px; }
.h-muted { color: #787878; } /* grey words inside headings */
h2 strong { font-weight: 600; }

/* top bar: "All work" on the left, previous / next case study on the right */
.cs-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1000px; margin-inline: auto; }
html body .cs-topbar .cs-back:not(#_) { margin: 0; }
.cs-pager { display: flex; gap: 8px; }
.cs-pager-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--stroke); border-radius: 999px; background: #fff;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.cs-pager-btn:hover, .cs-pager-btn:focus-visible { background: var(--surface); color: #5b45ec; outline: none; }
@media (max-width: 1199px) { .cs-topbar-inner { margin-inline: clamp(24px, 6vw, 60px); } }
@media (max-width: 809px) {
  .cs-topbar-inner { margin-inline: 0; }
  .cs-pager-btn { padding: 6px 10px; font-size: 13px; }
}
@media (max-width: 560px) {
  .cs-pager-btn { font-size: 0; gap: 0; padding: 6px 10px; }        /* phones: arrows only */
  .cs-pager-btn span { font-size: 15px; }
}

/* flow diagram: room for the purple step cards (no squeezing or wrapping) */
html body .cs .cs-figure-narrow:has(.flow):not(#_) { max-width: 900px; }
.flow-box-step { flex: 1 0 auto; min-width: 116px; padding-inline: 18px; white-space: nowrap; }
.flow-group-steps .flow-items { gap: 10px; }
@media (max-width: 809px) { .flow-box-step { min-width: 0; } }
/* when the column is too narrow for one row, the 3 steps drop onto their own row */
.cs-figure .flow { container-type: inline-size; }
@container (max-width: 780px) {
  .flow-line { flex-wrap: wrap; row-gap: 14px; justify-content: center; }
  .flow-group-steps { flex: 1 1 100%; }
  .flow-line > .flow-arrow:not(:first-child) { transform: rotate(90deg); flex-basis: 100%; }
  .flow-box-step { min-width: 0; flex: 1 1 0; }
}
html body .cs .cs-figure.cs-figure-scratch:not(#_) { max-width: 1080px; } /* scratch-off: sketch → wireframe → final, shown large */
html body .cs .cs-figure.cs-figure-patterns:not(#_) { max-width: 1080px; } /* MVP overview with annotations, shown large */
/* visible mono caption above an image (overrides the hidden-label rule) */
html body .cs figure.cs-figure-captioned > .fc-label:not(#_) {
  position: static; width: auto; height: auto; margin: 0 0 10px; overflow: visible; clip: auto; white-space: normal;
  font: 400 14px/1.4 var(--mono); color: var(--muted);
}

/* About: 16px title→subtitle, text column left and photo right */
html body .page-head .hero-name + .hero-body:not(#_) { margin-top: 16px; }
.about > .about-left { order: 2; }
.about > .about-right { order: 1; }
@media (max-width: 809px) { .about > .about-left { order: 0; } }
/* About: smaller profile photo, text column gets the extra room */
@media (min-width: 810px) {
  .about { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
}

/* ---------- About: experience as a simple list (role / company + years / rule) ---------- */
.xp-list { list-style: none; margin: 0; padding: 0; }
.xp-row { padding: 20px 0 14px; border-bottom: 1px solid var(--border); }
.xp-row:first-child { padding-top: 0; }
html body .xp-row-role:not(#_) { margin: 0; font-family: "Geist", var(--sans); font-size: 18px; line-height: 24px; font-weight: 400; letter-spacing: -0.01em; color: #000; }
.xp-row-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 4px; font-size: 18px; line-height: 24px; letter-spacing: -0.01em; color: #787878; }
.xp-row-meta span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .page-head .hero-name + .about-subtitle:not(#_) { margin-top: 16px; }
html body h2.about-subtitle:not(.sf-title):not(.visually-hidden):not(.fc-label):not(#_) { color: #787878; }
/* 16px between any h2 and the body copy that follows it */
html body h2 + p:not(#_), html body h2 + ul.findings:not(#_) { margin-top: 16px; }
/* About: subtitle (h2) to the bio copy is 16px */
html body .page-head:has(.about-subtitle):not(#_) { margin-bottom: 16px; }

/* About: skills as simple bordered boxes */
.about-skills { margin-top: 40px; }
.skill-boxes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-boxes li {
  padding: 8px 14px; border: 1px solid var(--stroke); border-radius: 8px;
  font-size: 15px; line-height: 20px; color: var(--text); background: #fff;
}
.about-skills { margin: 0 0 16px; }
/* About: header lives in the text column so the photo's top lines up with "Hi, I’m Kaycie" */
.about-right > .page-head { margin-bottom: 0; }
.page-col > .page:has(.about-right > .page-head) { padding-top: var(--hero-top); }
html body .about-right > .page-head:has(.about-subtitle):not(#_) { margin-bottom: -8px; } /* + 24px column gap = 16px */

/* sidebar Copy email matches the footer button: full email, "Click to copy" on hover, "Copied" after */
.sb-cta { font-size: 14px; }
.sb-cta .copy-labels { min-width: 0; }
.sb-cta .copy-labels > span { text-align: center; white-space: nowrap; }
.sb-cta.is-copied { background: #5b45ec; }
.sf-actions .copy-btn.is-copied { background: #5b45ec; border-color: #5b45ec; color: #fff; }
@media (max-width: 999px) { .sb-cta { font-size: 13px; } }
