.project-context__texts {
  inset: clamp(28px, 4svh, 48px) 0 max(82px, 11.5svh);
  width: min(calc(100% - 64px), 39rem);
  margin-inline: auto;
  gap: clamp(14px, 2.2svh, 22px);
  visibility: visible;
  text-align: left;
}
.project-context__title {
  margin: 0;
  color: var(--case-brand, var(--project-color));
  font-size: clamp(2.4rem, min(6.2vw, 8.6svh), 5rem);
  font-weight: 620;
  letter-spacing: -.055em;
  line-height: .96;
}
.project-context__categories { position: static; align-items: start; }
.project-context__category {
  border-width: 1px;
  border-radius: 4px;
  padding: .4em .85em;
  font: 550 13px/1.15 var(--case-type, Satoshi-Variable, Arial, sans-serif);
  text-align: left;
}
.project-context__text {
  font-size: clamp(15px, 1.12vw, 17px);
  line-height: 1.56;
  text-wrap: pretty;
  hanging-punctuation: first last;
}
.project-context__eyebrow { display: block; margin-bottom: .45em; color: var(--case-brand, #1641da); font-size: .74em; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.project-context__credit,
.project-context__outcome {
  padding-top: clamp(10px, 1.5svh, 16px);
  border-top: 1px solid var(--case-border, rgba(163, 183, 207, .35));
}
.case-impact-stat {
  display: block;
  margin-bottom: .16em;
  color: var(--case-brand, #1641da);
  font-family: var(--case-display, Satoshi-Variable, Arial, sans-serif);
  font-size: clamp(2rem, 3.6vw, 3.3rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.project-context__agency { display: block; margin-top: .5em; font-size: .92em; opacity: .72; }
.project-context__text:last-of-type { margin-bottom: 0; }
.project-context__outcome { font-size: clamp(14.5px, 1.08vw, 16.5px); }
.project-context__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-block: 2px; }
.project-chapters {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 20px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--case-ink, #142344) 16%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--case-paper, #e7eef7) 90%, transparent);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  counter-reset: chapter-step;
}
.project-chapters button {
  position: relative;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 13px;
  background: transparent;
  color: var(--case-ink, #142344);
  font: 550 13px/1 var(--case-type, Satoshi-Variable, Arial, sans-serif);
  cursor: pointer;
  counter-increment: chapter-step;
  transition: color .22s cubic-bezier(.66,0,.01,1), border-color .2s ease;
}
.project-chapters button::before {
  content: "0" counter(chapter-step) " ";
  opacity: .46;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
.project-chapters button:hover:not([aria-current="step"]) {
  border-style: dotted;
  border-color: color-mix(in srgb, var(--case-brand, #1641da) 55%, transparent);
}
.project-chapters button[aria-current="step"] { color: var(--case-on-brand, #e7eef7); background: var(--case-brand, #1641da); }
.project-chapters button[aria-current="step"]::before { opacity: .78; }
.project-chapters button:focus-visible { outline: 2px solid var(--case-brand, #1641da); outline-offset: 2px; }
@media (min-width: 901px) and (min-height: 651px), (min-width: 1025px) {
  .project-context__texts { justify-content: safe center; overflow-y: auto; }
  .project-context__texts[data-lenis-prevent] {
    padding-bottom: 24px;
    overscroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--case-border) transparent;
  }
  .project-context__texts.is-scroll-clipped {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent);
  }
}
@media (min-width: 1025px) and (max-height: 760px), (min-width: 901px) and (min-height: 651px) and (max-height: 760px) {
  .project-context__text { font-size: 14px; line-height: 1.4; }
}
@media (max-width: 900px), (max-width: 1024px) and (max-height: 650px) {
  .project-context__texts { width: min(100%, 29rem); gap: 16px; }
  .project-context__text { font-size: 17px; }
  .project-context__actions { justify-content: center; }
  .project-chapters { bottom: 16px; }
}
@media (max-width: 600px) {
  .project-chapters { left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 20px); }
  .project-chapters button { padding: 7px 9px; font-size: 11px; white-space: nowrap; }
}
.project-chapters { isolation: isolate; overflow: clip; }
.project-chapters::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--case-brand, #1641da);
  opacity: .55;
  transform: scaleX(var(--chapter-progress, 0));
  transform-origin: left center;
  pointer-events: none;
}
.project-chapters__indicator { position: absolute; z-index: 0; border-radius: 3px; background: var(--case-brand, #1641da); pointer-events: none; opacity: 0; }
.project-chapters button { position: relative; z-index: 1; }
.project-chapters.has-indicator button[aria-current="step"] { background: transparent; }

.project-detail {
  display: grid;
  align-content: center;
  justify-content: stretch;
  gap: clamp(18px, 3.2svh, 36px);
  max-width: 1440px;
  padding: clamp(92px, 12svh, 128px) clamp(32px, 6vw, 104px) clamp(82px, 11svh, 118px);
}

.project-detail h2 {
  margin: 0;
  color: var(--case-brand);
  font-size: clamp(2rem, min(4.3vw, 7.2svh), 4.25rem);
  font-weight: 620;
  letter-spacing: -.05em;
  line-height: 1.02;
  text-wrap: balance;
}

.project-detail__stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-detail__stage {
  margin: 0;
}

.project-detail__media {
  display: grid;
  place-items: center;
  height: clamp(140px, 33svh, 320px);
  overflow: hidden;
  border: 1px solid var(--case-border);
  border-radius: 6px;
  background: radial-gradient(ellipse at top left, var(--case-paper), var(--case-tint));
}

.project-detail__media img,
.project-detail__media video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.project-detail__stage figcaption {
  margin-top: clamp(14px, 2.4svh, 24px);
  padding-top: .85em;
  border-top: 1px solid var(--case-border);
}

.project-detail__step {
  display: inline-block;
  margin-bottom: .6em;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--case-brand);
  color: var(--case-on-brand, #e7eef7);
  font: 700 11px/1.1 var(--case-type, Satoshi-Variable, Arial, sans-serif);
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}

.project-detail__stage h3 {
  margin: 0 0 .38em;
  font-size: clamp(1.12rem, 1.55vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -.024em;
  line-height: 1.15;
  text-wrap: balance;
}

.project-detail__stage p {
  margin: 0;
  font-size: clamp(.9rem, 1.06vw, 1.02rem);
  font-weight: 450;
  line-height: 1.54;
  text-wrap: pretty;
}

@media (min-width: 1025px) and (max-height: 680px), (min-width: 901px) and (min-height: 651px) and (max-height: 680px) {
  .project-context__title { font-size: clamp(2.5rem, 9svh, 4rem); }
  .project-detail {
    gap: clamp(12px, 2svh, 16px);
    padding-block: max(58px, 10svh) max(70px, 10svh);
  }
  .project-detail__media { height: clamp(100px, 28svh, 200px); }
}

[data-personal-project="adita"] .project-detail__media {
  border: 0;
}

[data-personal-project="adita"] .project-detail__media img,
[data-personal-project="adita"] .project-detail__media video {
  object-fit: cover;
}

[data-personal-project="vibe"] .project-detail__media {
  background: #1a1515;
}

[data-personal-project="vibe"] .project-detail__stages li:first-child .project-detail__media {
  background: #303030;
}

[data-personal-project="vibe"] .project-detail__stages li:last-child img {
  object-fit: cover;
  object-position: 50% 62%;
}

[data-personal-project="grab"] .project-detail__media {
  position: relative;
  isolation: isolate;
}

[data-personal-project="grab"] .project-detail__media::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: center / cover no-repeat;
  filter: blur(14px) brightness(.8);
  z-index: -1;
}
[data-personal-project="grab"] .project-detail__stages li:nth-child(1) .project-detail__media::before {
  background-image: url("/identity/projects/grab/workflow-sketch.webp");
}
[data-personal-project="grab"] .project-detail__stages li:nth-child(2) .project-detail__media::before {
  background-image: url("/identity/projects/grab/workflow-final.webp");
}
[data-personal-project="grab"] .project-detail__stages li:nth-child(3) .project-detail__media::before {
  background-image: url("/identity/projects/grab/case-detail-social-formats.webp");
}

@media (max-width: 900px), (max-width: 1024px) and (max-height: 650px) {
  .project-detail {
    gap: 24px;
    max-width: 42rem;
    padding: clamp(34px, 9svh, 62px) clamp(6px, 2vw, 18px) 10px;
  }
  .project-detail h2 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
  .project-detail__stages { grid-template-columns: 1fr; gap: 30px; }
  .project-detail__media { height: auto; aspect-ratio: 3 / 2; }
  .project-detail__stage p { font-size: 1rem; }
}

@media (max-width: 360px) {
  .project-chapters:has([data-project-chapter="details"]) button { padding-inline: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-detail { opacity: 1 !important; transform: none !important; }
}

[data-personal-project] .project-gallery { overflow: clip; }

.project-gallery__stages {
  display: flex;
  flex-direction: column;
  width: min(100%, 1440px);
  height: 100%;
}

[data-personal-project="adita"] .project-gallery__stages {
  width: min(100%, 1680px);
}

.project-gallery__stage {
  position: relative;
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: minmax(210px, .44fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5.5vw, 88px);
  box-sizing: border-box;
  min-height: 0;
  margin: 0;
  padding: clamp(36px, 8.5svh, 92px) clamp(32px, 7vw, 104px) clamp(80px, 10.5svh, 116px);
}

.project-gallery__notes,
.project-gallery__art { position: relative; z-index: 1; }
.project-gallery__notes { max-width: 39ch; }

.grab-youtube-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  background: #dceee1;
  transition: opacity .9s ease;
  pointer-events: none;
}
.grab-youtube-backdrop.is-active { opacity: 1; }
.grab-youtube-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(226, 241, 230, .7);
}
.grab-youtube-backdrop iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78svh);
  height: max(100svh, 56.25vw);
  border: 0;
  transform: translate(-50%, -50%);
}

.grab-reels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 22px);
  width: 100%;
  height: 100%;
  min-width: 0;
}
.grab-reel-poster {
  flex: 0 1 auto;
  width: min(50%, 34svh);
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: 74svh;
  max-width: min(50%, 34svh);
  overflow: hidden;
  border-radius: clamp(14px, 1.75vw, 26px);
  background: #12382b;
}
.grab-reel-poster img,
.grab-reel-video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.grab-reel-video {
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain !important;
}

@media (max-width: 700px) {
  .grab-reels { gap: 8px; }
  .grab-reel-poster { width: calc(50% - 4px); max-width: 34svh; }
}

.project-gallery__notes h3 {
  margin: 0 0 .45em;
  color: var(--case-brand);
  font-size: clamp(1.65rem, min(3.7vw, 5.8svh), 3.45rem);
  font-weight: 650;
  letter-spacing: -.04em;
  line-height: 1.05;
  text-wrap: balance;
}

.project-gallery__notes p {
  margin: 0;
  font-size: clamp(.95rem, 1.16vw, 1.12rem);
  font-weight: 450;
  line-height: 1.56;
  text-wrap: pretty;
  hanging-punctuation: first last;
}

.project-gallery__art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.project-gallery__artwork {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: clamp(14px, 1.75vw, 26px);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--case-ink) 14%, transparent);
  object-fit: contain;
}

.project-gallery__video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0b1c22;
}

.adita-education-grid,
.adita-recipe-grid {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  justify-items: center;
}
.adita-education-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adita-recipe-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3svh, 36px);
}
.adita-recipe-video:nth-child(odd) { justify-self: end; }
.adita-recipe-video:nth-child(even) { justify-self: start; }
.adita-education-grid img {
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.adita-education-grid:has(> :nth-child(3)) img:nth-child(-n+4) { align-self: end; }
.adita-education-grid:has(> :nth-child(3)) img:nth-child(n+5) { align-self: start; }
.adita-recipe-video {
  position: relative;
  width: auto;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
}
.adita-recipe-grid video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #18251d;
}
.adita-education-grid:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}

.adita-openhouse {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.adita-openhouse__slides {
  flex: 1;
  min-height: 0;
  width: 100%;
}
.adita-openhouse-slide:not([hidden]) {
  display: flex;
  justify-content: center;
  height: 100%;
}
.adita-warp {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  touch-action: pan-y;
}
.adita-warp__stage {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  perspective: 1000px;
  overflow: hidden;
}
.adita-warp__card {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 94%;
  width: min(52%, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: transform, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.adita-warp__image {
  position: relative;
  display: flex;
  max-width: 100%;
  max-height: 100%;
}
.adita-warp__card img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(24, 51, 34, .16);
}
.adita-dragon-pair {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  width: 100%;
  height: 100%;
  min-height: 0;
}

.adita-dragon-pair .project-gallery__artwork {
  width: auto;
  height: auto;
  max-width: calc(50% - 8px);
  max-height: 100%;
  object-fit: contain;
}

.adita-dragon-video {
  position: relative;
  max-width: calc(50% - 8px);
  max-height: 100%;
}
.adita-dragon-video .project-gallery__artwork {
  width: 100%;
  max-width: 100%;
  max-height: min(100%, 70svh);
}
.grab-environment-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 16px);
  width: 100%;
  height: 100%;
  min-height: 0;
}
.grab-environment-pair .project-gallery__artwork {
  width: auto;
  max-width: calc(50% - 8px);
  max-height: min(100%, 70svh);
  object-fit: contain;
}
.grab-environment-pair__video {
  aspect-ratio: 9 / 16;
  background: #e6f4ea;
}
.grab-meong-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 16px);
  width: 100%;
  height: 100%;
  min-height: 0;
}
.grab-meong-pair .project-gallery__artwork {
  width: auto;
  max-width: calc(50% - 8px);
  max-height: min(100%, 70svh);
  object-fit: contain;
}
.grab-meong-pair__video {
  aspect-ratio: 9 / 16;
  background: #e6f4ea;
}
.adita-dragon-volume {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .72);
  color: white;
  font-size: 12px;
}
.adita-dragon-volume input { width: 65px; accent-color: white; }

.project-next__medias--stickers .project-next__media {
  border-radius: 0;
  max-width: min(23vw, 240px);
  object-fit: contain;
  filter: drop-shadow(0 5px 10px #1423362e);
}

.project-next__medias--stickers .project-next__media:first-child { z-index: 2; }
.project-next__link:has(.project-next__medias--stickers) .project-next__word--left { margin-inline-end: .12em; }
.project-next__link:has(.project-next__medias--stickers):focus-visible { outline: none; }
.project-next__link:has(.project-next__medias--stickers):focus-visible .project-next__project-name {
  outline: 2px solid var(--case-brand);
  outline-offset: 6px;
  border-radius: 3px;
}
.project-next__contact {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: clamp(76px, 10svh, 112px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--case-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--case-paper) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--case-brand);
  font: 600 13px/1.2 var(--case-type, Satoshi-Variable, Arial, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.project-next__contact:hover {
  background: var(--case-brand);
  border-color: var(--case-brand);
  color: var(--case-on-brand);
}

@media (min-width: 901px) and (min-height: 651px), (min-width: 1025px) {
  [data-personal-project="adita"] .project-gallery__stage:has(.adita-education-grid) {
    grid-template-columns: minmax(210px, .32fr) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 48px);
    padding-inline: clamp(32px, 4vw, 64px);
  }
  .project-next__link:has(.project-next__medias--stickers) .project-next__title { font-size: min(10vw, 145px); }
  .project-next__medias--stickers .project-next__media { height: min(15vw, 23svh); }
}

@media (max-width: 900px), (max-width: 1024px) and (max-height: 650px) {
  [data-personal-project] .project-back {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 64px));
    width: 44px;
    height: 44px;
  }
  [data-personal-project] .project-panel--gallery {
    padding: 0;
  }
  .project-gallery__stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: center;
    justify-items: center;
    gap: 14px;
    padding: clamp(26px, 7svh, 66px) clamp(18px, 5vw, 40px) clamp(84px, 12svh, 110px);
  }
  .project-gallery__art { order: -1; width: 100%; height: 100%; }
  .project-gallery__artwork { max-height: min(100%, 56svh); }
  .project-gallery__notes { max-width: 40ch; width: 100%; text-align: center; }
  .project-gallery__notes h3 { font-size: clamp(1.55rem, 5.6vw, 2.5rem); }
  [data-personal-project] .project-panel--next {
    margin-top: 0;
    height: auto;
    padding-top: clamp(36px, 7svh, 64px);
  }
  [data-personal-project] .project-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 82svh;
    padding-bottom: max(96px, calc(env(safe-area-inset-bottom) + 84px));
  }
  .project-next__medias--stickers { width: min(86vw, 420px); height: min(43svh, 380px); }
  .project-next__medias--stickers .project-next__media { max-width: none; }
  .project-next__medias--stickers .project-next__media:first-child { width: 39%; top: 24%; left: 29%; transform: rotate(-7deg); }
  .project-next__medias--stickers .project-next__media:nth-child(2) { width: 31%; top: 5%; right: 4%; transform: rotate(12deg); }
  .project-next__medias--stickers .project-next__media:nth-child(3) { width: 35%; top: 2%; left: 2%; transform: rotate(-12deg); }
  .project-next__medias--stickers .project-next__media:nth-child(4) { width: 37%; top: 50%; left: 62%; transform: rotate(8deg); }
  .project-next__medias--stickers .project-next__media:nth-child(5) { width: 34%; top: 50%; right: auto; bottom: auto; left: 3%; transform: rotate(-11deg); }
  .project-next__contact {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin: 28px auto 0;
    white-space: normal;
    text-align: center;
    justify-content: center;
    max-width: calc(100vw - 32px);
  }
}
