:root {
  --paper: #fdfbf7;
  --dot: #ececec;
  --header-h: 55px;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--paper);
  color: #1a1a1a;
  font-family: "Bricolage Grotesque", "Sen", sans-serif;
}

.scale-root {
  width: 1440px;
  margin: 0 auto;
  background-color: var(--paper);
  background-image: radial-gradient(circle, var(--dot) 2.5px, transparent 2.6px);
  background-size: 18px 18px;
}

.page {
  position: relative;
  width: 1440px;
}

.sticky-header {
  position: sticky;
  top: 0;
  height: 0;
  z-index: 1000;
}

.sticky-header__inner {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 55px;
  overflow: visible;
}

.layer {
  position: absolute;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
}

.layer.text {
  margin: 0;
  max-width: none;
}

.has-slides .scale-root {
  width: 100%;
  max-width: 1920px;
  overflow-x: clip;
}

.has-slides .page {
  width: 100%;
  height: auto !important;
}

.has-slides .sticky-header__inner {
  width: 100%;
}

.slide,
.flow,
.site-footer {
  position: relative;
  width: 100%;
}

.slide {
  height: 100dvh;
  overflow: hidden;
}

.slide__fit,
.flow__fit,
.site-footer__fit {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.slide--cards .project-scroll {
  position: absolute;
  left: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 40;
}

.layer.text.cap {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.layer.text[style*="display:flex"] {
  flex-direction: column !important;
  align-items: stretch !important;
  min-width: 0;
}

.layer.text[style*="align-items:center"] {
  justify-content: center !important;
}

.layer.text[style*="align-items:flex-end"] {
  justify-content: flex-end !important;
}

.layer.text span[style*="font-size:13px"] { line-height: 15.6px; }
.layer.text span[style*="font-size:7px"] {
  display: block;
  height: 4px;
  line-height: 4px;
  overflow: hidden;
}

.layer.text[style*="height:9px"] {
  line-height: 9px;
  display: flex;
  align-items: center;
}

.layer svg {
  display: block;
  overflow: visible;
}

.layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.layer img.icon {
  object-fit: fill;
}

.layer a {
  pointer-events: auto;
}

.hotspot {
  position: absolute;
  z-index: 200;
  display: block;
  pointer-events: auto;
}

.hotspot:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.anchor {
  position: absolute;
  width: 1px;
  height: 1px;
  scroll-margin-top: 72px;
}

#resume { scroll-margin-top: 80px; }

.project-scroll {
  position: absolute;
  left: 0;
  width: 1440px;
  height: 580px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 40;
  scrollbar-width: none;
}

.project-scroll::-webkit-scrollbar { display: none; }

.card-sticky {
  position: sticky;
  top: 0;
  height: 561px;
}

.card-gap {
  height: 100px;
}

@keyframes arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.arrow-bob {
  animation: arrow-bob 1.2s ease-in-out infinite;
}

.layer video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: transparent;
  pointer-events: none;
}

.layer .phone-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.layer video.crop-phone {
  position: absolute;
  left: 0;
  width: 100%;
  height: calc(1920 / 1788 * 100%);
  top: calc(-98 / 1788 * 100%);
  object-fit: cover;
  object-position: center center;
  opacity: 0;
}

.layer video.crop-phone.is-playing {
  opacity: 1;
}

a { color: inherit; }

.layer:has(img[src*="back-to-top.png"]) { visibility: hidden; }

.back-to-top {
  position: fixed;
  z-index: 1100;
  display: block;
  width: 41px;
  height: 41px;
  background: url("../assets/images/back-to-top.svg") center / 100% 100% no-repeat;
  text-decoration: none;
}

.back-to-top span { display: none; }

.back-to-fiction {
  position: fixed;
  z-index: 1100;
  display: block;
  width: 41px;
  height: 41px;
  background: url("../assets/images/back-to-top.svg") center / 100% 100% no-repeat;
  transform: rotate(-90deg);
  text-decoration: none;
}

#design-fiction { scroll-margin-top: 72px; }

.fiction-frame {
  position: absolute;
  overflow: visible;
}

.fiction-frame .layer {
  pointer-events: auto;
}

.fiction-frame__shade {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(26, 26, 26, 0.74);
  opacity: 0;
  pointer-events: none;
}

.fiction-frame__label {
  position: absolute;
  margin: 0;
  font-family: "Sen", sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 26.47px;
  letter-spacing: 0;
  text-align: center;
}

.fiction-frame:hover {
  overflow: hidden;
  z-index: 150;
}

.fiction-frame:hover .fiction-frame__shade {
  opacity: 1;
}

.artifacts {
  position: absolute;
  left: 64px;
  width: 1260px;
  z-index: 25;
  pointer-events: auto;
}

.artifact {
  margin: 0 0 72px;
}

.artifact:last-child {
  margin-bottom: 0;
}

.artifact__view {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.15);
  overflow: hidden;
}

.artifact__view iframe {
  display: block;
  width: 100%;
  height: calc(100vh / var(--page-zoom, 1) - 180px);
  border: 0;
  background: #fff;
}

.artifact--phone {
  position: relative;
  --phone-scale: min(1, (100vh - 130px) / 886px);
}

.phone-fit {
  height: calc(886px * var(--phone-scale));
  display: flex;
  justify-content: center;
  position: relative;
}

.phone {
  position: relative;
  width: 427px;
  height: 886px;
  flex: 0 0 auto;
  transform: scale(var(--phone-scale));
  transform-origin: top center;
  padding: 5px;
  border-radius: 65px;
  background: linear-gradient(155deg, #f6f6f8 0%, #c9c9cd 18%, #efeff1 40%, #8e8e93 70%, #d6d6da 100%);
  box-shadow:
    0 0 0 1px #5e5e62,
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 16px 36px rgba(0, 0, 0, 0.18);
}

.phone__bezel {
  height: 100%;
  padding: 12px;
  border-radius: 60px;
  background: #0b0b0b;
}

.phone__screen {
  position: relative;
  width: 393px;
  height: 852px;
  overflow: hidden;
  border-radius: 48px;
  background: #fff;
}

.phone__viewport {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.phone__screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.phone__island {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 50%;
  width: 126px;
  height: 37px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  pointer-events: none;
}

.phone__btn {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(#4a4a4e, #1c1c1e);
}

.phone__btn--silent {
  left: -3px;
  top: 156px;
  height: 28px;
}

.phone__btn--up {
  left: -3px;
  top: 204px;
  height: 56px;
}

.phone__btn--down {
  left: -3px;
  top: 272px;
  height: 56px;
}

.phone__btn--power {
  right: -3px;
  top: 238px;
  height: 90px;
}

a.artifact__site {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 160px);
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.15);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.artifact__site img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.artifact__site--phone img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.artifact__view--image {
  background: transparent;
  border: 0;
  overflow: visible;
}

.artifact__view--image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh / var(--page-zoom, 1) - 180px);
  object-fit: contain;
}

.artifact__pair {
  display: flex;
  align-items: stretch;
  gap: 24px;
  height: calc(100vh / var(--page-zoom, 1) - 210px);
}

.artifact__pair .artifact__view--pdf {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 100%;
}

.artifact__pair .artifact__view--pdf iframe {
  height: 100%;
}

.artifact__pair .artifact__view--image {
  flex: 0 0 380px;
  width: 380px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artifact__pair .artifact__view--image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.artifact__caption {
  margin: 16px 0 0;
  max-width: 1260px;
  font-family: "Sen", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 18.05px;
  letter-spacing: 0;
  color: rgba(26, 26, 26, 1);
}

.artifact--phone {
  position: relative;
}

.artifact__caption--phone {
  position: absolute;
  left: calc(50% + 427px * var(--phone-scale) / 2 + 28px);
  right: 0;
  bottom: 0;
  margin: 0;
  max-width: none;
}

html.is-portrait {
  --pad: 20px;
  --h1: 34px;
  --h2: 26px;
}

html.is-compact {
  --pad: 16px;
  --h1: 30px;
  --h2: 24px;
}

html.is-tablet {
  --pad: 40px;
  --h1: 48px;
  --h2: 34px;
}

html.is-portrait body,
html.is-portrait .scale-root {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

html.is-portrait .page {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  height: auto !important;
}

html.is-portrait .sticky-header {
  position: sticky;
  top: 0;
  height: auto;
  z-index: 1000;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.08);
}

html.is-portrait .sticky-header__inner {
  position: relative;
  left: auto;
  top: auto;
  width: 100% !important;
  height: auto !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 10px var(--pad);
  background: var(--paper);
}

html.is-portrait .sticky-header .layer:not(.text) {
  display: none !important;
}

html.is-portrait .sticky-header .layer.text {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

html.is-portrait .portrait-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

html.is-portrait .portrait-nav .hotspot {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
}

html.is-phone .sticky-header .layer.text:nth-child(2) {
  flex: 1 0 100%;
  font-size: 18px !important;
}

html.is-compact .sticky-header .layer.text {
  font-size: 14px !important;
}

html.is-compact .sticky-header .layer.text:nth-child(2) {
  font-size: 18px !important;
}

html.is-portrait .portrait-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 8px var(--pad) 72px;
}

html.is-portrait .portrait-flow > :not(.portrait-anchor) {
  margin-bottom: 14px;
}

html.is-portrait .portrait-flow .layer,
html.is-portrait .portrait-flow .anchor,
html.is-portrait .portrait-flow .artifacts,
html.is-portrait .portrait-flow .fiction-frame {
  position: relative !important;
  left: auto !important;
  top: auto !important;
}

html.is-portrait .portrait-hide {
  display: none !important;
}

html.is-portrait .portrait-anchor {
  height: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0;
  overflow: visible;
  scroll-margin-top: 88px;
}

html.is-portrait .portrait-flow .layer.text {
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  margin: 0 0 14px;
  font-size: 16px !important;
  line-height: 1.45 !important;
  white-space: pre-wrap;
  text-box-trim: none;
  text-box-edge: auto;
}

html.is-portrait .portrait-flow h1.layer.text {
  font-size: var(--h1) !important;
  line-height: 1.12 !important;
  margin: 4px 0 8px;
}

html.is-portrait .portrait-flow h2.layer.text {
  font-size: var(--h2) !important;
  line-height: 1.15 !important;
  margin: 36px 0 8px;
}

html.is-portrait .portrait-flow .layer.text span {
  font-size: inherit !important;
  line-height: inherit !important;
}

html.is-portrait .portrait-flow .layer.text span[style*="font-size:7px"] {
  display: none !important;
}

html.is-portrait .portrait-media,
html.is-portrait .portrait-svg,
html.is-portrait .portrait-figure {
  width: 100% !important;
  height: auto !important;
  margin: 0;
}

html.is-portrait .portrait-media,
html.is-portrait .portrait-svg {
  aspect-ratio: var(--ar, 3 / 2);
  overflow: hidden;
  border-radius: 12px;
}

html.is-portrait .portrait-media img,
html.is-portrait .portrait-media video,
html.is-portrait .portrait-media .phone-poster,
html.is-portrait .portrait-svg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html.is-portrait .portrait-bleed {
  width: calc(100% + (2 * var(--pad))) !important;
  max-width: none;
  margin-left: calc(var(--pad) * -1);
  border-radius: 0;
}

html.is-portrait .portrait-phone {
  width: min(100%, 280px) !important;
  margin-left: auto;
  margin-right: auto;
}

html.is-portrait .portrait-figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html.is-portrait .portrait-figure .layer.text {
  font-size: 15px !important;
  line-height: 1.35 !important;
}

html.is-portrait .portrait-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

html.is-portrait .portrait-inline .layer.text,
html.is-portrait .portrait-meta .layer.text,
html.is-portrait .portrait-btn .layer.text {
  width: auto !important;
  margin: 0;
}

html.is-portrait .portrait-icon {
  position: relative !important;
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px;
}

html.is-portrait .portrait-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

html.is-portrait .portrait-meta .layer.text:first-child {
  flex: 1 1 auto;
}

html.is-portrait .portrait-meta .layer.text:last-child {
  flex: 0 0 auto;
  font-size: 13px !important;
  line-height: 1.3 !important;
  text-align: right;
}

html.is-portrait .portrait-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 52px;
  margin: 8px 0 4px;
  padding: 12px 22px;
  border: 2px solid #6e6e6e;
  border-radius: 33px;
  background: #fdfbf7;
  color: #1a1a1a;
  text-decoration: none;
  pointer-events: auto;
}

html.is-portrait .portrait-btn .layer.text {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 18px !important;
  font-weight: 500;
  line-height: 1.2 !important;
}

html.is-compact .portrait-btn .layer.text {
  font-size: 16px !important;
}

html.is-portrait .portrait-link {
  position: relative;
}

html.is-portrait .portrait-link .hotspot {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
}

html.is-portrait .portrait-cue {
  width: 100% !important;
  margin: 28px 0 4px;
  text-align: center;
}

html.is-portrait .portrait-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 18px;
}

html.is-portrait .portrait-card h2.layer.text {
  margin-top: 0;
}

html.is-tablet .portrait-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

html.is-tablet .portrait-card .portrait-media {
  height: 360px !important;
  aspect-ratio: auto;
}

html.is-portrait .portrait-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

html.is-tablet .portrait-row {
  flex-direction: row;
  align-items: stretch;
}

html.is-tablet .portrait-row > * {
  flex: 1 1 0;
  min-width: 0;
}

html.is-portrait .fiction-frame {
  container-type: inline-size;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--fw) / var(--fh);
  overflow: hidden;
}

html.is-portrait .portrait-frame-fit {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transform: scale(calc(100cqw / (var(--fw) * 1px)));
}

html.is-portrait .artifacts {
  width: 100% !important;
  margin-top: 12px;
}

html.is-portrait .artifact {
  margin: 0 0 36px;
}

html.is-portrait .artifact__pair {
  flex-direction: column;
  height: auto;
  gap: 16px;
}

html.is-portrait .artifact__pair .artifact__view--pdf,
html.is-portrait .artifact__pair .artifact__view--image {
  width: 100%;
  flex: none;
  height: auto;
}

html.is-portrait .artifact__view iframe,
html.is-portrait a.artifact__site,
html.is-portrait .artifact__pair .artifact__view--pdf iframe {
  height: 62vh;
}

html.is-portrait .artifact__caption,
html.is-portrait .artifact__caption--phone {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: none;
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.4;
}

html.is-portrait .back-to-top {
  top: auto !important;
  right: 16px !important;
  bottom: 16px !important;
  left: auto !important;
  width: 41px !important;
  height: 41px !important;
}

html.is-portrait .back-to-fiction {
  top: auto !important;
  bottom: 16px !important;
  left: 16px !important;
  width: 41px !important;
  height: 41px !important;
}