@charset "UTF-8";
/* Generated from scss/styles.scss by Sass. Do not edit this file: edit the
   partials in scss/ and run `npm run build:css`. */
@view-transition {
  navigation: auto;
}
.case-hero {
  view-transition-name: case-hero;
}

::view-transition-group(case-hero) {
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.4s;
  animation-timing-function: ease;
}

:root {
  --background: #f7f6f4;
  --foreground: #0e0e0e;
  --fg-rgb: 14, 14, 14;
  --muted: #9a9a97;
  --line: #e4e2dd;
  --surface: #ffffff;
  --media-bg: #e8e1d3;
  --glass-rgb: 247, 246, 244;
  --hairline: 0, 0, 0;
  --panel-border: rgba(0, 0, 0, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --font-display: "Archivo", -apple-system, "Arial Black", sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --font-serif: "Instrument Serif", Georgia, serif;
  --label: #3b6ad4;
  --aside-wash:
    radial-gradient(60% 70% at 12% 15%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(55% 65% at 88% 12%, rgba(168, 85, 247, 0.14), transparent 70%),
    radial-gradient(60% 70% at 18% 92%, rgba(242, 120, 75, 0.12), transparent 70%),
    radial-gradient(55% 65% at 85% 88%, rgba(45, 212, 191, 0.13), transparent 70%),
    rgba(var(--glass-rgb), 0.7);
  color-scheme: light;
}
:root[data-theme=dark] {
  --background: #151619;
  --foreground: #f3f2f0;
  --fg-rgb: 243, 242, 240;
  --muted: #83837f;
  --line: rgba(255, 255, 255, 0.1);
  --surface: #1d1e22;
  --media-bg: #23252a;
  --glass-rgb: 26, 27, 30;
  --hairline: 255, 255, 255;
  --panel-border: rgba(0, 0, 0, 0.55);
  --label: #86a7f2;
  --aside-wash:
    radial-gradient(60% 70% at 12% 15%, rgba(59, 130, 246, 0.14), transparent 70%),
    radial-gradient(55% 65% at 88% 12%, rgba(168, 85, 247, 0.12), transparent 70%),
    radial-gradient(60% 70% at 18% 92%, rgba(242, 120, 75, 0.09), transparent 70%),
    radial-gradient(55% 65% at 85% 88%, rgba(45, 212, 191, 0.1), transparent 70%),
    #1b1c20;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
svg,
video {
  -webkit-user-drag: none;
  user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p {
  margin: 0;
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.layout {
  position: relative;
  z-index: 1; /* above the sky */
}

@media (min-width: 1024px) {
  .layout {
    padding-left: 348px;
  }
}
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
}

@media (min-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    width: 320px;
    padding: 2rem;
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    background: rgba(var(--glass-rgb), 0.5);
    overflow: hidden;
    isolation: isolate;
    z-index: 20;
  }
  .sidebar::before {
    content: "";
    position: absolute;
    inset: -55%;
    z-index: 0;
    background: radial-gradient(38% 38% at 22% 24%, rgba(59, 130, 246, 0.5), transparent 70%), radial-gradient(36% 36% at 78% 26%, rgba(168, 85, 247, 0.45), transparent 70%), radial-gradient(40% 40% at 30% 80%, rgba(242, 120, 75, 0.4), transparent 70%), radial-gradient(36% 36% at 76% 74%, rgba(45, 212, 191, 0.38), transparent 70%);
    filter: blur(28px);
    opacity: 0.55;
    animation: aside-gradient 32s linear infinite;
    pointer-events: none;
    will-change: transform;
  }
  .sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(var(--glass-rgb), 0.4);
    -webkit-backdrop-filter: blur(26px) saturate(1.35);
    backdrop-filter: blur(26px) saturate(1.35);
    pointer-events: none;
  }
}
.sidebar-top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2.15rem;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 9999px;
  background: rgba(var(--hairline), 0.05);
  padding: 0.375rem 0.75rem;
  font-size: 11px;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.7);
  transition: background-color 0.2s;
}
.pill:hover {
  background: rgba(var(--hairline), 0.1);
}

.nav-list {
  display: none;
}

@media (min-width: 1024px) {
  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
  }
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: rgba(var(--fg-rgb), 0.88);
  transition: color 0.3s ease;
}

.nav-list:hover .nav-item {
  color: rgba(var(--fg-rgb), 0.32);
}

.nav-list .nav-item:hover {
  color: var(--foreground);
}

.nav-text {
  position: relative;
  display: inline-block;
}

.nav-text::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -6px;
  height: 8px;
  /* Zigzag drawn as a mask over the theme's ink (black in light, white in
     dark), fading out from left to right */
  background: linear-gradient(90deg, var(--foreground), rgba(var(--fg-rgb), 0));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 6.5 L6 1.5 L12 6.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='miter' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left bottom/12px 8px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 6.5 L6 1.5 L12 6.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='miter' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left bottom/12px 8px;
  opacity: 0;
  transform: scaleX(0.65);
  transform-origin: left;
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover .nav-text::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-arrow {
  color: var(--foreground);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-item:hover .nav-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Current project: persistent underline (the arrow is hover only) */
.nav-item--active {
  color: var(--foreground);
}

.nav-item--active .nav-text::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Keep the active item highlighted even while hovering elsewhere in the list */
.nav-list:hover .nav-item--active:not(:hover) {
  color: rgba(var(--fg-rgb), 0.6);
}

/* Home scroll-spy: the project block in view lights up its link.
   Softer than the case-page active state: underline + colour, no arrow. */
.nav-list.is-spying .nav-item {
  color: rgba(var(--fg-rgb), 0.42);
}

.nav-list.is-spying .nav-item--reading {
  color: var(--foreground);
}

.nav-item--reading .nav-text::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-list.is-spying:hover .nav-item:hover {
  color: var(--foreground);
}

.sidebar-bottom {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}
.side-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(var(--fg-rgb), 0.7);
  transition: color 0.2s;
}

.side-link:hover {
  color: var(--foreground);
}

.copyright {
  margin-top: 0.5rem;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.content {
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .content {
    padding: 0 2.5rem;
  }
}
.section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

.hero + .section {
  border-top: 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--label);
}

.hero {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 0;
}

/* SHIV mark: one ink colour that follows the theme. .is-play (added by
   main.js on load and on hover) runs one sharp sequence:
   S pushes right and H squeezes; H pushes left and S squeezes;
   I hops up and S squashes; then V does one full spin to finish. */
.shiv {
  display: block;
  width: auto;
  height: 42px;
  overflow: visible;
  fill: var(--foreground);
}
.shiv * {
  transform-box: fill-box;
}

.shiv-S {
  transform-origin: 0 0;
}

.shiv-H {
  transform-origin: 100% 50%;
}

.shiv-i {
  transform-origin: 50% 100%;
}

.shiv-v {
  transform-origin: 50% 33.3%;
}

/* the triangle's centre */
.shiv.is-play .shiv-s1 {
  animation: shiv-s1 2.6s both;
}

.shiv.is-play .shiv-s2 {
  animation: shiv-s2 2.6s both;
}

.shiv.is-play .shiv-H {
  animation: shiv-H 2.6s both;
}

.shiv.is-play .shiv-h1 {
  animation: shiv-h1 2.6s both;
}

.shiv.is-play .shiv-S {
  animation: shiv-S 2.6s both;
}

.shiv.is-play .shiv-i {
  animation: shiv-i 2.6s both;
}

.shiv.is-play .shiv-v {
  animation: shiv-v 0.8s cubic-bezier(0.7, 0, 0.2, 1) 2.25s both;
}

@keyframes shiv-s1 {
  0%, 2% {
    transform: none;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  10%, 14% {
    transform: translateX(-36px);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  24%, 100% {
    transform: none;
  }
}
@keyframes shiv-s2 {
  0%, 2% {
    transform: none;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  10%, 14% {
    transform: translateX(64px);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  24%, 100% {
    transform: none;
  }
}
@keyframes shiv-H {
  0%, 2% {
    transform: none;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  10%, 14% {
    transform: scaleX(0.85);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  24%, 100% {
    transform: none;
  }
}
@keyframes shiv-h1 {
  0%, 30% {
    transform: none;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  38%, 42% {
    transform: translateX(-48px);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  52%, 100% {
    transform: none;
  }
}
@keyframes shiv-S {
  0%, 30% {
    transform: none;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  38%, 42% {
    transform: scaleX(0.89);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  52%, 64% {
    transform: none;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  72%, 76% {
    transform: scaleY(0.84);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  88%, 100% {
    transform: none;
  }
}
@keyframes shiv-i {
  0%, 60% {
    transform: none;
    animation-timing-function: ease-out;
  }
  64% {
    transform: scaleY(0.86);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  72%, 76% {
    transform: translateY(-120px) scaleY(1.04);
    animation-timing-function: cubic-bezier(0.7, 0, 0.6, 1);
  }
  85% {
    transform: scaleY(0.9);
    animation-timing-function: ease-out;
  }
  92%, 100% {
    transform: none;
  }
}
@keyframes shiv-v {
  from {
    transform: none;
  }
  to {
    transform: rotate(360deg);
  }
}
/* Floating top-right; slides away while the page scrolls (.is-away) */
.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: var(--foreground);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.theme-switch:hover {
  transform: scale(1.08);
}
.theme-switch:active {
  transform: scale(0.94);
}
.theme-switch.is-away {
  transform: translateY(-16px) scale(0.85);
  opacity: 0;
  pointer-events: none;
}

/* Sun in light, moon in dark: the bite slides in, the rays fold away */
.tsw {
  overflow: visible;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tsw-core {
  r: 5px;
  transition: r 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tsw-bite {
  cx: 30px;
  cy: 0px;
  transition: cx 0.5s cubic-bezier(0.16, 1, 0.3, 1), cy 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tsw-rays {
  transform-origin: 12px 12px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.theme-switch:hover .tsw-rays {
  transform: rotate(45deg);
}

:root[data-theme=dark] .tsw {
  transform: rotate(-30deg);
}

:root[data-theme=dark] .tsw-core {
  r: 9px;
}

:root[data-theme=dark] .tsw-bite {
  cx: 17px;
  cy: 7px;
}

:root[data-theme=dark] .tsw-rays {
  transform: scale(0.4) rotate(-45deg);
  opacity: 0;
}

:root[data-theme=dark] .theme-switch:hover .tsw {
  transform: rotate(-12deg);
}

/* Sneak peek of the other theme, a wavy window from the bottom-left */
.theme-peek {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  visibility: hidden;
  -webkit-backdrop-filter: invert(1) hue-rotate(180deg);
  backdrop-filter: invert(1) hue-rotate(180deg);
}
.theme-peek.is-on {
  visibility: visible;
}

html.theme-vt * {
  view-transition-name: none !important;
}

html.theme-vt::view-transition-old(root),
html.theme-vt::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

@keyframes aside-gradient {
  0% {
    transform: rotate(0deg) scale(1.35);
  }
  50% {
    transform: rotate(180deg) scale(1.7);
  }
  100% {
    transform: rotate(360deg) scale(1.35);
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--foreground);
  color: var(--background);
  border-color: transparent;
}

.floating-cta {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, opacity 0.9s ease, filter 0.9s ease;
}

@media (min-width: 1024px) {
  .floating-cta {
    left: calc(50% + 174px);
  }
}
.floating-cta:hover {
  transform: translateX(-50%) translateY(-3px);
}

.floating-cta.is-idle {
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
}

.glass {
  background: rgba(var(--glass-rgb), 0.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(var(--hairline), 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cta-viewport {
  display: inline-block;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.cta-label {
  display: inline-block;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}
.cta-label.cta-out {
  transform: translateY(-130%);
  opacity: 0;
}
.cta-label.cta-in {
  transform: translateY(130%);
  opacity: 0;
  transition: none;
}

.cta-arrow {
  flex: none;
  color: rgba(var(--fg-rgb), 0.55);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-cta.is-up .cta-arrow {
  transform: rotate(180deg);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 9999px;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 100;
  will-change: transform;
  transition: width 0.18s ease, height 0.18s ease, margin 0.18s ease;
}
.cursor-dot.is-hover {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
}

.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button,
.has-custom-cursor [role=button] {
  cursor: none;
}

@media (pointer: coarse) {
  .cursor-dot {
    display: none;
  }
}
/* ---- Image lightbox ------------------------------------------------ */
.fig-frame img,
.book-cover img,
.photo-tile,
.about-grid img {
  cursor: zoom-in;
}

body.lightbox-lock {
  overflow: hidden;
  touch-action: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 8, 8, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  cursor: zoom-out;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  display: block;
  max-width: min(1100px, 92vw);
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  cursor: default;
  transform: scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.is-open .lightbox-img {
  transform: scale(1);
}

.lightbox-cap {
  max-width: min(1100px, 92vw);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: clamp(0.8rem, 2vw, 1.5rem);
  right: clamp(0.8rem, 2vw, 1.5rem);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox-img {
    transition: none;
  }
}
/* =====================================================================
   Sky: a quiet backdrop behind the top of every page. Everything here is
   faint, slow and fades out before the content, so reading is untouched.
   Dark shows stars, a rare shooting star and drifting clouds; light shows
   a warm sun haze, the same clouds and now and then a flock of birds.
   ===================================================================== */
.sky {
  --cloud: rgba(140, 160, 190, 0.16);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(#000 35%, transparent);
  mask-image: linear-gradient(#000 35%, transparent);
}

:root[data-theme=dark] .sky {
  --cloud: rgba(255, 255, 255, 0.06);
}

/* Light only */
.sky-sun {
  position: absolute;
  top: -260px;
  right: -160px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 120, 0.28), rgba(255, 214, 160, 0.1) 55%, transparent);
  transition: opacity 0.6s ease;
}

.sky-birds {
  position: absolute;
  top: 110px;
  left: 0;
  color: rgba(var(--fg-rgb), 0.32);
  animation: sky-birds 110s linear infinite;
  transition: opacity 0.6s ease;
}
.sky-birds i {
  position: absolute;
  display: block;
  width: 18px;
  animation: sky-bob 5s ease-in-out infinite;
}
.sky-birds i:nth-child(2) {
  left: 22px;
  top: 12px;
  width: 14px;
  animation-delay: -1.7s;
}
.sky-birds i:nth-child(3) {
  left: 40px;
  top: -6px;
  width: 12px;
  animation-delay: -3.4s;
}
.sky-birds svg {
  display: block;
  width: 100%;
  overflow: visible;
}

/* About 75s to cross, then a long empty sky before the next pass */
@keyframes sky-birds {
  0% {
    transform: translate(-8vw, 20px);
  }
  68% {
    transform: translate(108vw, -30px);
  }
  68.01%, 100% {
    transform: translate(108vw, -30px);
  }
}
@keyframes sky-bob {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}
/* Dark only */
.sky-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.sky-stars--b {
  width: 1.5px;
  height: 1.5px;
}

/* Placed and played by main.js: once every 20s, from a random spot */
.sky-shoot {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7));
  opacity: 0;
  transform-origin: 100% 50%;
}

:root[data-theme=dark] .sky-sun,
:root[data-theme=dark] .sky-birds {
  opacity: 0;
}

:root[data-theme=dark] .sky-stars--a {
  opacity: 0.8;
  animation: sky-twinkle 9s ease-in-out infinite alternate;
}

:root[data-theme=dark] .sky-stars--b {
  opacity: 1;
  animation: sky-twinkle 3.5s ease-in-out infinite alternate;
}

@keyframes sky-twinkle {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.35;
  }
}
/* Clouds: soft clusters of blurred puffs, drifting left to right */
.cloud {
  position: absolute;
  left: 0;
  width: 360px;
  height: 120px;
  background: radial-gradient(closest-side at 28% 62%, var(--cloud) 55%, transparent), radial-gradient(closest-side at 52% 42%, var(--cloud) 62%, transparent), radial-gradient(closest-side at 74% 60%, var(--cloud) 55%, transparent), radial-gradient(closest-side at 50% 72%, var(--cloud) 70%, transparent);
  background-size: 50% 90%, 55% 110%, 50% 90%, 80% 60%;
  background-position: 0 100%, 50% 0, 100% 100%, 50% 100%;
  background-repeat: no-repeat;
  filter: blur(14px);
  animation: sky-drift linear infinite;
}

.cloud--1 {
  top: 40px;
  animation-duration: 150s;
  animation-delay: -40s;
}

.cloud--2 {
  top: 150px;
  transform: scale(0.7);
  animation-duration: 190s;
  animation-delay: -120s;
}

.cloud--3 {
  top: 250px;
  transform: scale(1.25);
  animation-duration: 230s;
  animation-delay: -10s;
}

.cloud--4 {
  top: 90px;
  transform: scale(0.55);
  animation-duration: 170s;
  animation-delay: -95s;
}

@keyframes sky-drift {
  from {
    translate: -40vw 0;
  }
  to {
    translate: 110vw 0;
  }
}
@media (max-width: 767px) {
  .sky {
    height: 460px;
  }
  .cloud {
    width: 240px;
    height: 80px;
  }
}
/* ---- Local weather (data-weather on <html>, set by main.js) ---------- */
/* Extra clouds only come out when it's grey outside */
.cloud--5, .cloud--6, .cloud--7 {
  display: none;
}

.cloud--5 {
  top: 10px;
  transform: scale(0.9);
  animation-duration: 210s;
  animation-delay: -160s;
}

.cloud--6 {
  top: 200px;
  transform: scale(0.8);
  animation-duration: 175s;
  animation-delay: -60s;
}

.cloud--7 {
  top: 60px;
  transform: scale(1.1);
  animation-duration: 250s;
  animation-delay: -200s;
}

:root:is([data-weather=cloudy], [data-weather=overcast], [data-weather=drizzle], [data-weather=rain], [data-weather=snow], [data-weather=storm]) :is(.cloud--5, .cloud--6, .cloud--7) {
  display: block;
}

:root:is([data-weather=cloudy], [data-weather=overcast], [data-weather=drizzle], [data-weather=rain], [data-weather=storm]) .sky {
  --cloud: rgba(130, 145, 170, 0.2);
}

:root[data-theme=dark]:is([data-weather=cloudy], [data-weather=overcast], [data-weather=drizzle], [data-weather=rain], [data-weather=storm]) .sky {
  --cloud: rgba(255, 255, 255, 0.08);
}

/* The sun and stars step back behind the weather */
:root:not([data-weather=clear]):is([data-weather]) .sky-sun {
  opacity: 0.35;
}

:root[data-theme=dark]:is([data-weather=cloudy], [data-weather=overcast], [data-weather=fog], [data-weather=drizzle], [data-weather=rain], [data-weather=storm], [data-weather=snow]) :is(.sky-stars--a, .sky-stars--b) {
  opacity: 0.3;
}

/* No birds in bad weather */
:root:is([data-weather=rain], [data-weather=storm], [data-weather=snow], [data-weather=fog]) .sky-birds {
  opacity: 0;
}

/* Fog: a soft band of mist rolling slowly sideways */
.sky-fog {
  position: absolute;
  left: -20%;
  right: -20%;
  top: 120px;
  height: 260px;
  opacity: 0;
  background: radial-gradient(60% 50% at 30% 50%, rgba(var(--fg-rgb), 0.05), transparent 70%), radial-gradient(50% 45% at 70% 40%, rgba(var(--fg-rgb), 0.045), transparent 70%);
  filter: blur(18px);
  transition: opacity 1.2s ease;
}

:root[data-weather=fog] .sky-fog {
  opacity: 1;
  animation: sky-fog 40s ease-in-out infinite alternate;
}

@keyframes sky-fog {
  to {
    translate: 8% 0;
  }
}
/* Thunder: the top of the sky lights up faintly for a moment (main.js) */
.sky-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(80% 70% at 60% 0%, rgba(255, 255, 255, 0.5), transparent 70%);
}

:root:not([data-theme=dark]) .sky-flash {
  background: radial-gradient(80% 70% at 60% 0%, rgba(120, 140, 175, 0.18), transparent 70%);
}

/* Rain and snow are drawn on this canvas */
.sky-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-hello {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--foreground) 72%, transparent);
  text-shadow: 0 0 12px color-mix(in srgb, var(--background) 70%, transparent);
}

@media (min-width: 640px) {
  .hero-hello {
    font-size: 1.125rem;
  }
}
.hero-name {
  --hl: rgba(242, 143, 175, 0.5);
  padding: 0 0.12em;
  margin: 0 -0.04em;
  font-weight: 700;
  color: var(--foreground);
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 40%;
  animation: name-mark 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

:root[data-theme=dark] .hero-name {
  --hl: rgba(236, 110, 155, 0.62);
}

@keyframes name-mark {
  from {
    background-size: 0% 40%;
  }
}
.hero-sub a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--foreground) 30%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.hero-sub a:hover {
  text-decoration-color: currentColor;
}

.hero-title-wrap {
  position: relative;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 10.5vw;
  line-height: 0.94;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 46px;
  }
}
@media (min-width: 1024px) {
  .hero-title {
    font-size: 56px;
  }
}
.hero-sub {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (min-width: 640px) {
  .hero-sub {
    font-size: 1.15rem;
  }
}
.scroll-br {
  display: none;
}

@media (min-width: 640px) {
  .scroll-br {
    display: inline;
  }
}
.hero-title-wrap {
  --mx: 50%;
  --my: 50%;
  --spot: 0;
}

.hero-title-grad {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
  background-image: linear-gradient(110deg, #38bdf8 0%, #c084fc 30%, #fda4af 55%, #c084fc 80%, #38bdf8 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  --spot-mask: radial-gradient(
    circle 185px at var(--mx) var(--my),
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.14) 46%,
    transparent 70%
  );
  -webkit-mask-image: var(--spot-mask);
  mask-image: var(--spot-mask);
  opacity: var(--spot);
  transition: opacity 0.35s ease;
}

/* =====================================================================
   .hero-bg is a frame from the left edge of the main column to the edge
   of the window (the column's side padding is --pad). Inside it,
   .hero-pic holds the whole photo at its true shape, pinned bottom-right.
   Only two parts of it show: the tree, the guy and the dog in the corner,
   and the ground and hills along the bottom, running the full width.
   Everything else fades into the page, so the rest of the hero keeps the
   sky backdrop (clouds, stars, weather) and the text sits on a clean page.
   ===================================================================== */
.content--home {
  container-type: inline-size;
}

.hero--photo > :not(.hero-bg) {
  position: relative;
  z-index: 1;
}

.hero-bg {
  --pad: 1.5rem;
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: calc(50% - 50cqw - var(--pad));
  width: calc(100cqw + var(--pad) * 2);
  overflow: hidden;
  pointer-events: none;
  container-type: size;
}

@media (min-width: 640px) {
  .hero-bg {
    --pad: 2.5rem;
  }
}
.hero-pic {
  --h: 78cqh;
  position: absolute;
  right: 0;
  bottom: 0;
  height: var(--h);
  width: min(100%, var(--h) * 1.777);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%), linear-gradient(transparent, #000 22%, #000 calc(100% - 4rem), transparent), radial-gradient(40% 70% at 0% 100%, transparent 25%, #000 100%), radial-gradient(24% 42% at 100% 100%, transparent 15%, #000 100%);
  -webkit-mask-composite: source-in, source-in, source-in;
  mask-image: linear-gradient(to right, transparent, #000 22%), linear-gradient(transparent, #000 22%, #000 calc(100% - 4rem), transparent), radial-gradient(40% 70% at 0% 100%, transparent 25%, #000 100%), radial-gradient(24% 42% at 100% 100%, transparent 15%, #000 100%);
  mask-composite: intersect;
}
.hero-pic img, .hero-pic .hero-wind {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  -webkit-mask-image: radial-gradient(65% 110% at 100% 100%, #000 50%, transparent 100%), linear-gradient(transparent 59%, #000 82%);
  -webkit-mask-composite: source-over;
  mask-image: radial-gradient(65% 110% at 100% 100%, #000 50%, transparent 100%), linear-gradient(transparent 59%, #000 82%);
  mask-composite: add;
}

.hero-wind {
  position: absolute;
  inset: 0;
}

.hero-pic.is-wind img {
  visibility: hidden;
}

.hero-petals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

:root[data-theme=dark] .hero-petals {
  opacity: 0.6;
}

:root[data-theme=dark] .hero-pic :is(img, .hero-wind) {
  filter: brightness(0.62) saturate(0.9);
}

.hero--photo .hero-sub {
  color: color-mix(in srgb, var(--foreground) 72%, transparent);
}

.hero--photo .hero-sub {
  text-shadow: 0 0 12px color-mix(in srgb, var(--background) 70%, transparent);
}

@media (max-width: 767px) {
  .hero-bg {
    top: auto;
    height: 42%;
  }
  .hero-pic {
    --h: 100cqh;
    width: 100%;
  }
}
.section-heading {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .section-heading {
    font-size: 2.25rem;
  }
}
.tag {
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  color: rgba(var(--fg-rgb), 0.62);
}

.contact {
  padding: 6rem 0;
}

.contact-heading {
  max-width: 620px;
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .contact-heading {
    font-size: 3rem;
  }
}
.contact-btns {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
}

.footer {
  max-width: 64rem;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .footer {
    flex-direction: row;
    justify-content: space-between;
  }
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
}

/* =====================================================================
   Home: selected work blocks
   One block per case study: a live, animated preview beside the title.
   Previews are ported from the old portfolio (theshivesh) and the 3D book
   from experiments/book-3d. Animations only run while a stage is on screen
   (.is-live, set from main.js).
   ===================================================================== */
@property --board {
  syntax: "<length>";
  inherits: true;
  initial-value: 3px;
}
@property --t {
  syntax: "<length>";
  inherits: true;
  initial-value: 1px;
}
:root {
  --mk-bg: #ffffff;
  --mk-soft: #f6f6f4;
  --mk-line: #ececec;
  --mk-fg: #0e0e0e;
  --mk-muted: rgba(0, 0, 0, 0.55);
  --mk-shadow: 0 18px 40px -12px rgba(30, 24, 12, 0.18), 0 4px 10px -4px rgba(30, 24, 12, 0.08);
  --mk-icon: none;
}
:root[data-theme=dark] {
  --mk-bg: #1e1f23;
  --mk-soft: #26282c;
  --mk-line: rgba(255, 255, 255, 0.08);
  --mk-fg: #f3f2f0;
  --mk-muted: rgba(255, 255, 255, 0.55);
  --mk-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 4px 10px -4px rgba(0, 0, 0, 0.4);
  --mk-icon: invert(1);
}

.sw-list {
  margin-top: 3rem;
  display: grid;
  gap: 5rem;
}

@media (min-width: 1100px) {
  .sw-list {
    gap: 7rem;
    margin-top: 4rem;
  }
}
.sw {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1100px) {
  .sw {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 3.5rem;
  }
  .sw--flip {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  }
  .sw--flip .sw-stage {
    order: 2;
  }
}
/* ---- Stage: flat single-colour panel, tinted by the project ink ------ */
.sw-stage {
  --k: 1;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  height: 460px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, var(--ink) 9%, var(--surface));
  perspective: 1000px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark: every preview sits on one panel, a step lighter than the page */
:root[data-theme=dark] .sw-stage,
:root[data-theme=dark] .sw-stage--print-edition {
  background: #1a1b1f;
}

@media (min-width: 1100px) {
  .sw-stage {
    height: 520px;
  }
}
@media (max-width: 520px) {
  .sw-stage {
    --k: 0.8;
    height: 400px;
    border-radius: 22px;
  }
}
a.sw-stage:hover {
  transform: translateY(-4px);
}

.sw-tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--k));
  will-change: transform;
}

.sw-stage img {
  display: block;
}

/* Everything loops only while on screen */
.sw-stage:not(.is-live) *,
.sw-stage:not(.is-live) *::before,
.sw-stage:not(.is-live) *::after {
  animation-play-state: paused !important;
}

/* ---- Text --------------------------------------------------------- */
.sw-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sw-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 6.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.sw-mark {
  --hl: rgba(var(--ink-rgb), 0.22);
  padding: 0 0.08em;
  margin: 0 -0.08em;
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 38%;
  transition: background-size 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

:root[data-theme=dark] .sw-mark {
  --hl: color-mix(in srgb, var(--ink) 60%, transparent);
}

.sw.is-in .sw-mark {
  background-size: 100% 38%;
}

.sw-desc {
  margin-top: 1.1rem;
  max-width: 30rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted);
}

.sw-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.sw-btns .btn svg {
  flex: none;
}

@keyframes sw-float {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}
@keyframes sw-float-z {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}
/* =====================================================================
   Daily designs: a row of single-screen UI explorations. Five across on
   wide screens, a snap-scrolling strip on smaller ones. Click to zoom.
   ===================================================================== */
.daily-sub {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted);
}

/* The row scrolls sideways, which clips anything outside its box, so it
   carries padding for the hover lift and shadow and cancels it with
   negative margins to keep the cards aligned with the text. */
.daily-row {
  list-style: none;
  margin: calc(2.5rem - 16px) -24px -40px;
  padding: 16px 24px 40px;
  scroll-padding-inline: 24px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.daily-row::-webkit-scrollbar {
  display: none;
}

@media (max-width: 767px) {
  .daily-row {
    grid-auto-columns: 62%;
    margin-inline: -1.25rem;
    padding-inline: 1.25rem;
    scroll-padding-inline: 1.25rem;
  }
}
.daily-item {
  scroll-snap-align: start;
}
.daily-item figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.daily-shot {
  display: block;
  padding: 6px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.daily-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  cursor: zoom-in;
}
.daily-shot:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -16px rgba(30, 24, 12, 0.25);
}

/* ---- Picto -------------------------------------------------------- */
.pc {
  width: 320px;
}

.pc-card {
  position: relative;
  transform-style: preserve-3d;
}

.pc-main {
  position: relative;
  z-index: 2;
  width: 250px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--mk-shadow);
  transform: translateZ(50px);
  background: #111;
}

.pc-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 3.2s ease-out;
}
.pc-shot.is-on {
  opacity: 1;
  transform: scale(1);
}

.pc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.pc-author {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.9;
}

.pc-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  transition: opacity 0.3s ease;
}
.pc-title.is-swap {
  opacity: 0;
}

.pc-panel {
  position: relative;
  z-index: 1;
  margin-top: -200px;
  padding: 216px 22px 22px;
  border-radius: 36px;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  box-shadow: var(--mk-shadow);
  display: grid;
  gap: 16px;
}

.pc-input {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--mk-line);
  background: var(--mk-soft);
  font-size: 12px;
  color: var(--mk-fg);
}

.pc-caret {
  width: 1.5px;
  height: 14px;
  margin-left: 2px;
  background: #1f63d6;
  animation: pc-blink 1s steps(1) infinite;
}

@keyframes pc-blink {
  50% {
    opacity: 0;
  }
}
.pc-fonts, .pc-aligns {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.pc-font {
  flex: 1;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.pc-font img {
  width: 18px;
  filter: var(--mk-icon);
}
.pc-font.is-on {
  border-color: #1f63d6;
  background: var(--mk-soft);
}

.pc-aligns {
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--mk-line);
  background: var(--mk-bg);
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.18);
  margin-bottom: -44px;
  transform: translateZ(30px);
}

.pc-align {
  flex: 1;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  transition: background 0.3s ease;
}
.pc-align img {
  height: 13px;
  filter: var(--mk-icon);
}
.pc-align.is-on {
  background: #1f63d6;
}
.pc-align.is-on img {
  filter: invert(1);
}

.pc-float {
  position: absolute;
  z-index: 3;
  width: 104px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid var(--mk-bg);
  box-shadow: var(--mk-shadow);
}

.pc-float--1 {
  top: 26px;
  left: -62px;
  animation: pc-float 14s ease-in-out infinite;
}

.pc-float--2 {
  top: 168px;
  right: -54px;
  animation: pc-float 12s ease-in-out -5s infinite;
}

@keyframes pc-float {
  0%, 100% {
    transform: translateZ(90px) translateY(0);
  }
  50% {
    transform: translateZ(90px) translateY(-8px);
  }
}
/* ---- Custom domain ------------------------------------------------- */
/* A stck.me creator homepage in a card; .cd-page.is-on is the creator on
   show, and .cd.is-on flips its address from name.stck.me to its own domain. */
.cd {
  width: 340px;
}

.cd-card {
  position: relative;
  z-index: 2;
  height: 392px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  box-shadow: var(--mk-shadow);
  color: var(--mk-fg);
}

.cd-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-page.is-on {
  opacity: 1;
  transform: none;
}

.cd-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  font-size: 11.5px;
  color: var(--mk-muted);
  background: linear-gradient(270deg, #f2f1fc, #e4faeb, #f2f1fc);
  background-size: 200% 100%;
  animation: cd-waves 5s ease infinite;
}

:root[data-theme=dark] .cd-bar {
  background-image: linear-gradient(270deg, #262438, #1d3328, #262438);
}

@keyframes cd-waves {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
.cd-old {
  position: relative;
  transition: color 0.4s ease;
}
.cd-old::after {
  content: "";
  position: absolute;
  left: 0;
  top: 52%;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cd-new {
  color: var(--mk-muted);
  transition: color 0.4s ease;
}

.cd-toggle {
  flex: none;
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  transition: background 0.35s ease;
}
.cd-toggle i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #168039;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s ease;
}

.cd.is-on .cd-page.is-on .cd-toggle {
  background: #168039;
  border-color: #168039;
}
.cd.is-on .cd-page.is-on .cd-toggle i {
  transform: translateX(15px);
  background: #fff;
}

.cd.is-on .cd-page.is-on .cd-old::after {
  transform: scaleX(1);
}

.cd.is-on .cd-page.is-on .cd-new {
  color: var(--mk-fg);
  font-weight: 700;
}

/* Creator top bar */
.cd-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: 10.5px;
  border-bottom: 1px solid var(--mk-line);
}

.cd-nav-av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 10px;
}

.cd-tick {
  width: 11px;
}

.cd-nav-r {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cd-chip {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  background: var(--mk-soft);
}

.cd-dot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mk-soft);
}
.cd-dot i {
  width: 7px;
  height: 1.3px;
  border-radius: 1px;
  background: currentColor;
}

/* Profile */
.cd-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 26px 12px;
}

.cd-avatar {
  position: relative;
}

.cd-av {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 28px;
}

.cd-mono {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
}

.cd-mono--serif {
  font-family: Georgia, serif;
  font-weight: 700;
}

.cd-star {
  position: absolute;
  width: 7px;
  animation: cd-blink 2.4s ease-in-out infinite;
}

.cd-star--1 {
  top: 40px;
  left: -8px;
}

.cd-star--2 {
  top: -2px;
  left: 8px;
  animation-delay: -0.8s;
}

.cd-star--3 {
  top: 14px;
  left: -6px;
  width: 5px;
  animation-delay: -1.6s;
}

@keyframes cd-blink {
  0%, 100% {
    opacity: 0.9;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.2;
    transform: scale(0.5);
  }
}
.cd-name {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cd-name img {
  width: 13px;
}

.cd-bio {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--mk-muted);
}

.cd-meta {
  margin-top: 6px;
  font-size: 10px;
  color: var(--mk-muted);
}
.cd-meta b {
  color: var(--mk-fg);
  margin-left: 6px;
}
.cd-meta b:first-child {
  margin-left: 0;
}

.cd-socials {
  display: flex;
  gap: 9px;
  margin-top: 8px;
  color: var(--mk-fg);
}
.cd-socials svg {
  width: 13px;
  height: 13px;
}

.cd-btns {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}

.cd-follow, .cd-support {
  flex: 1;
  padding: 9px 0;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: #4d6eff;
  color: #fff;
}

.cd-support {
  background: #f7cc3f;
  color: #111;
}

/* Tabs + a post */
.cd-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0 14px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mk-muted);
  border-bottom: 1px solid var(--mk-line);
}
.cd-tabs span {
  padding: 8px 0;
}
.cd-tabs b {
  color: #4d6eff;
  font-weight: 600;
  margin-left: 2px;
}
.cd-tabs .is-on {
  color: var(--mk-fg);
  box-shadow: inset 0 -2px 0 var(--mk-fg);
}

.cd-post {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}
.cd-post img {
  width: 74px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
}
.cd-post span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cd-post b {
  font-size: 12px;
  font-weight: 700;
}
.cd-post em {
  font-style: normal;
  font-size: 10px;
  line-height: 1.5;
  color: var(--mk-muted);
}

/* The rest of the array, peeking out underneath */
.cd-ghost {
  position: absolute;
  left: 50%;
  height: 200px;
  border-radius: 16px;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  box-shadow: var(--mk-shadow);
  transform: translateX(-50%);
}

.cd-ghost--1 {
  z-index: 1;
  width: 310px;
  bottom: -12px;
  opacity: 0.8;
}

.cd-ghost--2 {
  z-index: 0;
  width: 280px;
  bottom: -24px;
  opacity: 0.5;
}

.cd-globe {
  position: absolute;
  z-index: 3;
  top: 46%;
  left: -30px;
  width: 54px;
  height: 54px;
  padding: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  animation: sw-float-z 6s ease-in-out infinite;
}
.cd-globe img {
  width: 100%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 10px rgba(142, 120, 231, 0.16);
  animation: cd-spin 15s linear infinite;
}

@keyframes cd-spin {
  to {
    transform: rotate(-360deg);
  }
}
/* ---- Visualise AI ------------------------------------------------- */
/* JS types the paragraph into .va-text, then .va-gen.is-gen runs the
   progress bar and .is-done brings the matching image into focus. */
.va {
  width: 340px;
}

.va-write {
  position: relative;
  width: 270px;
  min-height: 196px;
  padding: 30px 22px 22px;
  border-radius: 20px;
  background: var(--mk-bg);
  color: var(--mk-fg);
  box-shadow: var(--mk-shadow);
}

.va-ask {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 999px;
  background: #447fe4;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 10px 20px -6px rgba(68, 127, 228, 0.6);
}
.va-ask img {
  width: 16px;
}

.va-write p {
  font-size: 11.5px;
  line-height: 1.65;
  overflow: hidden;
}

.va-drop {
  float: left;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 4px 10px 0 0;
  border: 2px solid var(--mk-fg);
  border-radius: 0 12px 12px 12px;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
}

.va-caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: #447fe4;
  animation: pc-blink 1s steps(1) infinite;
}

.va.is-typed .va-caret {
  opacity: 0;
  animation: none;
}

.va-gen {
  position: relative;
  width: 214px;
  margin: -64px 0 0 120px;
}

.va-frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  border: 4px solid var(--mk-bg);
  box-shadow: var(--mk-shadow);
  overflow: hidden;
  background: linear-gradient(110deg, var(--mk-soft) 30%, var(--mk-bg) 50%, var(--mk-soft) 70%) 0 0/300% 100%;
  animation: va-shimmer 1.6s linear infinite;
}

@keyframes va-shimmer {
  to {
    background-position: -150% 0;
  }
}
.va-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(18px) saturate(0.3) brightness(1.15);
  transform: scale(1.06);
  transition: opacity 0.6s ease, filter 2.4s ease, transform 2.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.va-gen.is-gen .va-img.is-on {
  opacity: 1;
}

.va-gen.is-done .va-img.is-on {
  filter: none;
  transform: none;
}

.va-progress {
  position: absolute;
  left: 50%;
  bottom: -16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: #168039;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 10px 20px -8px rgba(22, 128, 57, 0.7);
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.va-gen.is-gen .va-progress {
  opacity: 1;
  transform: translate(-50%, 0);
}

.va-gen.is-done .va-progress {
  opacity: 0;
  transition-delay: 0.8s;
}

.va-progress i {
  width: 34px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.va-progress b {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}

.va-gen.is-gen .va-progress b {
  width: 100%;
  transition: width 2.4s ease-in-out;
}

/* ---- Phone frame (Petdoo, Comments) ------------------------------- */
.ph {
  position: relative;
  width: 248px;
  height: 440px;
  border-radius: 34px;
  border: 6px solid #15161a;
  background: var(--mk-bg);
  color: var(--mk-fg);
  box-shadow: var(--mk-shadow);
  overflow: hidden;
  padding-top: 12px;
}

:root[data-theme=dark] .ph {
  border-color: #34363c;
}

/* ---- Petdoo ------------------------------------------------------- */
.pd {
  position: relative;
}

.pd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
}

.pd-logo {
  width: 20px;
  fill: currentColor;
}

.pd-bell {
  width: 16px;
}

.pd-hi {
  padding: 4px 16px 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.pd-sub {
  padding: 2px 16px 0;
  font-size: 10px;
  color: var(--mk-muted);
}

.pd-tabs {
  display: flex;
  gap: 12px;
  margin: 12px 16px 0;
  font-size: 9.5px;
  color: var(--mk-muted);
  border-bottom: 1px solid var(--mk-line);
}
.pd-tabs span {
  padding-bottom: 6px;
  white-space: nowrap;
}
.pd-tabs .is-on {
  color: var(--mk-fg);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--mk-fg);
}

.pd-rail {
  overflow: hidden;
  padding: 12px 0 0 16px;
}

.pd-track {
  display: flex;
  gap: 10px;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.pd-card {
  flex: none;
  width: 128px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pd-img {
  position: relative;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--mk-soft);
}
.pd-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-heart {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.pd-heart svg {
  width: 12px;
  fill: #c9c9c9;
  transition: fill 0.2s ease, transform 0.4s cubic-bezier(0.34, 1.8, 0.64, 1);
}
.pd-heart::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #ef4b5c;
  opacity: 0;
}
.pd-heart.is-liked svg {
  fill: #ef4b5c;
  transform: scale(1.25);
}
.pd-heart.is-tap::after {
  animation: pd-ring 0.6s ease-out;
}

@keyframes pd-ring {
  from {
    opacity: 1;
    transform: scale(0.8);
  }
  to {
    opacity: 0;
    transform: scale(2);
  }
}
.pd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.pd-breed {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 7.5px;
  background: var(--mk-soft);
  white-space: nowrap;
}

.pd-row em {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 600;
  color: #3c9a52;
}

.pd-card b {
  font-size: 12px;
}

.pd-card small {
  font-size: 8.5px;
  color: var(--mk-muted);
}

.pd-near {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 14px 16px 0;
  padding-top: 12px;
  border-top: 1px solid var(--mk-line);
  font-size: 12px;
}
.pd-near em {
  font-style: normal;
  font-size: 9px;
  color: var(--mk-muted);
}
.pd-near span {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
}

.pd-chips {
  display: flex;
  gap: 5px;
  margin: 8px 16px 0;
  overflow: hidden;
}
.pd-chips span {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 8.5px;
  border: 1px solid var(--mk-line);
}

.pd-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 12px 20px 16px;
  background: var(--mk-bg);
  border-top: 1px solid var(--mk-line);
}
.pd-nav i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--mk-soft);
}
.pd-nav i.is-on {
  background: #4c3fc7;
}

.pd-toast {
  position: absolute;
  left: 50%;
  bottom: 74px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 600;
  background: #15161a;
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pd-toast svg {
  width: 11px;
  fill: #ef4b5c;
}
.pd-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- Headlines ---------------------------------------------------- */
/* One story fills the phone; the top card swipes off to reveal the next. */
.hl-ph {
  background: #111;
}

.hl-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--tint);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease, border-radius 0.5s ease;
}
.hl-card[data-pos="0"] {
  z-index: 4;
}
.hl-card[data-pos="1"] {
  z-index: 3;
  transform: scale(0.94);
  opacity: 0.6;
}

.hl-card[data-pos="2"], .hl-card[data-pos="3"] {
  z-index: 1;
  opacity: 0;
}

.hl-card.is-out {
  z-index: 5;
  border-radius: 24px;
  transform: translateX(-115%) rotate(-8deg);
  transition-timing-function: cubic-bezier(0.55, 0, 0.75, 0.2), ease, ease;
}

.hl-img {
  position: absolute;
  inset: 0 0 40% 0;
  background-size: cover;
  background-position: center;
}
.hl-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 25%, transparent 45%, var(--tint));
}

.hl-card--plain {
  background: radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.18), transparent 45%), var(--tint);
}

.hl-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 18px 22px;
}

.hl-tag {
  align-self: flex-start;
  padding-bottom: 3px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
}

.hl-body b {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hl-body p {
  font-size: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.hl-body time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.8);
}

.hl-share {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
}
.hl-share svg {
  width: 12px;
}

.hl-hint {
  position: absolute;
  z-index: 6;
  right: 10px;
  top: 40%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #2f6fec;
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(47, 111, 236, 0.7);
  animation: hl-nudge 2.2s ease-in-out infinite;
}

.hl-hint {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.hl-hint.is-gone {
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}

@keyframes hl-nudge {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: -6px 0;
  }
}
/* ---- Comments ----------------------------------------------------- */
.cm-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 4px 12px 0;
  padding: 6px;
  border-radius: 8px;
  font-size: 9.5px;
  background: var(--mk-soft);
}
.cm-url svg {
  width: 9px;
  fill: currentColor;
}

.cm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--mk-line);
}
.cm-head b {
  font-size: 13px;
}
.cm-head i {
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  color: var(--mk-muted);
}

.cm-list {
  padding: 0 14px;
}

.cm-compose {
  max-height: 170px;
  overflow: hidden;
  padding-top: 12px;
  transition: max-height 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease, padding 0.5s ease;
}

.cm.is-sent .cm-compose {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
}

.cm-who {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cm-who span:last-child {
  display: flex;
  flex-direction: column;
}
.cm-who b {
  font-size: 10.5px;
}
.cm-who small {
  font-size: 8px;
  color: var(--mk-muted);
}

.cm-av {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--av);
}

.cm-box {
  position: relative;
  min-height: 70px;
  margin-top: 8px;
  padding: 8px 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--mk-line);
  font-size: 10px;
  line-height: 1.5;
}

.cm-caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  vertical-align: -0.2em;
  background: #2f6fec;
  animation: pc-blink 1s steps(1) infinite;
}

.cm-count {
  position: absolute;
  right: 8px;
  bottom: 4px;
  font-size: 7.5px;
  color: var(--mk-muted);
}

.cm-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--mk-muted);
}

.cm-submit {
  padding: 6px 12px;
  border-radius: 5px;
  background: #2f6fec;
  color: #fff;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.cm.is-press .cm-submit {
  transform: scale(0.9);
}

.cm-item {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--mk-line);
}

.cm-compose + .cm-new .cm-item:first-child {
  border-top: 0;
}

.cm-item > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.cm-item b {
  font-size: 10.5px;
}

.cm-item small {
  font-size: 8px;
  color: var(--mk-muted);
}

.cm-item p {
  font-size: 9.5px;
  line-height: 1.5;
}

.cm-links {
  display: flex;
  gap: 10px;
  font-size: 8.5px;
  font-weight: 600;
  color: #2f6fec;
}
.cm-links i {
  font-style: normal;
  color: var(--mk-muted);
  font-weight: 400;
}

.cm-new {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease 0.15s;
}

.cm.is-sent .cm-new {
  max-height: 320px;
  opacity: 1;
}

/* Only the visible label takes up room, so the badge fits its text */
.cm-badge {
  position: relative;
  display: inline-flex;
  font-size: 8px;
  font-weight: 600;
}
.cm-badge em {
  font-style: normal;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 3px;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cm-badge em:first-child {
  background: #fff6c2;
  color: #6b5800;
  border: 1px solid #f0d64a;
}
.cm-badge em:last-child {
  position: absolute;
  left: 0;
  top: 0;
  background: #e1f5e4;
  color: #1f7a35;
  border: 1px solid #9fd8aa;
  opacity: 0;
  transform: scale(0.6);
}

.cm.is-approved .cm-badge em:first-child {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: scale(0.6);
}

.cm.is-approved .cm-badge em:last-child {
  position: static;
  opacity: 1;
  transform: none;
}

.cm-reply {
  padding-left: 22px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease;
}

.cm.is-replied .cm-reply {
  max-height: 140px;
  opacity: 1;
}

/* ---- Earnings ----------------------------------------------------- */
.sw-stage--earnings-redesign {
  background: #fafafa;
}

.er {
  width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.er-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transform: translateZ(40px);
}

.er-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.er-amount {
  display: flex;
  align-items: center;
  gap: 6px;
}
.er-amount b {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.er-amount img {
  width: 30px;
}

.er-stack {
  position: relative;
  width: 300px;
  height: 230px;
  margin-top: 8px;
  transform-style: preserve-3d;
}

.er-card {
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  color: var(--mk-fg);
  box-shadow: var(--mk-shadow);
  transform-origin: 50% 0;
  animation: er-cycle 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.er-card--2 {
  animation-delay: -3s;
}

.er-card--3 {
  animation-delay: -6s;
}

@keyframes er-cycle {
  0% {
    transform: translateY(-44px) scale(0.84);
    opacity: 0;
    z-index: 1;
  }
  4%, 30% {
    transform: translateY(-44px) scale(0.84);
    opacity: 1;
    z-index: 1;
  }
  36%, 63% {
    transform: translateY(-22px) scale(0.92);
    opacity: 1;
    z-index: 2;
  }
  69%, 92% {
    transform: translateY(0) scale(1);
    opacity: 1;
    z-index: 3;
  }
  98%, 100% {
    transform: translateY(40px) scale(1.03);
    opacity: 0;
    z-index: 3;
  }
}
.er-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.er-user img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.er-user span {
  display: flex;
  flex-direction: column;
}
.er-user b {
  font-size: 14px;
  font-weight: 600;
}
.er-user em {
  font-style: normal;
  font-size: 12px;
  color: var(--mk-muted);
}

.er-card p {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.er-card time {
  font-size: 11px;
  color: var(--mk-muted);
}

.er-coin {
  position: absolute;
  z-index: 5;
  width: 42px;
  transform: translateZ(90px);
  animation: sw-float-z 6s ease-in-out infinite;
}

.er-coin--1 {
  top: 70px;
  right: -26px;
}

.er-coin--2 {
  bottom: -10px;
  left: -28px;
  animation-delay: -2s;
}

.er-coin--3 {
  bottom: -34px;
  right: 12px;
  animation-delay: -4s;
}

.er-ring {
  position: absolute;
  width: 14px;
  transform: translateZ(50px);
}

.er-ring--1 {
  top: 30px;
  left: -18px;
}

.er-ring--2 {
  top: 190px;
  right: -40px;
}

/* ---- Instagram signup -------------------------------------------- */
.ig {
  width: 300px;
}

.ig-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  background: var(--mk-bg);
  border: 1px solid var(--mk-line);
  color: var(--mk-fg);
  box-shadow: var(--mk-shadow);
  transform: translateZ(30px);
}

.ig-h {
  margin-top: 4px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.ig-sub {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--mk-muted);
  margin-bottom: 4px;
}

.ig-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border-radius: 999px;
  border: 1px solid var(--mk-line);
  background: var(--mk-bg);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.18);
}

.ig-google {
  border-radius: 20px;
  overflow: hidden;
  animation: ig-google 7s ease infinite;
}

.ig-btn--google {
  animation: ig-gbtn 7s ease infinite;
}

.ig-warn {
  max-height: 0;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--mk-muted);
  animation: ig-warn 7s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.ig-warn p {
  padding: 10px 14px 8px;
}

.ig-open {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-top: 1px solid var(--mk-line);
  font-weight: 600;
  color: var(--mk-fg);
}
.ig-open i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: conic-gradient(#ea4335 0 33%, #fbbc05 0 66%, #34a853 0);
  box-shadow: inset 0 0 0 3px transparent;
  position: relative;
}
.ig-open i::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #4285f4;
  border: 1px solid #fff;
}
.ig-open b {
  margin-left: auto;
}

.ig-tap {
  position: absolute;
  left: 60%;
  top: 0;
  width: 26px;
  height: 26px;
  margin: -13px;
  border-radius: 50%;
  background: rgba(var(--fg-rgb), 0.25);
  border: 2px solid rgba(var(--fg-rgb), 0.5);
  pointer-events: none;
  animation: ig-tap 7s ease infinite;
}

@keyframes ig-tap {
  0% {
    opacity: 0;
    transform: translate(60px, 260px) scale(1);
  }
  12% {
    opacity: 1;
    transform: translate(60px, 260px) scale(1);
  }
  26% {
    opacity: 1;
    transform: translate(0, 196px) scale(1);
  }
  30% {
    opacity: 1;
    transform: translate(0, 196px) scale(0.7);
  }
  34%, 100% {
    opacity: 0;
    transform: translate(0, 196px) scale(1.6);
  }
}
@keyframes ig-google {
  0%, 30% {
    background: transparent;
  }
  36%, 90% {
    background: var(--mk-soft);
  }
  100% {
    background: transparent;
  }
}
@keyframes ig-gbtn {
  0%, 30% {
    opacity: 1;
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.18);
  }
  36%, 90% {
    opacity: 0.55;
    box-shadow: none;
  }
  100% {
    opacity: 1;
  }
}
@keyframes ig-warn {
  0%, 32% {
    max-height: 0;
  }
  42%, 88% {
    max-height: 130px;
  }
  100% {
    max-height: 0;
  }
}
/* ---- 3D book (Stck Books) ---------------------------------------- */
.sw-stage--print-edition {
  background: #efe7da;
}

.bk-scene {
  --u: 3.15px;
  --paper: #f7f1e3;
  --paper-line: #e2d8c3;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 2400px;
  touch-action: pan-y;
  cursor: grab;
  outline: none;
}

@media (max-width: 520px) {
  .bk-scene {
    --u: 2.5px;
  }
}
.bk-scene.is-dragging {
  cursor: grabbing;
}

.has-custom-cursor .bk-scene {
  cursor: none;
}

.bk-tilt {
  transform-style: preserve-3d;
  transform: translateY(calc(var(--u) * -6)) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
}

.bk-floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--u) * 86);
  height: calc(var(--u) * 13);
  transform: translate(-50%, calc(var(--u) * 46)) scaleX(var(--shadow-x, 1));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 24, 8, 0.32), transparent);
  filter: blur(6px);
  pointer-events: none;
}

.bk-note {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--foreground);
  pointer-events: none;
}
.bk-note.glass {
  box-shadow: none;
}

.bk {
  --board: calc(var(--w) * 0.035);
  --t: calc(var(--w) * 0.022);
  position: relative;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  transition: --board 0.5s ease, --t 0.5s ease;
}
.bk.soft {
  --board: calc(var(--w) * 0.012);
  --t: calc(var(--w) * 0.004);
}

.bk-face {
  position: absolute;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.bk-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #000;
  opacity: var(--shade, 0);
  pointer-events: none;
}

.bk-fboard {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--d) / 2));
}

.bk-front, .bk-back {
  inset: 0;
  border-radius: 3px;
}

.bk-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.bk-back {
  transform: rotateY(180deg) translateZ(calc(var(--d) / 2));
  background-color: var(--spine);
}

.soft .bk-front {
  border-radius: 2px 6px 6px 2px;
}

.soft .bk-back {
  border-radius: 6px 2px 2px 6px;
}

.bk-spine, .bk-edge, .bk-spin {
  top: 0;
  height: var(--h);
  width: var(--d);
  left: calc(50% - var(--d) / 2);
}

.bk-spine {
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background-color: var(--spine);
}

.bk-spin {
  transform: rotateY(90deg) translateZ(calc(var(--w) / -2 + 0.5px));
  background: color-mix(in srgb, var(--spine) 65%, #000);
}

.bk-edge {
  top: var(--board);
  height: calc(var(--h) - var(--board) * 2);
  width: calc(var(--d) - var(--t) * 2);
  left: calc(50% - var(--d) / 2 + var(--t));
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - var(--board)));
  background: repeating-linear-gradient(90deg, var(--paper) 0 2px, var(--paper-line) 2px 3px), var(--paper);
}

.bk-top, .bk-bottom {
  left: 0;
  width: calc(var(--w) - var(--board));
  height: calc(var(--d) - var(--t) * 2);
  top: calc(50% - var(--d) / 2 + var(--t));
  background: repeating-linear-gradient(0deg, var(--paper) 0 2px, var(--paper-line) 2px 3px), var(--paper);
}

.bk-top {
  transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - var(--board)));
}

.bk-bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - var(--board)));
}

.bk-top::before, .bk-bottom::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3%;
  background: repeating-linear-gradient(0deg, var(--spine-ink) 0 2px, var(--spine) 2px 4px);
}

.soft .bk-top::before, .soft .bk-bottom::before {
  display: none;
}

.bk-cin, .bk-bin {
  inset: 0;
  background: color-mix(in srgb, var(--spine) 55%, var(--paper));
}

.bk-cin {
  transform: translateZ(calc(var(--t) * -1)) rotateY(180deg);
}

.bk-bboard {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--d) / -2 + var(--t)));
}

.bk-bedge {
  background: color-mix(in srgb, var(--spine) 75%, #000);
}
.bk-bedge.r {
  top: 0;
  height: 100%;
  width: var(--t);
  left: calc(100% - var(--t) / 2);
  transform: translateZ(calc(var(--t) / -2)) rotateY(90deg);
}

.bk-bedge.t, .bk-bedge.b {
  left: 0;
  width: 100%;
  height: var(--t);
}

.bk-bedge.t {
  top: calc(var(--t) / -2);
  transform: translateZ(calc(var(--t) / -2)) rotateX(90deg);
}

.bk-bedge.b {
  top: calc(100% - var(--t) / 2);
  transform: translateZ(calc(var(--t) / -2)) rotateX(-90deg);
}

.bk-front::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5.5%;
  width: 2px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 2px 0 0 rgba(255, 255, 255, 0.14);
  z-index: 2;
}

.soft .bk-front::before {
  left: 3%;
  width: 1px;
}

.bk-spine::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.08) 12%, rgba(255, 255, 255, 0.06) 32%, rgba(255, 255, 255, 0.12) 48%, rgba(255, 255, 255, 0.04) 66%, rgba(0, 0, 0, 0.08) 86%, rgba(0, 0, 0, 0.28) 100%);
}

.bk-gloss {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.16) 45%, transparent 60%);
  background-size: 300% 100%;
  background-position: var(--gloss-x, 50%) 0;
  pointer-events: none;
}

.bk-cloth {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.bk-sp {
  position: absolute;
  inset: 0;
  z-index: 1;
  writing-mode: vertical-rl;
  text-orientation: sideways;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4%;
  padding: 7% 0;
  white-space: nowrap;
  color: var(--spine-ink);
  font-family: var(--font-display);
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.18), 0 -0.5px 0 rgba(0, 0, 0, 0.22);
}
.bk-sp > * {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-sp-a {
  font-size: calc(var(--u) * 1.8);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bk-sp-t {
  font-size: calc(var(--u) * 3);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-inline-size: 62%;
}

.bk-sp-p {
  font-size: calc(var(--u) * 1.4);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.bk-bc {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 12% 13% 10% 11%;
  display: flex;
  flex-direction: column;
  gap: 5%;
  color: var(--spine-ink);
  font-family: Georgia, serif;
  font-size: calc(var(--w) * 0.05);
  line-height: 1.45;
}
.bk-bc b {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: calc(var(--w) * 0.03);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bk-bc .foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.bk-bc .price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--w) * 0.06);
}

.bk-barcode {
  background: #fff;
  padding: 4% 5% 2%;
  width: 44%;
  color: #111;
  font: 500 calc(var(--w) * 0.024)/1.4 ui-monospace, monospace;
  text-align: center;
  letter-spacing: 0.08em;
}
.bk-barcode i {
  display: block;
  height: calc(var(--w) * 0.1);
  background: repeating-linear-gradient(90deg, #111 0 2px, #fff 2px 3px, #111 3px 4px, #fff 4px 7px, #111 7px 10px, #fff 10px 11px, #111 11px 12px, #fff 12px 14px);
}

@media (prefers-reduced-motion: reduce) {
  .sw-mark {
    transition: none;
  }
}
.case {
  padding: 1.5rem 1.5rem 6rem;
}

@media (min-width: 640px) {
  .case {
    padding: 1.5rem 2.5rem 6rem;
  }
}
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--foreground);
}

.case-hero {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 2rem;
}

@media (min-width: 640px) {
  .case-hero {
    padding: 3rem;
  }
}
.watermark {
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 22vw;
  line-height: 1;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

@media (min-width: 640px) {
  .watermark {
    font-size: 180px;
  }
}
.case-eyebrow {
  position: relative;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

.case-title {
  position: relative;
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-size: 2.5rem;
}

@media (min-width: 640px) {
  .case-title {
    font-size: 4rem;
  }
}
.case-subtitle {
  position: relative;
  margin-top: 0.75rem;
  max-width: 28rem;
  font-size: 1.125rem;
  opacity: 0.8;
}

.case-head {
  max-width: 48rem;
  margin: 1.75rem auto 0;
}
.case-head .case-eyebrow {
  color: var(--muted);
  opacity: 1;
}
.case-head .case-title {
  color: var(--foreground);
}
.case-head .case-subtitle {
  color: rgba(var(--fg-rgb), 0.72);
  opacity: 1;
}

.case-body {
  max-width: 48rem;
  margin: 0 auto;
}

.case {
  container-type: inline-size;
}

.case-wide {
  width: min(64rem, 100cqw);
  margin-left: calc(50% - min(64rem, 100cqw) / 2);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  padding: 2.5rem 0;
}

@media (min-width: 640px) {
  .meta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.meta-card {
  padding: 1.4rem 1.5rem 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background-color: var(--surface);
  background-image: radial-gradient(135% 120% at 0% 0%, var(--meta-tint, transparent), transparent 68%);
}

.case-hero--proto {
  --pr-h: 420px;
  --sc-ink: var(--ink);
  display: block;
  max-width: 48rem;
  min-height: 0;
  padding: 1.75rem 1.75rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--aside-wash);
}

:root[data-theme=dark] .case-hero--proto {
  --sc-ink: color-mix(in srgb, var(--ink) 50%, #fff);
}

@media (max-width: 639px) {
  .case-hero--proto {
    --pr-h: 300px;
    padding: 1rem 1rem 0.9rem;
  }
}
:where(.case-hero--proto button) {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---- Devices ------------------------------------------------------- */
.pr-device {
  position: relative;
  margin: 0 auto;
}

.pr-device--browser {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 22px 44px -22px rgba(0, 0, 0, 0.3);
}

.pr-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #ececec;
  background: #f6f6f6;
}
.pr-chrome i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dcdcdc;
}
.pr-chrome span {
  margin: 0 auto;
  padding: 0.15rem 2.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #666;
  background: #fff;
}

.pr-screens {
  position: relative;
  height: var(--pr-h);
  overflow: hidden;
  cursor: pointer;
}

.pr-device--none .pr-screens {
  border-radius: 12px;
}

.pr-device--browser .pr-screens {
  height: calc(var(--pr-h) - 2rem);
}

.pr-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform-origin: 0 0;
  will-change: transform, opacity;
}
.pr-step.is-on {
  visibility: visible;
}

.pr-shot {
  position: relative;
  overflow: hidden;
  width: min(100%, var(--pr-h) * var(--r));
  aspect-ratio: var(--r);
  max-height: 100%;
  background-repeat: no-repeat;
}

.pr-device--browser .pr-shot {
  width: min(100%, (var(--pr-h) - 2rem) * var(--r));
}

.pr-step:has(.pr-shot--page) {
  align-items: flex-start;
}

.pr-shot.pr-shot--page {
  width: 100%;
  max-height: none;
  margin: auto 0;
}

.pr-device--none .pr-shot {
  border-radius: 10px;
}

.pr-device--browser .pr-shot--page {
  border-radius: 0;
}

.pr-device--phone .pr-shot {
  border: 7px solid #111;
  border-radius: 30px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.45);
}

/* ---- Cursor -------------------------------------------------------- */
.pr-cursor {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: #111;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  transform-origin: 4px 2px;
  will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* centre flash when the film is paused or played, like a video player */
.pr-flash {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(14, 16, 22, 0.5) center/26px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M7 5h3.5v14H7zM13.5 5H17v14h-3.5z'/%3E%3C/svg%3E");
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
}
.pr-flash.is-play {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5.5v13l10.5-6.5z'/%3E%3C/svg%3E");
}
.pr-flash.is-on {
  animation: pr-flash 0.7s ease-out;
}

@keyframes pr-flash {
  from {
    opacity: 1;
    transform: scale(0.8);
  }
  to {
    opacity: 0;
    transform: scale(1.25);
  }
}
/* ---- Caption and player ------------------------------------------- */
.pr-bar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.pr-cap {
  display: flex;
  gap: 0.5rem;
  min-height: 2.6em;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(var(--fg-rgb), 0.7);
}
.pr-cap b {
  flex: none;
  color: var(--sc-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pr-text.is-in {
  animation: pr-cap-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes pr-cap-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.pr-name {
  font-weight: 700;
  color: var(--foreground);
}

.pr-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pr-play {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color 0.2s ease;
}
.pr-play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.pr-play .pr-i-play {
  display: none;
}
.pr-play:hover {
  border-color: var(--sc-ink);
}

.case-hero--proto.is-paused .pr-i-pause {
  display: none;
}
.case-hero--proto.is-paused .pr-i-play {
  display: inline;
}

.pr-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(var(--fg-rgb), 0.12);
  cursor: pointer;
  touch-action: none;
}
.pr-track::before {
  content: "";
  position: absolute;
  inset: -10px 0;
}
.pr-track:focus-visible {
  outline: 2px solid var(--sc-ink);
  outline-offset: 4px;
}

.pr-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--sc-ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.pr-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  background: var(--aside-wash);
  pointer-events: none;
}

/* ---- Before / after compare (Earnings) ---------------------------- */
.pr-compare {
  position: relative;
  --pos: 50%;
  width: min(100%, var(--pr-h) * var(--r));
  margin: 0 auto;
  aspect-ratio: var(--r);
  overflow: hidden;
  touch-action: pan-y;
}
.pr-compare .pr-shot.pr-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  aspect-ratio: auto;
}

.pr-cmp-before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.pr-cmp-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.pr-cmp-handle {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: var(--sc-ink);
  pointer-events: none;
}
.pr-cmp-handle::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--sc-ink);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.pr-cmp-tag {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.pr-cmp-tag--old {
  left: 0.7rem;
}

.pr-cmp-tag--new {
  right: 0.7rem;
  background: var(--sc-ink);
}

/* ---- Still: one static screen (Headlines, Stck Sign-up Fix) ------------- */
.case-hero--proto.case-hero--still {
  padding-bottom: 1.75rem;
}
.case-hero--proto.case-hero--still .pr-screens {
  cursor: default;
}
.case-hero--proto.case-hero--still .pr-step {
  opacity: 1;
}

@media (max-width: 639px) {
  .case-hero--proto.case-hero--still {
    padding-bottom: 1rem;
  }
}
/* Flat cards, each a single soft colour drawn from the aside-panel palette. */
.meta-card:nth-child(1) {
  --meta-tint: rgba(59, 130, 246, 0.16);
}

/* blue */
.meta-card:nth-child(2) {
  --meta-tint: rgba(168, 85, 247, 0.16);
}

/* purple */
.meta-card:nth-child(3) {
  --meta-tint: rgba(242, 120, 75, 0.16);
}

/* orange */
.meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.meta-pills {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.meta-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--foreground);
  background: rgba(var(--glass-rgb), 0.65);
  white-space: nowrap;
}

.case-overview {
  padding: 3rem 0;
}

.overview-text {
  margin-top: 1rem;
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(var(--fg-rgb), 0.8);
}

@media (min-width: 640px) {
  .overview-text {
    font-size: 1.5rem;
  }
}
.overview-cta {
  margin-top: 1.75rem;
}

.case-section {
  border-top: 1px solid var(--line);
  padding: 3rem 0;
}

.case-section-heading {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .case-section-heading {
    font-size: 2.6rem;
  }
}
.case-section-body {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(var(--fg-rgb), 0.7);
}

.case-list {
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.case-list li {
  display: flex;
  gap: 1rem;
  color: rgba(var(--fg-rgb), 0.7);
}

.li-bullet {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 0.72rem;
  border-radius: 50%;
  background: var(--foreground);
}

.li-text {
  font-size: 1.125rem;
  line-height: 1.7;
}

.case-footer {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

/* ---- Case study: screenshots ---- */
.fig-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.fig {
  margin: 0;
}

.fig-frame {
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
}
.fig-frame img {
  display: block;
  width: 100%;
}

.fig-cap {
  margin-top: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.fig-tag {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #36c;
  opacity: 0.85;
}

.hiw-wrap {
  container-type: inline-size;
}

.hiw {
  --hiw-ink: var(--ink);
  margin-top: 2rem;
}

:root[data-theme=dark] .hiw {
  --hiw-ink: color-mix(in srgb, var(--ink) 45%, #fff);
}

.hiw > * + * {
  margin-top: 1.75rem;
}

/* ---- Screenshot ---------------------------------------------------- */
.hiw-frame {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--aside-wash);
  border: 1px solid var(--line);
}

.hiw-shot {
  position: absolute;
  inset: 5%;
  width: 90%;
  height: 90%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.12));
}
.hiw-shot.is-on {
  opacity: 1;
  transform: none;
}

/* ---- Steps --------------------------------------------------------- */
.hiw-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.6);
}

.hiw-steps {
  margin: 0.75rem 0 1.5rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.hiw-steps:last-child {
  margin-bottom: 0;
}

.hiw-step {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 0.5rem 0.85rem 1.25rem;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.hiw-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.3s ease, width 0.3s ease;
}
.hiw-step.is-on::before {
  width: 3px;
  background: var(--hiw-ink);
}
.hiw-step:focus-visible {
  outline: 2px solid var(--hiw-ink);
  outline-offset: 2px;
  border-radius: 8px;
}

.hiw-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--hiw-ink);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.is-on .hiw-tile {
  color: #fff;
  background: var(--hiw-ink);
  border-color: var(--hiw-ink);
}

:root[data-theme=dark] .is-on .hiw-tile {
  color: #111;
}

.hiw-text {
  display: block;
}

.hiw-title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}

.hiw-desc {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  transition: color 0.3s ease;
}
.is-on .hiw-desc {
  color: rgba(var(--fg-rgb), 0.72);
}

/* ---- Side by side when there's room -------------------------------- */
@container (min-width: 640px) {
  .hiw {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
  .hiw > * + * {
    margin-top: 0;
  }
  .hiw-visual {
    position: sticky;
    top: 6rem;
  }
  .hiw-frame {
    aspect-ratio: 5/4;
  }
}
.jm {
  --jm-ink: var(--ink);
  --jm-reader: #2f7d74;
  --jm-before: #8a847c;
  --jm-after: #1f9d5c;
  --jm-wall: #d1452c;
  --row-quotes: 150px;
  --row-curve: 220px;
  --row-loops: 64px;
  --row-phases: 72px;
  margin-top: 2rem;
}

:root[data-theme=dark] .jm {
  --jm-ink: color-mix(in srgb, var(--ink) 45%, #fff);
  --jm-reader: #5fc0b3;
  --jm-before: #8d8a85;
  --jm-after: #4cc488;
  --jm-wall: #ef7a5e;
}

.jm-tone--ink {
  --lane: var(--jm-ink);
}

.jm-tone--reader {
  --lane: var(--jm-reader);
}

.jm-tone--before {
  --lane: var(--jm-before);
}

.jm-tone--after {
  --lane: var(--jm-after);
}

/* ---- Persona / scenario / goal ------------------------------------- */
.jm-head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .jm-head {
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 2rem;
  }
}
.jm-head-label {
  padding-bottom: 0.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--jm-ink) 45%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jm-ink);
}

.jm-persona {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.jm-persona p b,
.jm-persona p span {
  display: block;
}
.jm-persona p b {
  font-size: 1rem;
}
.jm-persona p span {
  font-size: 0.85rem;
  color: var(--muted);
}

.jm-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  background: var(--jm-ink);
}

.jm-head-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(var(--fg-rgb), 0.75);
}

.jm-head-goal {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
}

/* ---- Board ---------------------------------------------------------- */
.jm-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--aside-wash);
}

@media (min-width: 640px) {
  .jm-board {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    padding: 1.75rem 1.5rem;
  }
}
.jm-rail {
  display: none;
}

@media (min-width: 640px) {
  .jm-rail {
    display: block;
  }
}
.jm-rail .jm-rail-label {
  display: flex;
  padding-right: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
}

.jm-rail-label.jm-row--quotes {
  height: var(--row-quotes);
  align-items: flex-end;
  padding-bottom: 0.25rem;
}

.jm-rail-label.jm-row--curve {
  height: var(--row-curve);
  align-items: center;
}

.jm-rail-label.jm-row--loops {
  height: var(--row-loops);
  align-items: center;
}

.jm-rail-label.jm-row--phases {
  height: var(--row-phases);
  align-items: center;
}

.jm-rail-label.jm-row--steps {
  padding-top: 0.6rem;
}

.jm-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 0.75rem;
  cursor: grab;
  padding-right: 1.25rem;
  margin-right: -1.25rem;
}
@media (min-width: 640px) {
  .jm-scroll {
    padding-right: 1.5rem;
    margin-right: -1.5rem;
  }
}
.jm-scroll {
  --fade-l: 0px;
  --fade-r: 0px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}
.jm-scroll.can-left {
  --fade-l: 1.25rem;
}
.jm-scroll.can-right {
  --fade-r: 2rem;
}
.jm-scroll.is-dragging {
  cursor: grabbing;
}
.jm-scroll:focus-visible {
  outline: 2px solid var(--jm-ink);
  outline-offset: 4px;
  border-radius: 8px;
}

.jm-row {
  position: relative;
}

.jm-svg {
  display: block;
  width: 100%;
  overflow: visible;
}

/* ---- Thoughts: quotes leaning up from the line ---------------------- */
.jm-row--quotes {
  height: var(--row-quotes);
}

.jm-quote {
  position: absolute;
  bottom: 0.2rem;
  transform-origin: 0 100%;
  transform: rotate(-55deg);
  white-space: nowrap;
  font-size: 0.78rem;
  font-style: italic;
  color: rgba(var(--fg-rgb), 0.62);
}

.jm-quote--key {
  font-weight: 700;
  font-style: normal;
  color: var(--foreground);
}

/* ---- Emotional experience ------------------------------------------ */
.jm-row--curve {
  height: var(--row-curve);
}

.jm-baseline {
  stroke: color-mix(in srgb, var(--jm-ink) 40%, transparent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.jm-area {
  fill: var(--lane);
  fill-opacity: 0.22;
}

.jm-curve {
  fill: none;
  stroke: var(--lane);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.jm-drop {
  stroke: var(--jm-ink);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
  opacity: 0.7;
  vector-effect: non-scaling-stroke;
}

.jm-pin,
.jm-dot,
.jm-knot {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.jm-pin {
  width: 6px;
  height: 6px;
  background: var(--jm-ink);
}

.jm-dot {
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 2px solid var(--jm-ink);
}

.jm-dot--big {
  width: 14px;
  height: 14px;
}

.jm-dot--wall {
  border-color: var(--jm-wall);
}

/* ---- Loops back ----------------------------------------------------- */
.jm-row--loops {
  height: var(--row-loops);
  color: var(--jm-wall);
}

.jm-loop-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  height: 1.5px;
  background: color-mix(in srgb, var(--jm-ink) 40%, transparent);
}

.jm-loop {
  position: absolute;
  top: 22px;
  height: 22px;
  border: 1.4px dashed currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.jm-loop::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: -4px;
  border: 4.5px solid transparent;
  border-top: 6px solid currentColor;
}

.jm-knot {
  top: 50px;
  width: 10px;
  height: 10px;
  background: currentColor;
}

.jm-loop-label {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: var(--jm-wall);
}

/* ---- Journey phases ------------------------------------------------- */
.jm-row--phases {
  height: var(--row-phases);
  display: flex;
  align-items: center;
}

.jm-phase {
  flex: none;
  margin-right: 10px;
  height: 3.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  color: #fff;
  background: var(--lane);
}
.jm-phase b,
.jm-phase span {
  display: block;
}
.jm-phase b {
  font-size: 0.95rem;
}
.jm-phase span {
  font-size: 0.75rem;
  opacity: 0.85;
}

:root[data-theme=dark] .jm-phase {
  color: #111;
}

/* ---- Steps ---------------------------------------------------------- */
.jm-row--steps {
  display: flex;
  padding-top: 0.6rem;
}

.jm-step {
  flex: none;
  margin-right: 10px;
}

.jm-chip {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: color-mix(in srgb, var(--lane) var(--shade), #fff);
}

:root[data-theme=dark] .jm-chip {
  color: #111;
  background: color-mix(in srgb, var(--lane) var(--shade), #000);
}

.jm-shot {
  margin-top: 0.6rem;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.jm-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  pointer-events: none;
}

.jm-shot--blank {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(var(--fg-rgb), 0.55);
}

.jm-opp {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.jm-note {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(var(--fg-rgb), 0.6);
}

.jm-hint {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Case study: onboarded publishers ---- */
.pub-grid {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pub-chip {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

/* ---- Case study: selected books ---- */
.book-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem 1.25rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.book-cover {
  position: relative;
  display: block;
  aspect-ratio: 2/3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(var(--fg-rgb), 0.05);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-card:hover .book-cover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px -16px rgba(0, 0, 0, 0.3);
}

.book-meta {
  padding: 0 0.1rem;
}

.book-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
}

.book-author {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.books-cta-wrap {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.books-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.books-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.books-cta-arrow {
  color: rgba(var(--fg-rgb), 0.55);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.books-cta:hover .books-cta-arrow {
  transform: translate(2px, -2px);
}

/* ---- Case study: the authors ---- */
.author-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.author-card {
  display: flex;
  gap: 0.95rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}
.author-card:hover {
  border-color: rgba(var(--fg-rgb), 0.3);
  transform: translateY(-2px);
}

.author-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid var(--line);
}

.author-avatar--mono {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.author-book {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.author-book em {
  color: rgba(var(--fg-rgb), 0.7);
  font-style: italic;
}

/* ---- Case study: in the press ---- */
.press-list {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.press-item {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.press-item:hover {
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.5);
}
.press-item:hover {
  border-color: rgba(var(--fg-rgb), 0.35);
  transform: translateY(-1px);
}

.press-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.press-outlet {
  font-weight: 700;
  color: var(--foreground);
}

.press-meta {
  color: var(--muted);
}

.press-title {
  margin-top: 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.press-arrow {
  vertical-align: -1px;
  opacity: 0.5;
}

.press-quote {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(var(--fg-rgb), 0.72);
}

/* ---- Case study: on-the-ground bento grid ---- */
/* Fixed area map (a–h) tiles the grid edge-to-edge with no gaps. */
.photo-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 158px);
  grid-template-areas: "a a b c" "a a b c" "d d e f" "g h e f";
  gap: 12px;
}

.photo-tile {
  border-radius: 14px;
  border: 1px solid var(--line);
  background-color: rgba(var(--fg-rgb), 0.05);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

@media (max-width: 720px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 150px);
    grid-template-areas: "a a" "a a" "b c" "d d" "e f" "g h";
  }
}
@media (max-width: 440px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: 230px;
    grid-template-areas: none;
  }
  .photo-tile {
    grid-area: auto !important;
  }
}
/* ---- Case study: long-term vision ladder ---- */
.vision-ladder {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  gap: 0.85rem;
  align-items: end;
}

.vision-rung {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1.1rem 1.15rem;
}

.vision-rung--1 {
  opacity: 0.72;
}

.vision-rung--2 {
  opacity: 0.86;
}

.vision-rung:last-child {
  opacity: 1;
  border-color: rgba(47, 111, 224, 0.5);
  background: rgba(47, 111, 224, 0.0588235294);
  box-shadow: 0 16px 30px -18px rgba(47, 111, 224, 0.55);
}

.vision-step {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.vision-rung:last-child .vision-step {
  color: #2f6fe0;
}

.vision-rung-title {
  margin-top: 0.4rem;
  font-weight: 700;
  font-size: 1.02rem;
}

.vision-rung-desc {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.vision-detail {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.vision-item {
  border-left: 2px solid #2f6fe0;
  padding: 0.1rem 0 0.1rem 0.9rem;
}

.vision-item-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.vision-item-desc {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 640px) {
  .vision-ladder {
    grid-template-columns: 1fr;
  }
}
/* ---- Case study: closing CTA band ---- */
.cta-band {
  margin: 2.5rem 0 0;
  padding: 2.5rem 2rem;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(135deg, rgba(var(--fg-rgb), 0.05), rgba(var(--fg-rgb), 0.02));
  border: 1px solid var(--line);
}

.cta-band-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1.2;
}

.cta-band-body {
  margin: 0.85rem auto 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(var(--fg-rgb), 0.75);
}

.cta-band-btn {
  margin-top: 1.5rem;
}

/* ---- Case study: more-work carousel -------------------------------- */
.more-work {
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--line);
}

.more-work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.carousel-nav {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.carousel-btn:hover {
  background: rgba(var(--fg-rgb), 0.06);
  border-color: rgba(var(--fg-rgb), 0.25);
}
.carousel-btn:active {
  transform: scale(0.94);
}

.carousel {
  margin: 0.75rem -1rem 0;
  padding: 0.75rem 1rem 1.75rem;
  scroll-padding-inline: 1rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--fg-rgb), 0.2) transparent;
}
.carousel::-webkit-scrollbar {
  height: 6px;
}
.carousel::-webkit-scrollbar-thumb {
  background: rgba(var(--fg-rgb), 0.16);
  border-radius: 999px;
}

/* ---- Cards: tall, light, staggered, each with its live preview -------- */
.more-work .mw-track {
  align-items: flex-start;
  gap: 1.25rem;
  margin: 0.25rem -1.75rem 0;
  padding: 1.75rem 1.75rem 2.25rem;
  scroll-padding-inline: 1.75rem;
}

@keyframes mw-wave {
  0% {
    box-shadow: 0 0 0 0 var(--background), 0 0 0 2px rgba(var(--mw-wave), 0.75);
  }
  100% {
    box-shadow: 0 0 0 6px var(--background), 0 0 0 8px rgba(var(--mw-wave), 0);
  }
}
.mw-card {
  --mw-bg: color-mix(in srgb, var(--ink) 9%, #fbfaf8);
  --mw-fg: #16171a;
  --mw-muted: rgba(22, 23, 26, 0.64);
  --mw-accent: color-mix(in srgb, var(--ink) 88%, #000);
  --mw-wave: var(--ink-rgb);
  --mw-pad: 1.6rem;
  position: relative;
  scroll-snap-align: start;
  flex: 0 0 min(300px, 80%);
  height: 520px;
  display: flex;
  flex-direction: column;
  border-radius: 32px;
  overflow: hidden;
  isolation: isolate;
  color: var(--mw-fg);
  background: radial-gradient(110% 62% at 18% 0%, rgba(var(--ink-rgb), 0.16), transparent 68%), var(--mw-bg);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.1);
}
.mw-card:hover {
  animation: mw-wave 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}
.mw-card:has(.mw-link:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

:root[data-theme=dark] .mw-card {
  --mw-bg: color-mix(in srgb, var(--ink) 12%, #f1efeb);
  box-shadow: none;
}

.more-work .mw-card .mw-stage {
  --k: 0.68;
  flex: 0 1 290px;
  min-height: 210px;
  height: 290px;
  border-radius: 0;
  background: transparent;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}

.mw-stage .bk-scene {
  --u: 2.15px;
  z-index: 2;
}

.mw-stage .bk-note {
  display: none;
}

.mw-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.5rem var(--mw-pad) 1.1rem;
}

.mw-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--mw-fg);
}

.mw-mark {
  display: block;
  color: var(--mw-accent);
}

.mw-blurb {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--mw-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mw-link {
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 1.05rem var(--mw-pad) 1.15rem;
  border-top: 1px solid color-mix(in srgb, var(--mw-fg) 14%, transparent);
  transition: background 0.3s ease;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--mw-fg);
  text-decoration: none;
  outline: none;
}
.mw-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.mw-link svg {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mw-link .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mw-card:hover .mw-link {
  background: color-mix(in srgb, var(--mw-fg) 5%, transparent);
}
.mw-card:hover .mw-link svg {
  transform: translateX(4px);
}

@media (max-width: 560px) {
  .carousel-nav {
    display: none;
  }
  .mw-card {
    --mw-pad: 1.35rem;
    height: 470px;
    border-radius: 28px;
  }
  .more-work .mw-card .mw-stage {
    --k: 0.6;
    flex-basis: 250px;
    height: 250px;
    min-height: 180px;
  }
  .mw-stage .bk-scene {
    --u: 1.9px;
  }
  .mw-body {
    padding-top: 0.25rem;
  }
  .mw-title {
    font-size: 1.45rem;
  }
}
/* ---- Case study: stats and other number sets ---------------------- */
.stat-row {
  --stat-deep: #003d1f;
  --stat-mint: #66cf96;
  --stat-cell: 28px;
  --gap: 0.75rem;
  --pad: 1.5rem;
  --small-w: calc((100cqi - (var(--n) - 1) * var(--gap)) / (var(--n) + 0.7));
  container-type: inline-size;
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: 1.7fr repeat(calc(var(--n) - 1), 1fr);
  gap: var(--gap);
}

.stat-row--stack {
  --small-w: calc((100cqi - (var(--n) - 2) * var(--gap)) / (var(--n) - 1));
  grid-template-columns: repeat(calc(var(--n) - 1), 1fr);
}
.stat-row--stack .stat--lead {
  grid-column: 1/-1;
  min-height: 260px;
}

.stat {
  --stat-line: rgba(0, 61, 31, 0.09);
  min-height: 340px;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 1.6rem var(--pad);
  border-radius: 28px;
  overflow: hidden;
  color: var(--stat-deep);
  background: linear-gradient(90deg, var(--stat-line) 1px, transparent 1px) -1px -1px/var(--stat-cell) var(--stat-cell), linear-gradient(var(--stat-line) 1px, transparent 1px) -1px -1px/var(--stat-cell) var(--stat-cell), radial-gradient(120% 70% at 100% 0%, rgba(255, 255, 255, 0.35), transparent 60%), linear-gradient(135deg, #9fbfaa 0%, #b8d0c0 45%, #d2e2d7 100%);
}

.stat-foot {
  align-self: end;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, (var(--small-w) - 2 * var(--pad)) * 1.5 / var(--len), 3.6rem);
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.stat-text {
  margin-top: 0.85rem;
}

.stat-label {
  min-height: 2.3em;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.stat-sub {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.72;
}

.stat-icon {
  display: inline-flex;
}
.stat-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
  transform-origin: 50% 60%;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat-icon svg > * {
  stroke-dasharray: 1;
}

.stat:hover .stat-icon svg {
  transform: rotate(-10deg) scale(1.12);
}
.stat:hover .stat-icon svg > * {
  animation: stat-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) both;
}
.stat:hover .stat-icon svg > :nth-child(2) {
  animation-delay: 0.12s;
}
.stat:hover .stat-icon svg > :nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes stat-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.stat--lead {
  --stat-line: rgba(255, 255, 255, 0.07);
  container-type: inline-size;
  color: var(--stat-mint);
  background: linear-gradient(90deg, var(--stat-line) 1px, transparent 1px) -1px -1px/var(--stat-cell) var(--stat-cell), linear-gradient(var(--stat-line) 1px, transparent 1px) -1px -1px/var(--stat-cell) var(--stat-cell), var(--stat-deep);
}
.stat--lead .stat-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  column-gap: 1.25rem;
}
.stat--lead .stat-value {
  font-weight: 500;
  font-size: clamp(3rem, 165cqi / var(--lead-len), 7.25rem);
  letter-spacing: -0.06em;
}

@media (max-width: 1023px) {
  .stat-row {
    --small-w: calc((100cqi - (var(--n) - 2) * var(--gap)) / (var(--n) - 1));
    grid-template-columns: repeat(calc(var(--n) - 1), 1fr);
  }
  .stat--lead {
    grid-column: 1/-1;
    min-height: 260px;
  }
}
@media (max-width: 560px) {
  .stat-row {
    --pad: 1.15rem;
    --small-w: calc((100cqi - var(--gap)) / 2);
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    min-height: 200px;
    padding-block: 1.25rem;
    border-radius: 22px;
  }
  .stat-icon svg {
    width: 28px;
    height: 28px;
  }
  .stat-label {
    font-size: 1rem;
  }
  .stat:last-child:nth-child(even) {
    grid-column: 1/-1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stat:hover .stat-icon svg {
    transform: none;
  }
  .stat:hover .stat-icon svg > * {
    animation: none;
  }
}
/* ---- Case study: sticky jump-to-next-section pill ------------------ */
.section-jump {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

@media (min-width: 1024px) {
  .section-jump {
    left: calc(50% + 174px);
  }
}
.section-jump:hover {
  transform: translateX(-50%) translateY(-3px);
}

.section-jump-arrow {
  color: rgba(var(--fg-rgb), 0.55);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-jump.is-top .section-jump-arrow {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .section-jump, .section-jump-arrow {
    transition: none;
  }
}
.prob-list,
.todo-grid {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(220px, 40%), 1fr));
  gap: 0.85rem;
}

.todo-grid {
  grid-template-columns: repeat(auto-fit, minmax(max(190px, 30%), 1fr));
}

.prob-card,
.todo-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.prob-tag,
.todo-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
}

.prob-title,
.todo-title {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
}

.prob-desc,
.todo-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Problem: red-orange tile -------------------------------------- */
.prob-tag {
  color: #e2502c;
  background: rgba(242, 96, 60, 0.14);
}

.prob-desc {
  margin-top: 0.6rem;
}

/* ---- Goal: teal tile, plus a subtitle ------------------------------ */
.todo-tag {
  color: #0f9b8e;
  background: rgba(20, 184, 166, 0.14);
}

.todo-sub {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: rgba(var(--fg-rgb), 0.7);
}

.todo-desc {
  margin-top: 0.9rem;
}

/* =====================================================================
 *  Cinematic fig-list — scroll-driven, full-viewport 3D genie slideshow
 *  Progressive enhancement: main.js upgrades a .fig-list to .figcinema on
 *  desktop pointers with motion allowed. Everywhere else the normal
 *  stacked .fig-list layout (above) is used untouched.
 * ===================================================================== */
.figcinema {
  position: relative;
  margin: 3rem 0;
  /* --fc-h set inline by JS: total scroll length of the pinned run */
  height: var(--fc-h, 300vh);
}

.figcinema-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  perspective: 1600px;
  perspective-origin: 50% 44%;
  /* width + margin-left are set by JS so the stage breaks out of the
     narrow text column and fills the whole content region (the layout has
     a fixed sidebar, so a plain 100vw breakout would misalign). */
  width: 100%;
}

.figcinema-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.figcinema-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  width: max-content;
  max-width: 94vw;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* transform + opacity written by JS each frame */
}
.figcinema-slide .fig-frame {
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 50px 130px -40px rgba(0, 0, 0, 0.6), 0 14px 40px -18px rgba(0, 0, 0, 0.4);
}
.figcinema-slide .fig-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(88vw, 1040px);
  max-height: 72vh;
  max-height: 72svh;
  object-fit: contain;
  cursor: zoom-in;
}
.figcinema-slide .fig-cap {
  margin-top: 1.1rem;
  max-width: 62ch;
  justify-content: center;
  text-align: left;
  font-size: 0.95rem;
}

/* soft floor reflection under the active design */
.figcinema-slide::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 62%;
  height: 14%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.28), transparent 72%);
  filter: blur(14px);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

:root[data-theme=dark] .figcinema-slide::after {
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.6), transparent 72%);
}

/* HUD: counter + tiny hint, glassy and unobtrusive */
.figcinema-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.figcinema.is-live .figcinema-hud {
  opacity: 1;
}

.figcinema-num {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--foreground);
  background: rgba(var(--glass-rgb), 0.66);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
}
.figcinema-num i {
  font-style: normal;
  opacity: 0.4;
  margin: 0 0.05rem;
}
.figcinema-num .fc-n {
  color: var(--muted);
}

.figcinema-hint {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.figcinema-hint::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: 0.5rem;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.5;
}

.figcinema.is-end .figcinema-hint {
  opacity: 0;
}

/* progress rail along the bottom edge */
.figcinema-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(var(--fg-rgb), 0.08);
  z-index: 5;
  overflow: hidden;
}
.figcinema-rail span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #3366cc, #7aa2ff);
}

/* thin global scroll-progress bar at the very top of the viewport */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #3366cc, #7aa2ff);
  z-index: 120;
  pointer-events: none;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }
}
.about-prose {
  padding: 0.5rem 0 3rem;
}
.about-prose p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.75;
  color: rgba(var(--fg-rgb), 0.72);
}
.about-prose p:first-child {
  margin-top: 0;
}

.about-prose p a,
.about-prose .about-lead a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--fg-rgb), 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.about-prose p a:hover,
.about-prose .about-lead a:hover {
  text-decoration-color: var(--foreground);
}

.about-prose .about-lead {
  margin-top: 0;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: normal;
  font-size: 1.375rem;
  line-height: 1.6;
  color: rgba(var(--fg-rgb), 0.85);
}

@media (min-width: 640px) {
  .about-prose .about-lead {
    font-size: 1.5rem;
  }
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin: 0.5rem 0 2.5rem;
}
.about-grid figure {
  position: relative;
  margin: 0;
}
.about-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 680/763;
  object-fit: cover;
  border-radius: 0.875rem;
  background: var(--media-bg);
}
.about-grid figcaption {
  display: none;
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  white-space: nowrap;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@media (min-width: 640px) {
  .about-grid {
    gap: 1rem;
  }
  .about-grid img {
    border-radius: 1.25rem;
  }
  .about-grid figcaption {
    display: block;
    left: 0.75rem;
    bottom: 0.75rem;
    font-size: 0.75rem;
  }
}
.about-contact a,
.about-socials a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--fg-rgb), 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.about-contact a:hover,
.about-socials a:hover {
  text-decoration-color: var(--foreground);
}

.about-socials {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.9;
  color: rgba(var(--fg-rgb), 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .sidebar::before {
    animation: none;
  }
  .nav-text::after {
    transition: opacity 0.25s ease;
  }
  .hero-title-grad {
    transition: none;
  }
}
@media (max-width: 1023px) {
  .layout {
    padding-left: 0;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.8rem 1.25rem 0.9rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(var(--glass-rgb), 0.97);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
  }
  .sidebar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 24px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(var(--glass-rgb), 0.97) 0%, rgba(var(--glass-rgb), 0.85) 42%, rgba(var(--glass-rgb), 0) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-mask-image: linear-gradient(to bottom, #000 42%, transparent);
    mask-image: linear-gradient(to bottom, #000 42%, transparent);
  }
  .sidebar.nav-hidden {
    transform: translateY(-100%);
  }
  .sidebar-top {
    position: relative;
    z-index: 2;
    gap: 0.65rem;
  }
  .sidebar-head {
    justify-content: flex-start;
  }
  .shiv {
    height: 32px;
  }
  .sidebar-bottom {
    position: absolute;
    top: 0.8rem;
    height: 32px;
    right: calc(1rem + 36px + 0.85rem);
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }
  .sidebar-bottom .linkedin-link,
  .sidebar-bottom .resume-link,
  .sidebar-bottom .copyright {
    display: none;
  }
  .theme-switch {
    top: calc(0.8rem - 2px);
    right: 1rem;
    width: 36px;
    height: 36px;
  }
  .nav-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav-list::-webkit-scrollbar {
    display: none;
  }
  .nav-list:hover .nav-item {
    color: rgba(var(--fg-rgb), 0.82);
  }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    gap: 0;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    background: rgba(var(--hairline), 0.05);
    border: 1px solid rgba(var(--hairline), 0.08);
    font-size: 0.75rem;
    white-space: nowrap;
    color: rgba(var(--fg-rgb), 0.82);
  }
  .nav-item:active {
    background: rgba(var(--hairline), 0.1);
  }
  /* Current project: filled pill instead of the desktop underline */
  .nav-item--active {
    background: rgba(var(--hairline), 0.14);
    border-color: rgba(var(--hairline), 0.22);
    color: var(--foreground);
  }
  .nav-arrow {
    display: none;
  }
  .nav-text::after {
    display: none;
  }
  .nav-list.is-spying .nav-item {
    color: rgba(var(--fg-rgb), 0.82);
  }
  .nav-item--reading {
    background: rgba(var(--hairline), 0.14);
    border-color: rgba(var(--hairline), 0.22);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  }
}
