:root {
  --bg: #fffdf8;
  --ink: #1b1b1f;
  --muted: #55555c;
  --mint: #c9e0d8;
  --mint-deep: #5f9684;
  --rose: #cdaabc;
  --sage: #e2dec1;
  --mauve: #c3a1b4;
  --pink: #b0708a;
  --card: #fffdf8;
  --ph: #d9d9dc;
  --green: #cae1d9;
  --green-text: #ffffff;
  --on-green: #14201c;
  --hand: "Shantell Sans", cursive;
  font-weight: 500;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scrollbar-color: #c3a1b4 #fffdf8;
  scroll-padding-top: env(safe-area-inset-top, 0px);
  scroll-behavior: smooth;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--mint-deep);
  outline-offset: 4px;
}
.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 5vw, 4rem);
}
.waves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 34px,
    rgba(180, 191, 221, 0.9) 34px 35px
  );
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}
.more {
  font-family: var(--hand);
  font-size: 1.7rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--mint-deep);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

/* header */
header {
  position: relative;
  display: flex;
  gap: clamp(1.5rem, 6vw, 5rem);
  padding: 1.4rem clamp(1.2rem, 5vw, 4rem);
  align-items: center;
}
.logo {
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: auto;
  text-decoration: none;
}
nav {
  display: flex;
  gap: clamp(1rem, 5vw, 4rem);
}
nav a {
  display: inline-block;
  min-width: 7rem;
  font-size: 0.85rem;
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--ink);
}
nav a[aria-current] {
  font-family: var(--hand);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--mint-deep);
  border-bottom: none;
  padding-bottom: 0.45rem;
}
/* nav letters jitter like the hero text: on hover, and in a quick wave when a link is clicked */
nav a .ch.jig {
  animation: jig 0.6s ease-in-out both;
}
@media (prefers-reduced-motion: reduce) {
  nav a .ch.jig {
    animation: none;
  }
}

/* hero */
.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 6rem);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 2rem;
  align-items: center;
}
h1 {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0 0 1.2rem;
}
h1 .hand {
  font-family: var(--hand);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--rose);
  font-size: 1.12em;
}
.tagline {
  font-size: 0.9rem;
  margin: 0;
}
.squares {
  position: relative;
  aspect-ratio: 1;
  max-width: 20rem;
  width: 100%;
  justify-self: center;
}
.sq {
  position: absolute;
  border-radius: 6px;
  width: 48%;
  aspect-ratio: 1;
}
.sq.a {
  background: var(--sage);
  top: 4%;
  left: 8%;
}
.sq.b {
  background: var(--mint);
  top: 22%;
  right: 0;
  width: 56%;
}
.sq.c {
  background: var(--mauve);
  top: 46%;
  left: 2%;
  width: 42%;
}

/* hero hover: only the letter under the cursor jiggles; "Create," letters also glow */
.w {
  display: inline-block;
  cursor: default;
}
.ch {
  display: inline-block;
  transition: text-shadow 0.8s;
}
.ch.jig {
  animation: jig 0.6s ease-in-out;
}
.w.glow .ch:hover {
  text-shadow:
    0 0 0.12em #ecdbe4,
    0 0 0.35em #dcc0cf,
    0 0 0.8em rgba(205, 170, 188, 0.7);
  transition-duration: 0.2s;
}
@keyframes jig {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  20% {
    transform: translateY(-0.09em) rotate(-7deg);
  }
  45% {
    transform: translateY(-0.03em) rotate(6deg);
  }
  70% {
    transform: translateY(-0.05em) rotate(-3deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ch.jig {
    animation: none;
  }
}

.bold {
  font-weight: 600;
}

/* custom cursor (mouse only): a pointer that turns to face the direction you move */
.cursor {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  *,
  *::before,
  *::after {
    cursor: none !important;
  }
  .cursor {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .cursor.on {
    opacity: 1;
  }
  .cursor svg {
    display: block;
    width: 100%;
    height: 100%;
    rotate: var(--r, 0deg);
    scale: var(--sc, 1);
    transition: scale 0.3s cubic-bezier(0.3, 0.1, 0.2, 1);
    overflow: visible;
  }
  .cursor path {
    fill: #1b1b1f;
    stroke: #1b1b1f;
    transition:
      fill 0.3s,
      stroke 0.3s;
  }
  .cursor.frame {
    --sc: 1.7;
  }
  .cursor.frame path {
    fill: #6fa593;
    stroke: #6fa593;
  }
}

/* projects */
.projects {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  margin-bottom: 2.5rem;
}
h2.big {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--rose);
  margin: 0;
}
.curl {
  width: clamp(4rem, 14vw, 10rem);
  height: auto;
  display: block;
}
.curl.r {
  transform: scaleX(-1);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
  text-align: left;
  margin-bottom: 2.5rem;
}
.card {
  position: relative;
  aspect-ratio: 3/4;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: block;
  width: 100%;
  rotate: var(--r, 0deg);
}
.card:nth-child(4n + 1) {
  --r: -2deg;
}
.card:nth-child(4n + 2) {
  --r: 1.5deg;
}
.card:nth-child(4n + 3) {
  --r: -1deg;
}
.card:nth-child(4n) {
  --r: 2deg;
}
.inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* each side turns on its own (no 3D nesting), so after the flip the back is a plain, clickable layer */
  transition: transform 0.7s cubic-bezier(0.3, 0.1, 0.2, 1);
}
/* FRONT: put your project image here with style="--img:url(project1.jpg)" */
.front {
  transform: perspective(1100px) rotateY(0deg);
  background: #e2dec1;
  justify-content: flex-end;
  padding: 1rem;
}
.front canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.front b {
  position: relative;
  pointer-events: none;
}
.hint {
  font-family: var(--hand);
  font-size: 1.4rem;
  color: var(--mint-deep);
  margin: -1.2rem 0 1.5rem;
}
.front b {
  font-family: var(--hand);
  font-size: 1.5rem;
  color: #1b1b1f;
  background: var(--card);
  padding: 0.1rem 0.7rem;
  border-radius: 4px;
  align-self: flex-start;
  rotate: -2deg;
}
/* only the face you can see takes clicks (some browsers get confused by 3D-flipped links) */
.card.flipped .front {
  pointer-events: none;
  transform: perspective(1100px) rotateY(180deg);
}
.card.flipped .back {
  transform: perspective(1100px) rotateY(0deg);
}
.card:not(.flipped) .back {
  pointer-events: none;
}
.back {
  background: var(--card);
  transform: perspective(1100px) rotateY(-180deg);
  border: 2px solid var(--c, var(--mint));
  padding: 1.3rem;
  justify-content: space-between;
}
.back h3 {
  font-family: var(--hand);
  font-size: 1.9rem;
  line-height: 1.05;
  margin: 0 0 0.5rem;
}
.back p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.back .go {
  font-family: var(--hand);
  font-size: 1.4rem;
  font-weight: 700;
}
.back a.go {
  color: inherit;
  text-decoration: none;
  align-self: flex-start;
}
.back a.go:hover,
.back a.go:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* about */
.about {
  background: var(--green);
  color: var(--on-green);
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 0;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.photo {
  aspect-ratio: 1;
  background: var(--card);
  border-radius: 6px;
  rotate: -1.5deg;
  display: grid;
  place-items: center;
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}
.about h2 {
  font-family: var(--hand);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 0.6rem;
  line-height: 1;
}
.about p {
  margin: 0 0 1.2rem;
  max-width: 38rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.65;
}
.about .more {
  text-decoration-color: var(--on-green);
}
.word {
  white-space: nowrap;
  font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--green-text);
  margin-top: clamp(1.5rem, 4vw, 3rem);
  user-select: none;
}
.track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.set {
  flex: none;
  display: flex;
}
.word span {
  display: inline-block;
  margin-right: 0.18em;
}

/* contact */
.cta {
  position: relative;
  padding: clamp(6rem, 16vw, 14rem) 0 clamp(6rem, 16vw, 14rem);
}
.cta .wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: center;
  justify-content: flex-start;
}
.cta h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
  max-width: 30rem;
}
.cta h2 em {
  font-family: var(--hand);
  font-style: normal;
  font-weight: 300;
  color: var(--pink);
  font-size: 1.15em;
}
.hi {
  margin-left: clamp(0rem, 8vw, 7rem);
  font-family: var(--hand);
  font-size: 1.8rem;
  font-weight: 500;
  text-decoration: none;
  color: #1b1b1f;
  background: var(--mint);
  padding: 0.4rem 1.6rem;
  border-radius: 999px 999px 999px 8px;
  rotate: -5deg;
  transition:
    rotate 0.2s,
    scale 0.2s;
}
.hi:hover {
  rotate: 0deg;
  scale: 1.05;
}
.mail {
  display: block;
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

/* footer */
footer {
  background: var(--green);
  color: var(--on-green);
  padding: 2.5rem 0 1.5rem;
  font-size: 1rem;
}
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
footer h3 {
  font-size: 1rem;
  margin: 0 0 0.6rem;
}
footer a {
  display: block;
  text-decoration: none;
  color: var(--on-green);
  padding: 0.15rem 0;
}
footer a:hover {
  text-decoration: underline;
}
.copy {
  text-align: center;
  font-size: 0.8rem;
  margin: 0;
}

/* legal pages (terms, cookies) */
.legal {
  position: relative;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(4rem, 9vw, 8rem);
}
.legal .wrap {
  position: relative;
  max-width: 46rem;
}
.legal h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 0.5rem;
}
.legal .updated {
  font-family: var(--hand);
  font-size: 1.2rem;
  color: var(--mint-deep);
  margin: 0 0 2.2rem;
}
.legal h2 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 2.4rem 0 0.4rem;
}
.legal p,
.legal li {
  line-height: 1.75;
  margin: 0 0 0.9rem;
}
.legal ul {
  padding-left: 1.2rem;
  margin: 0 0 0.9rem;
}
.legal a {
  text-decoration-color: var(--mint-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* about page */
.page-hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}
.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.intro .photo {
  background: var(--sage);
  position: relative;
}
.intro h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
}
.intro .hand {
  color: var(--rose);
}
.lead {
  font-size: 1.2rem;
}
.block {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.block .wrap {
  position: relative;
}
.block h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 0.7rem;
}
.block h2 .hand {
  font-family: var(--hand);
  color: var(--rose);
  font-size: 1.1em;
}
.story,
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.facts h3,
.details h3 {
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--mint-deep);
  margin: 0 0 0.3rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.chips li {
  font-family: var(--hand);
  background: var(--mint);
  padding: 0.3rem 1.1rem;
  border-radius: 999px 999px 999px 6px;
}
.chips li:nth-child(3n + 2) {
  background: var(--sage);
}
.chips li:nth-child(3n) {
  background: var(--mauve);
}
.reel {
  overflow: hidden;
  padding: 2rem 0;
}
.reel-track {
  display: flex;
  gap: 1.2rem;
  width: max-content;
  animation: reel 45s linear infinite;
}
.reel:hover .reel-track {
  animation-play-state: paused;
}
@keyframes reel {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
.shot {
  flex: none;
  width: clamp(11rem, 22vw, 16rem);
  aspect-ratio: 3/4;
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--hand);
  background: var(--mint);
  rotate: -2deg;
}
.shot:nth-child(3n + 2) {
  background: var(--sage);
  rotate: 1.5deg;
}
.shot:nth-child(3n) {
  background: var(--mauve);
  rotate: -1deg;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 5rem;
  justify-content: space-between;
}
.contact .hi {
  display: inline-block;
  margin: 0.8rem 0 0;
}
.details a {
  display: block;
  padding: 0.15rem 0;
}
@media (max-width: 760px) {
  .intro {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reel {
    overflow-x: auto;
  }
  .reel-track {
    animation: none;
  }
}

/* page-load wave: the four site colours stack up, then the page appears */
.page-wave {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  overflow: hidden;
  transition: opacity 0.5s ease;
}
.page-wave.done {
  opacity: 0;
  pointer-events: none;
}
.page-wave i {
  position: absolute;
  inset: 0;
  background: var(--c);
  transform: translateY(calc(100% + 90px));
  animation: wave-up 1s cubic-bezier(0.5, 0, 0.2, 1) var(--d) forwards;
}
.page-wave i::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 90px;
  background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 90' preserveAspectRatio='none'%3E%3Cpath d='M0 45 Q100 0 200 45 T400 45 V90 H0 Z'/%3E%3C/svg%3E")
    repeat-x 0 0 / 400px 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 90' preserveAspectRatio='none'%3E%3Cpath d='M0 45 Q100 0 200 45 T400 45 V90 H0 Z'/%3E%3C/svg%3E")
    repeat-x 0 0 / 400px 100%;
  animation: wave-flow 1.4s linear infinite;
}
.page-wave i:nth-child(1) {
  --c: #e2dec1;
  --d: 0s;
}
.page-wave i:nth-child(2) {
  --c: #c9e0d8;
  --d: 0.2s;
}
.page-wave i:nth-child(3) {
  --c: #c3a1b4;
  --d: 0.4s;
}
.page-wave i:nth-child(4) {
  --c: #fffdf8;
  --d: 0.6s;
}
@keyframes wave-up {
  to {
    transform: translateY(0);
  }
}
@keyframes wave-flow {
  to {
    -webkit-mask-position: -400px 0;
    mask-position: -400px 0;
  }
}

/* cookie popup */
.consent {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 9000;
  width: min(25rem, calc(100vw - 2rem));
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 6px 22px 22px 22px;
  padding: 1.2rem 1.3rem 1.3rem;
  box-shadow: 6px 6px 0 var(--mint);
  transform: translateY(1.5rem);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1),
    opacity 0.3s;
}
.consent.show {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.consent h2 {
  font-family: var(--hand);
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.consent p {
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}
.consent a {
  text-decoration-color: var(--mint-deep);
  text-underline-offset: 3px;
}
.consent .btns {
  display: flex;
  gap: 0.7rem;
}
.consent button,
.legal .cookie-btn {
  font: inherit;
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 999px 999px 999px 6px;
  padding: 0.45rem 1.4rem;
}
.consent button + button {
  background: var(--sage);
}
@media (prefers-reduced-motion: reduce) {
  .page-wave {
    display: none;
  }
  .consent {
    transition: opacity 0.2s;
    transform: none;
  }
}

/* about: one big story, then two columns */
.story-big {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.story-big h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.story-big p {
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 52rem;
}
.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (max-width: 760px) {
  .duo {
    grid-template-columns: 1fr;
  }
}

/* project detail page */
.project {
  position: relative;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 6rem);
}
.project > .waves {
  bottom: auto;
  height: min(100%, 60rem);
}
.project .wrap {
  position: relative;
  max-width: 68rem;
}
.project h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  margin: 1rem 0 0.8rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}
.tags li {
  font-family: var(--hand);
  font-size: 0.95rem;
  padding: 0.3rem 1.1rem;
  border-radius: 999px 999px 999px 6px;
  background: var(--mint);
}
.tags li.sage {
  background: var(--sage);
}
.tags li.mauve {
  background: var(--mauve);
}
.tags li:has(.visit) {
  padding: 0;
  background: none;
}
.visit {
  display: block;
  font-family: var(--hand);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 0.3rem 1.1rem;
  border-radius: 999px 999px 999px 6px;
}
.pintro {
  max-width: 46rem;
  line-height: 1.75;
  margin: 0 0 2.5rem;
}
.bigpic {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c, var(--mint));
}
.bigpic img,
.stack img {
  display: block;
  width: 100%;
  height: auto;
}
.ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  aspect-ratio: 16 / 9;
  font-family: var(--hand);
  color: var(--muted);
  background: var(--c, var(--mint));
}
.case {
  padding-top: clamp(3rem, 8vw, 6rem);
}
.kicker {
  font-family: var(--hand);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 0.4rem;
}
.case h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 1rem;
}
.project .text p {
  max-width: 46rem;
  line-height: 1.8;
  font-size: 1.05rem;
}
.stack {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: 2rem;
}
.stack img,
.stack .ph {
  border-radius: 6px;
}
.stack .ph:nth-child(2) {
  --c: var(--sage);
}
.stack .ph:nth-child(3) {
  --c: var(--mauve);
}
.reelband {
  background: var(--mint);
  margin-top: 2.5rem;
  padding: 1.2rem 0 clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}
.draghint {
  font-family: var(--hand);
  color: var(--rose);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  padding: 0 clamp(1.5rem, 6vw, 5rem);
}
.drag {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding: 0 clamp(1.5rem, 6vw, 5rem) 0.5rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.drag::-webkit-scrollbar {
  display: none;
}
.drag.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}
.slide {
  flex: none;
  width: min(82vw, 38rem);
  aspect-ratio: 16 / 10;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  scroll-snap-align: center;
}
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.slide .ph {
  background: #fff;
  aspect-ratio: auto;
}
.nextrow {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

@media (max-width: 760px) {
  header {
    flex-wrap: wrap;
  }
  nav a {
    min-width: 0;
  }
  .hero .wrap,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .squares {
    max-width: 14rem;
  }
  .photo {
    max-width: 15rem;
  }

  .FigmaFrame {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .inner,
  .hi {
    transition: none;
  }
}

/* ---------- project page: layout tweaks ---------- */
/* text as wide as the pictures */
.project .text p,
.pintro {
  max-width: none;
}
.pintro {
  margin: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

/* my role: simple label + plain outlined chips */
.myrole {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
}
.rolelabel {
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--mint-deep);
  margin: 0;
}
.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin-bottom: 2em;
}
.roles li {
  font-family: var(--hand);
  font-size: 0.95rem;
  padding: 0.25rem 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px 999px 999px 6px;
}

/* research: four pictures in one row */
.row4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 2vw, 1.2rem);
  margin-top: 2rem;
}
.row4 .ph {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
}
.row4 img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

/* create: four pictures, two per row, loosely staggered */
.scatter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  margin-top: 2rem;
}
.scatter .ph,
.scatter img {
  min-height: 0;
  border-radius: 6px;
  width: 100%;
  display: block;
  object-fit: cover;
}
.scatter > * {
  aspect-ratio: 16 / 10;
}
.scatter > :nth-child(1) {
  rotate: -0.8deg;
}
.scatter > :nth-child(2) {
  rotate: 0.8deg;
  margin-top: 2.5rem;
}
.scatter > :nth-child(3) {
  rotate: 0.6deg;
}
.scatter > :nth-child(4) {
  rotate: -0.9deg;
  margin-top: 1.5rem;
}

/* result: big wireframe box + small logo box */
.result {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  margin-top: 2rem;
}
.result figure {
  margin: 0;
}
.result .ph,
.result img {
  min-height: 0;
  border-radius: 6px;
  width: 100%;
  display: block;
  object-fit: cover;
}
.r-big .ph,
.r-big img {
  aspect-ratio: 16 / 10;
}
.r-small .ph,
.r-small img {
  aspect-ratio: 1 / 1;
  rotate: 2deg;
}

/* what I learned: same look as the cookie popup */
.learned {
  max-width: 36rem;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 6px 22px 22px 22px;
  padding: 1.2rem 1.4rem 1.4rem;
  box-shadow: 6px 6px 0 var(--mint);
}
.project .learned h2 {
  font-family: var(--hand);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.project .learned p {
  font-size: 0.97rem;
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 760px) {
  .row4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .result {
    grid-template-columns: 1fr;
  }
  .r-small {
    max-width: 14rem;
  }
}
@media (max-width: 520px) {
  .scatter {
    grid-template-columns: 1fr;
  }
  .scatter > * {
    margin-top: 0 !important;
  }
}

/* notebook lines also behind "What I learned" (fade in towards the bottom) */
.learned-sec {
  position: relative;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
.waves-bottom {
  -webkit-mask-image: linear-gradient(transparent, #000 70%);
  mask-image: linear-gradient(transparent, #000 70%);
}

/* click-to-enlarge pictures */
.zoomable {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(27, 27, 31, 0.88);
  animation: lb-in 0.25s ease;
}
.lightbox[hidden] {
  display: none;
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 8px 8px 0 var(--mint);
}
.lb-close {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.5rem);
  right: clamp(0.8rem, 2vw, 1.5rem);
  width: 2.8rem;
  height: 2.8rem;
  font: inherit;
  font-family: var(--hand);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 999px 999px 999px 6px;
  cursor: pointer;
}
@keyframes lb-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox {
    animation: none;
  }
}

/* click-to-enlarge: always show the whole picture inside the window */
.lightbox img {
  width: auto;
  height: auto;
  max-width: min(88vw, 70rem);
  max-height: 80vh;
  max-height: 80dvh;
  object-fit: contain;
}

/* result: wireframe embed fits its box; logo is smaller and never cropped */
.r-big iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
}
.result .r-small {
  max-width: 11rem;
  justify-self: center;
}
.result .r-small img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
