.about-body {
  background: var(--bg);
  overflow: hidden;
}

.about-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--bg);
}

.about-page .nav {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 18px;
  width: max-content;
  transform: translateX(-50%);
}

.desk {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  background: var(--bg);
  touch-action: none;
}

.desk.is-dragging {
  cursor: grabbing;
}

.desk-world {
  position: relative;
  width: 1040px;
  height: 660px;
  z-index: 2;
  flex: none;
  transform: translate(var(--pan-x, 0px), var(--pan-y, 0px));
}

.polaroid {
  position: absolute;
  margin: 0;
  padding: 0;
  background: transparent;
}

.polaroid-code,
.polaroid-note {
  position: absolute;
  z-index: 4;
  color: #161616;
  font-family: "Patrick Hand", cursive;
  font-weight: 400;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 8px rgba(255, 255, 255, 0.75);
}

.polaroid-code {
  top: 0;
  right: 0;
  font-size: 28px;
}

.polaroid-note {
  bottom: 0;
  left: 0;
  font-size: 26px;
}

.polaroid img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

.polaroid::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: #fff;
  pointer-events: none;
}

.polaroid-front::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -4%;
  pointer-events: none;
  background:
    linear-gradient(to right, #fff 0%, #fff 16%, rgba(255, 255, 255, 0) 36%, rgba(255, 255, 255, 0) 64%, #fff 84%, #fff 100%),
    linear-gradient(to bottom, #fff 0%, #fff 18%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 62%, #fff 82%, #fff 100%);
  filter: blur(10px);
}

.polaroid-card {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  perspective: 900px;
  cursor: pointer;
}

.polaroid-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.12, 0.2, 1);
}

.polaroid.is-flipped {
  z-index: 6;
}

.polaroid.is-flipped .polaroid-inner {
  transform: rotateY(180deg);
}

.polaroid.is-raised {
  z-index: 8;
  animation: none;
  transition:
    translate 0.7s cubic-bezier(0.4, 0.12, 0.2, 1),
    rotate 0.7s cubic-bezier(0.4, 0.12, 0.2, 1),
    scale 0.7s cubic-bezier(0.4, 0.12, 0.2, 1);
}

.polaroid-front,
.polaroid-back {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.polaroid-back {
  display: grid;
  place-items: center;
  padding: 11%;
  background: #fff;
  transform: rotateY(180deg);
}

.polaroid-back-text {
  color: #161616;
  font-family: "Patrick Hand", cursive;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.bubble-edge {
  position: absolute;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.16));
}

.polaroid-small {
  z-index: 1;
  left: -209px;
  top: -90px;
  width: 148px;
  height: 148px;
  rotate: -8deg;
  animation: desk-float 6.8s ease-in-out -1.2s infinite;
}

.polaroid-small img {
  height: 148px;
}

.polaroid-small .polaroid-code {
  font-size: 22px;
}

.polaroid-small .polaroid-note {
  font-size: 20px;
}

.polaroid-small .polaroid-back {
  padding: 8%;
}

.polaroid-small .polaroid-back-text {
  font-size: 11px;
  line-height: 1.15;
}

.polaroid-meal {
  z-index: 2;
  left: 1px;
  top: -68px;
  width: 228px;
  height: 210px;
  rotate: 7deg;
  animation: desk-float 7.6s ease-in-out -3.4s infinite;
}

.polaroid-meal .polaroid-back-text {
  font-size: 13px;
}

.polaroid-canal {
  z-index: 1;
  right: -156px;
  top: -82px;
  width: 236px;
  height: 176px;
  rotate: -3deg;
  animation: desk-float 8.4s ease-in-out -5s infinite;
}

.polaroid-canal .polaroid-back {
  padding: 7% 8%;
}

.polaroid-canal .polaroid-back-text {
  font-size: 11.5px;
  line-height: 1.15;
}

.polaroid-calli,
.polaroid-sketch {
  z-index: 2;
}

.polaroid-calli {
  right: 164px;
  top: -54px;
  width: 118px;
  height: 118px;
  rotate: 6deg;
  animation: desk-float 7.2s ease-in-out -2.4s infinite;
}

.polaroid-sketch {
  right: -22px;
  top: 178px;
  width: 140px;
  height: 140px;
  rotate: -5deg;
  animation: desk-float 8.1s ease-in-out -4.8s infinite;
}

.polaroid-calli img {
  object-position: center 40%;
}

.polaroid-sketch img {
  object-position: center 34%;
}

.polaroid-calli .polaroid-note,
.polaroid-sketch .polaroid-note {
  font-size: 15px;
}

.polaroid-calli .polaroid-back,
.polaroid-sketch .polaroid-back {
  padding: 10% 8%;
}

.polaroid-calli .polaroid-back-text,
.polaroid-sketch .polaroid-back-text {
  font-size: 11px;
  line-height: 1.15;
}

.player {
  position: absolute;
  z-index: 4;
  left: calc(508px - 50vw);
  top: 352px;
  width: 280px;
  rotate: -8deg;
  transform-origin: 50% 42%;
  animation: desk-float 9s ease-in-out -2s infinite;
}

.player-face {
  position: relative;
  height: 340px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 62%, rgba(0, 139, 139, 0.2), transparent 42%),
    linear-gradient(180deg, #1c2428 0%, #12181b 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

.player-artist,
.player-title {
  position: absolute;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  pointer-events: none;
}

.player-artist {
  top: 22px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  writing-mode: vertical-rl;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.player-artist span:last-child {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
}

.player-title {
  top: 22px;
  right: 18px;
  text-align: right;
}

.player-title p {
  color: #ff4500;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.player-title span {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.disc {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 248px;
  height: 248px;
  transform: translate(-50%, -50%);
}

.disc svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.record-spin,
.fish-orbit {
  transform-box: view-box;
  transform-origin: center;
  animation-name: orbit;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-play-state: paused;
}

.record-spin {
  animation-duration: 10s;
}

.player.is-playing .record-spin,
.player.is-playing .fish-orbit {
  animation-play-state: running;
}

.player-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.transport {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f7f7f7;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 28px rgba(0, 0, 0, 0.16);
}

.transport svg {
  width: 14px;
  height: 14px;
  fill: #3a3a3a;
}

.transport.is-active {
  background: #111;
}

.transport.is-active svg {
  fill: #fff;
}

.mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.mark-button {
  display: block;
  margin: 0 auto 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mark-flower {
  display: block;
  width: 168px;
  height: 168px;
  transform-origin: 50% 50%;
  animation: brand-flower-spin 8s linear infinite;
}

.mark-flower:hover {
  animation-duration: 1.2s;
}

.mark-hint {
  position: absolute;
  z-index: 3;
  top: -48px;
  left: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  animation: desk-float 6.6s ease-in-out -1.8s infinite;
}

.mark-tag {
  display: block;
  padding: 3px 8px 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.16);
  color: #161616;
  font-family: "Patrick Hand", cursive;
  font-size: 16px;
  line-height: 1;
  transform: rotate(-8deg);
}

.mark-cursor {
  display: block;
  width: 26px;
  height: 26px;
  margin-top: -2px;
  margin-right: 2px;
  overflow: visible;
  transform: rotate(168deg);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.16));
}

.mark p {
  margin: 0 auto;
  max-width: 230px;
  color: rgba(0, 0, 0, 0.46);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.profile[hidden] {
  display: none;
}

.profile {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 72px 28px;
}

.profile-scrim {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(252, 252, 252, 0.42);
  cursor: pointer;
}

.profile-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: stretch;
  gap: 32px;
  width: min(660px, calc(100vw - 160px));
  height: fit-content;
  padding: 44px 60px 44px 54px;
  animation: profile-in 0.45s cubic-bezier(0.4, 0.12, 0.2, 1);
}

.profile-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: #fff;
  pointer-events: none;
}

.profile-photo {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 0;
  min-height: 100%;
  object-fit: cover;
  object-position: center 36%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
}

.profile-copy {
  position: relative;
  z-index: 2;
  color: #161616;
  font-family: "Patrick Hand", cursive;
}

.profile-copy h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.05;
}

.profile-copy p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.22;
}

.profile-copy p:last-child {
  margin-bottom: 0;
}

@keyframes profile-in {
  from {
    opacity: 0;
    scale: 0.94;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

.browser-block {
  position: absolute;
  z-index: 5;
  left: calc(100% + (100vw - 1040px) / 2 - 300px);
  top: var(--browser-top, calc(100% - 148px));
  width: 920px;
  animation: desk-float 7.2s ease-in-out -4.2s infinite;
}

.browser-caption {
  position: absolute;
  left: 2px;
  bottom: calc(100% + 12px);
  margin: 0;
  color: rgba(0, 0, 0, 0.46);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.browser-caption span {
  display: block;
}

.browser {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: #f7f7f8;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px;
  background: #ececee;
}

.browser-bar span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #d0d0d4;
}

.browser-bar span:first-child {
  background: #ff5f57;
}

.browser-bar span:nth-child(2) {
  background: #febc2e;
}

.browser-bar span:nth-child(3) {
  background: #28c840;
}

.browser-bar p {
  margin-left: 10px;
  color: rgba(0, 0, 0, 0.45);
  font-family: "Ubuntu Condensed", sans-serif;
  font-size: 18px;
}

.browser video {
  display: block;
  width: 100%;
  height: 560px;
  background: #111;
  object-fit: cover;
}

.drag-hint {
  position: absolute;
  left: 50%;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: rgba(0, 0, 0, 0.48);
  font-size: 13px;
  transform: translateX(-50%);
  pointer-events: none;
}

@keyframes desk-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -18px;
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .record-spin,
  .fish-orbit,
  .mark-flower,
  .mark-hint,
  .polaroid,
  .player,
  .browser-block,
  .polaroid.is-raised {
    animation: none;
    transition: none;
  }

  .polaroid-inner,
  .profile-card {
    animation: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------
   Phones & small tablets: still a draggable desk like desktop, but the
   items are re-arranged into a compact phone-sized world so everything
   fits the screen and you drag down to reach the video.
---------------------------------------------------------------- */
@media (max-width: 800px) {
  .about-page {
    height: 100vh;
    height: 100dvh;
  }

  .about-page .nav {
    top: 16px;
  }

  .desk {
    align-items: flex-start;
    padding-top: 72px;
  }

  .desk-world {
    width: 380px;
    height: 1000px;
    transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) scale(var(--desk-scale, 1));
    transform-origin: 50% 0;
  }

  /* top row */
  .polaroid-small {
    left: -46px;
    top: 10px;
    width: 124px;
    height: 124px;
  }

  .polaroid-small img { height: 124px; }

  .polaroid-meal {
    left: 262px;
    top: -6px;
    width: 160px;
    height: 147px;
  }

  /* flower in the middle */
  .mark {
    top: 316px;
    width: 250px;
  }

  .mark-flower {
    width: 156px;
    height: 156px;
  }

  .mark-button { margin-bottom: 12px; }

  .mark-hint {
    top: -42px;
    left: 34px;
  }

  .polaroid-calli {
    left: -40px;
    right: auto;
    top: 222px;
    width: 92px;
    height: 92px;
  }

  .polaroid-sketch {
    left: auto;
    right: -52px;
    top: 262px;
    width: 104px;
    height: 104px;
  }

  /* lower row */
  .polaroid-canal {
    left: -58px;
    right: auto;
    top: 500px;
    width: 176px;
    height: 131px;
  }

  .player {
    left: 196px;
    top: 404px;
    scale: 0.58;
  }

  .browser-block {
    left: 10px;
    top: 720px;
    width: 360px;
  }

  .browser-caption {
    font-size: 13px;
  }

  .browser {
    border-radius: 16px;
  }

  .browser-bar {
    height: 36px;
    padding: 0 12px;
  }

  .browser-bar span {
    width: 10px;
    height: 10px;
  }

  .browser-bar p {
    font-size: 14px;
  }

  .browser video {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .polaroid-code { font-size: 20px; }
  .polaroid-note { font-size: 20px; }
  .polaroid-small .polaroid-code { font-size: 18px; }
  .polaroid-small .polaroid-note { font-size: 17px; }
  .polaroid-calli .polaroid-note,
  .polaroid-sketch .polaroid-note { font-size: 15px; }

  /* Cards that open to the centre scale up from their small size, so their
     back text shrinks with the card (it ends up larger once opened). */
  .polaroid-meal .polaroid-back-text { font-size: 9.2px; }
  .polaroid-small .polaroid-back-text { font-size: 9.2px; }
  .polaroid-canal .polaroid-back-text { font-size: 8.8px; }

  /* calligraphy & sketching flip in place, so their backs need readable text */
  .polaroid-calli .polaroid-back-text,
  .polaroid-sketch .polaroid-back-text {
    font-size: 11.5px;
    line-height: 1.15;
  }

  /* the desk fills the phone screen, so the pill would sit under the video */
  .drag-hint {
    display: none;
  }

  /* About popup: compact card that leaves the page visible around it */
  .profile {
    padding: 48px 20px;
  }

  .profile-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    width: min(340px, 100%);
    min-width: 0;
    padding: 30px 26px 32px;
  }

  .profile-photo {
    width: 96px;
    height: auto;
    max-height: 120px;
    min-height: 0;
  }

  /* long bio scrolls inside the card so the popup never fills the screen */
  .profile-copy {
    max-height: 42vh;
    max-height: 42dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }

  .profile-copy h2 {
    font-size: 21px;
    text-align: center;
  }

  .profile-copy p {
    font-size: 14px;
    line-height: 1.45;
  }
}

/* very narrow phones: shrink the whole desk a touch */
@media (max-width: 370px) {
  .desk-world {
    --desk-scale: 0.92;
  }
}
