:root { --portfolio-shell-height: 64px; }

body.has-portfolio-shell { padding-top: var(--portfolio-shell-height) !important; }

/* Scrolls away with the page; case-study-navigation.js slides the study header up into its place. */
.portfolio-shell {
  position: absolute;
  z-index: 4000;
  inset: 0 0 auto;
  height: var(--portfolio-shell-height);
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(230px, 1fr) minmax(330px, .8fr);
  align-items: stretch;
  border-bottom: 1px solid rgba(20, 20, 18, .22);
  background: #faf9f6;
  color: #171714;
  font-family: var(--sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.portfolio-shell a { color: inherit; text-decoration: none; }

.portfolio-shell__brand,
.portfolio-shell__case,
.portfolio-shell__actions,
.portfolio-shell__next { display: flex; align-items: center; }

.portfolio-shell__brand {
  gap: 12px;
  padding: 0 clamp(20px, 3vw, 44px);
  border-right: 1px solid rgba(20, 20, 18, .13);
  transition: background 160ms ease;
}

.portfolio-shell__brand:hover,
.portfolio-shell__brand:focus-visible,
.portfolio-shell__case:hover,
.portfolio-shell__case:focus-visible,
.portfolio-shell__all:hover,
.portfolio-shell__all:focus-visible { background: #eeece6; }

.portfolio-shell__brand strong {
  white-space: nowrap;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.portfolio-shell__brand span,
.portfolio-shell__case span,
.portfolio-shell__next span {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.portfolio-shell__brand span { color: var(--muted, #5e5d57); }

.portfolio-shell__case {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding: 0 clamp(22px, 3vw, 46px);
  border-right: 1px solid rgba(20, 20, 18, .13);
  transition: background 160ms ease;
}

.portfolio-shell__case span { color: var(--muted, #5e5d57); }
.portfolio-shell__case strong { font-size: 11px; font-weight: 560; letter-spacing: -.01em; }

.portfolio-shell__actions { justify-content: flex-end; min-width: 0; }

.portfolio-shell__all {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 104px;
  padding: 0 22px;
  border-right: 1px solid rgba(20, 20, 18, .13);
  font-size: 12px;
  font-weight: 600;
  transition: background 160ms ease;
}

.portfolio-shell__next {
  align-self: stretch;
  min-width: 0;
  gap: 10px;
  padding: 0 clamp(20px, 2.4vw, 38px);
  background: var(--ink, #171816);
  color: #fff !important;
  transition: background 160ms ease;
}

.portfolio-shell__next:hover,
.portfolio-shell__next:focus-visible { background: var(--ink-3, #2c2d2a); }
.portfolio-shell__next span { color: rgba(255, 255, 255, .62); }
.portfolio-shell__next strong { overflow: hidden; font-size: 12px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-shell__next b { margin-left: auto; font-size: 17px; font-weight: 400; }

.portfolio-shell a:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--ink, #171816); outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--white, #fbfaf7); }

body.has-portfolio-shell > .site-header { top: var(--portfolio-shell-offset, var(--portfolio-shell-height)); }

.case-study-exit {
  --cs-exit-bg: var(--ink, #171816);
  --cs-exit-ink: #f5f2ec;
  --cs-exit-muted: var(--muted-on-ink, #a8a8a1);
  --cs-exit-rule: rgba(255, 255, 255, .16);
  --cs-exit-accent: var(--white, #fbfaf7);
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(76px, 9vw, 136px) max(24px, calc((100vw - 1280px) / 2));
  background: var(--cs-exit-bg);
  color: var(--cs-exit-ink);
  font-family: var(--sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.cs-exit-shell { max-width: 1280px; margin: 0 auto; }
.cs-exit-kicker {
  margin: 0 0 28px;
  color: var(--cs-exit-muted);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cs-exit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  border: 1px solid var(--cs-exit-rule);
}

.cs-next-study,
.cs-browse-work {
  min-width: 0;
  padding: clamp(28px, 4vw, 54px);
  color: inherit;
}

.cs-next-study {
  display: block;
  border-right: 1px solid var(--cs-exit-rule);
  text-decoration: none;
  transition: background 180ms ease;
}
.cs-next-study:hover { background: rgba(255, 255, 255, .055); }
.cs-next-study:focus-visible,
.cs-browse-work a:focus-visible { outline: 3px solid var(--cs-exit-accent); outline-offset: -3px; }

.cs-next-study > span,
.cs-browse-work > span,
.cs-study-jumps span {
  color: var(--cs-exit-muted);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cs-next-study h2 {
  margin: 38px 0 0;
  max-width: 760px;
  color: var(--cs-exit-ink);
  font-size: clamp(42px, 6vw, 84px);
  font-weight: 430;
  line-height: .98;
  letter-spacing: -.055em;
}
.cs-next-study p { max-width: 600px; margin: 20px 0 0; color: var(--cs-exit-muted); font-size: 15px; line-height: 1.55; }
.cs-next-study b { display: inline-block; margin-top: 44px; color: var(--cs-exit-accent); font-size: 13px; font-weight: 500; }

.cs-browse-work { display: flex; min-height: 100%; flex-direction: column; }
.cs-browse-work h3 { margin: 20px 0 0; color: var(--cs-exit-ink); font-size: 27px; font-weight: 440; line-height: 1.15; letter-spacing: -.035em; }
.cs-all-work {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cs-exit-rule);
  color: var(--cs-exit-ink);
  font-size: 13px;
  text-decoration: none;
}
.cs-all-work:hover { color: var(--cs-exit-accent); }
.cs-study-jumps { display: grid; gap: 0; margin-top: auto; padding-top: 50px; }
.cs-study-jumps a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--cs-exit-rule);
  color: var(--cs-exit-muted);
  font-size: 12px;
  text-decoration: none;
}
.cs-study-jumps a:hover { color: var(--cs-exit-ink); }

@media (max-width: 760px) {
  :root { --portfolio-shell-height: 58px; }
  .portfolio-shell { grid-template-columns: 1fr auto; }
  .portfolio-shell__brand { padding: 0 18px; border-right: 0; }
  .portfolio-shell__brand span, .portfolio-shell__case { display: none; }
  .portfolio-shell__all { min-width: auto; padding: 0 17px; }
  .portfolio-shell__next { width: 52px; padding: 0; justify-content: center; }
  .portfolio-shell__next span, .portfolio-shell__next strong { display: none; }
  .portfolio-shell__next b { margin: 0; }
  .cs-exit-grid { grid-template-columns: 1fr; }
  .cs-next-study { border-right: 0; border-bottom: 1px solid var(--cs-exit-rule); }
  .cs-study-jumps { padding-top: 36px; }
}

@media (pointer: coarse) {
  .cs-all-work, .cs-study-jumps a { min-height: 44px; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-shell a, .cs-next-study { transition: none; }
}
