/* =========================================================================
   David Bograd — portfolio
   ========================================================================= */

/* --- Fonts --------------------------------------------------------------- */

/* Timeless, from timeless.co. Licensed for embedding only: these files must
   not be redistributed or committed to a public repository. */
@font-face {
  font-family: "Timeless Serif";
  src: url("/assets/fonts/TimelessSerifVF.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Timeless Serif";
  src: url("/assets/fonts/TimelessSerifItalicVF.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

/* One file holds both styles. The italic face is declared so the browser does
   not fake a slant on top of the font's own `ital` axis. */
@font-face {
  font-family: "Timeless Sans";
  src: url("/assets/fonts/TimelessSansVF.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Timeless Sans";
  src: url("/assets/fonts/TimelessSansVF.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* --- Tokens -------------------------------------------------------------- */

:root {
  --font-sans: "Timeless Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Timeless Serif", Georgia, serif;

  /* Both families have a `STYL` axis. In the serif, 0 is Display and 100 is
     Text, cut for small sizes. In the sans, 0 is Grotesk and 100 is Sans. The
     sans `ital` axis runs 0 to 100, so browsers can't drive it from
     `font-style` and it is set here too. */
  --styl: 100;
  --ital: 0;

  --shell: 1180px;
  --prose: 44rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --step-mono: 0.6875rem;
  --step-sm: 0.9375rem;
  --step-base: 1.0625rem;
  --step-lg: clamp(1.125rem, 0.9rem + 0.7vw, 1.375rem);
  --step-h3: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem);
  --step-h2: clamp(1.625rem, 1.3rem + 1.3vw, 2.25rem);
  --step-h1: clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
  --step-hero: clamp(2.125rem, 1.4rem + 3.4vw, 3.875rem);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  /* Case study accents, used by the tag dot and tinted sections. */
  --accent-envato: #0f8a83;
  --accent-soundry: #3c1450;
  --accent-epidemic: #e5384c;
  --accent-told: #6c3ce9;
}

/* Palette after timeless.co/type: cool grey page, black ink, white cards and
   a single hot orange used sparingly. */
:root {
  --bg: #e6e7e9;
  --bg-raised: #ffffff;
  --bg-sunken: #dddddd;
  --text: #000000;
  --text-soft: #4c4c4c;
  --text-faint: #808080;
  --line: rgba(0, 0, 0, 0.13);
  --line-soft: rgba(0, 0, 0, 0.07);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-lift: 0 1px 3px rgba(0, 0, 0, 0.1), 0 18px 40px -16px rgba(0, 0, 0, 0.22);
  --accent: #000000;
  --hot: #fa4c03;
}

::selection {
  background: var(--hot);
  color: #fff;
}

/* --- Reset --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-base);
  font-weight: 400;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Set on every element because `font-variation-settings` inherits as a
   resolved value, so the variables above would otherwise only apply once. */
*,
*::before,
*::after {
  font-variation-settings: "STYL" var(--styl), "ital" var(--ital);
}

em,
i {
  --ital: 100;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* Responsive images are wrapped in <picture>. Taking it out of the layout lets
   the <img> sizing rules below apply as if it were a direct child. */
picture {
  display: contents;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
}

/* Display cut for large headings; small ones keep the sturdier Text cut. */
h1,
h2 {
  --styl: 0;
}

p {
  margin: 0 0 1.15em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Layout primitives --------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: var(--prose);
}

/* Small uppercase monospace label — the connective tissue of the whole site. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}
/* Section header: mono label, rule, then a short line of context. */
.section-head {
  display: grid;
  gap: 0.9rem;
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
}

.section-head__title {
  font-size: var(--step-h2);
}

.section-head__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.section-head__rule {
  width: 2.25rem;
  height: 1px;
  flex: none;
  background: var(--text);
  opacity: 0.35;
}

.section-head__sub {
  font-size: var(--step-sm);
  color: var(--text-soft);
}

/* --- Nav ----------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.nav[data-scrolled="true"] {
  border-bottom-color: var(--line-soft);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1.1rem var(--gutter);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.9rem);
}

.nav__links a {
  font-size: var(--step-sm);
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.nav__links a:hover {
  color: var(--text);
}

@media (max-width: 600px) {
  .nav__inner {
    padding-block: 0.9rem;
  }
}

/* --- Hero ---------------------------------------------------------------- */

/* Left-aligned title over a panning strip of placeholder pieces, after
   timeless.co/type. */
.hero {
  position: relative;
  overflow: clip;
  padding-top: clamp(3rem, 7vw, 6.5rem);
  padding-bottom: clamp(1rem, 3vw, 2rem);
}

.hero__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 1.1rem + 3.9vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero__title em {
  font-style: italic;
  letter-spacing: -0.02em;
}

.hero__sub {
  --styl: 100;
  display: block;
  margin-top: 2em;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

/* A round logo that replaces the pointer over a word. The outer element
   follows the pointer; the inner one scales from its centre so it grows and
   shrinks in place. */
@media (hover: hover) and (pointer: fine) {
  [data-cursor] {
    cursor: none;
  }
}

.cursor-chip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem 0 0 -1.125rem;
  pointer-events: none;
  translate: var(--cursor-x, -100px) var(--cursor-y, -100px);
}

.cursor-chip__inner {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0.2rem 0.55rem rgba(0, 0, 0, 0.18);
  scale: 0;
  transition: scale 0.35s var(--ease);
}

.cursor-chip[data-active="true"] .cursor-chip__inner {
  scale: 1;
}

.cursor-chip img,
.cursor-chip svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The portrait is a snapshot rather than a round badge. It swings upright
   as it grows in, then leans with the pointer's movement through --tilt,
   which JS springs frame by frame. */
.cursor-chip--photo {
  --rest-tilt: 0;
  width: 8.32rem;
  height: 10.24rem;
  margin: -5.12rem 0 0 -4.16rem;
}

.cursor-chip--photo .cursor-chip__inner {
  border-radius: 1rem;
  transform: rotate(var(--tilt, 0deg));
  box-shadow:
    0 0.2rem 0.5rem rgba(0, 0, 0, 0.12),
    0 1rem 2rem rgba(0, 0, 0, 0.16);
  rotate: -8deg;
  transition:
    scale 0.35s var(--ease),
    rotate 0.6s var(--ease);
}

.cursor-chip--photo[data-active="true"] .cursor-chip__inner {
  rotate: calc(var(--rest-tilt) * 1deg);
}

/* A slow drift of a few pixels so the photo feels alive while the pointer
   rests. It uses `translate`, which nothing else on the card animates. */
@media (prefers-reduced-motion: no-preference) {
  .cursor-chip--photo .cursor-chip__inner {
    animation: breathe 6s ease-in-out infinite;
  }
}

@keyframes breathe {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: 1.5px -2px;
  }
  50% {
    translate: -0.5px -3px;
  }
  75% {
    translate: -2px -1px;
  }
}

/* "beautiful software": on hover the letters hop one after another and
   sparkles pop around them. The letters and sparkles are made in JS. */
[data-sparkle] {
  position: relative;
}

[data-sparkle] .char {
  display: inline-block;
}

[data-sparkle].is-sparkling .char {
  animation: char-hop 0.7s var(--ease) both;
  animation-delay: calc(var(--i) * 32ms);
}

@keyframes char-hop {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  35% {
    translate: 0 -0.16em;
    rotate: -7deg;
    color: var(--hot);
  }
  65% {
    translate: 0 0.03em;
    rotate: 2deg;
  }
}

.sparkle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  background: currentColor;
  clip-path: polygon(50% 0%, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0% 50%, 41% 41%);
  pointer-events: none;
  animation: sparkle 0.9s var(--ease) forwards;
}

@keyframes sparkle {
  0% {
    scale: 0;
    rotate: 0deg;
  }
  45% {
    scale: 1;
  }
  100% {
    scale: 0;
    rotate: var(--spin);
  }
}

.hero__eyebrow {
  margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}

.hero__body {
  max-width: 46ch;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  font-size: var(--step-lg);
  color: var(--text-soft);
  line-height: 1.55;
}

.hero__body a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}

.hero__body a:hover {
  border-bottom-color: var(--text);
}

/* Canva's core brand gradient, sampled from their own rendered styles: turq
   through blue to purple, left to right. Used in the about copy.
   No transition on the fill, since fading text to transparent over the
   gradient muddies the colour mid-way. */
.link--canva {
  --canva-gradient: linear-gradient(
    98deg,
    #00c4cc 0%,
    #5a32fa 52%,
    #7630d7 100%
  );
}

.link--canva:hover,
.link--canva:focus-visible {
  background-image: var(--canva-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  border-image: var(--canva-gradient) 1;
}

/* Word-by-word reveal on load. Splitting happens in JS so the text still
   wraps naturally at any width. */
.hero__title .word {
  display: inline-block;
  will-change: transform, opacity;
}

.js .hero__title[data-split-words] .word {
  opacity: 0;
  transform: translateY(0.45em);
  animation: word-in 0.75s var(--ease) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes word-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero__title[data-split-words] .word {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Tick ring hanging off the top-right corner. Sized off `--d` so the label
   can sit on its horizontal centre line at any width. */
.dial {
  --d: clamp(17rem, 34vw, 36rem);
  position: absolute;
  top: calc(var(--d) * -0.32);
  right: calc(var(--d) * -0.3);
  width: var(--d);
  height: var(--d);
  color: var(--text);
  text-decoration: none;
}

.dial__ring {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 0.45;
  stroke-linecap: round;
  animation: dial-turn 180s linear infinite;
}

@keyframes dial-turn {
  to {
    transform: rotate(360deg);
  }
}

.dial__label {
  position: absolute;
  top: 50%;
  left: 12%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(-50%);
  font-size: var(--step-sm);
  white-space: nowrap;
}

.dial__label::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--hot);
  transition: width 0.4s var(--ease);
}

.dial:hover .dial__label::before {
  width: 3.25rem;
}

/* No room beside the title on small screens, and Work is in the nav. */
@media (max-width: 760px) {
  .dial {
    display: none;
  }
}

/* --- Collage ------------------------------------------------------------- */

/* A strip wider than any screen. It pans with a trackpad, a mouse drag or
   touch; the vertical padding leaves room for the card shadows. */
.collage {
  --pc-shadow-paper: 0.8px 0.8px 2.5px rgba(0, 0, 0, 0.08),
    3.3px 2.5px 4px rgba(0, 0, 0, 0.07), 8px 6px 9px rgba(0, 0, 0, 0.05),
    18px 14px 18px rgba(0, 0, 0, 0.04);
  --pc-shadow-float: 4px 5px 13px rgba(0, 0, 0, 0.19),
    14px 18px 23px rgba(0, 0, 0, 0.16), 32px 41px 31px rgba(0, 0, 0, 0.09),
    57px 73px 37px rgba(0, 0, 0, 0.03);
  --pc-shadow-soft: 4px 4px 13px rgba(0, 0, 0, 0.06),
    15px 18px 23px rgba(0, 0, 0, 0.05), 34px 40px 32px rgba(0, 0, 0, 0.03);

  margin-top: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: 1.5em 5em;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: clamp(10px, 0.6rem + 0.45vw, 16px);
  cursor: grab;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-user-select: none;
  user-select: none;
}

.collage::-webkit-scrollbar {
  display: none;
}

.collage[data-dragging="true"] {
  cursor: grabbing;
}

.collage__canvas {
  position: relative;
  width: 168em;
  height: 31em;
  /* Lets the first piece start just off the left edge, as in the reference. */
  margin-left: -1.5em;
}

.pc {
  position: absolute;
  left: calc(var(--x) * 1em);
  top: calc(var(--y) * 1em);
  width: calc(var(--w) * 1em);
  height: calc(var(--h) * 1em);
  font-family: var(--font-sans);
  line-height: 1.3;
  transition: translate 0.5s var(--ease);
}

.pc:hover {
  translate: 0 -0.35em;
}

.js .pc {
  animation: pc-in 1s var(--ease) both;
  animation-delay: calc(var(--i) * 60ms + 350ms);
}

@keyframes pc-in {
  from {
    opacity: 0;
    transform: translateY(2em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .pc {
    animation: none;
  }

  .dial__ring {
    animation: none;
  }
}

/* Document page */
.pc--doc {
  display: flex;
  flex-direction: column;
  padding: 1.1em;
  background: #fff;
  box-shadow: var(--pc-shadow-paper);
  font-size: 1em;
}

.pc-doc__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.45em;
  color: #555;
}

.pc-doc__title {
  margin: 1.2em 0 0.6em;
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 1.6em;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pc-doc__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em;
  font-size: 0.36em;
  line-height: 1.45;
  color: #333;
}

.pc-doc__cols p {
  margin: 0;
}

.pc-doc__rings {
  position: relative;
  flex: 1;
  margin-top: 0.8em;
  overflow: hidden;
}

.pc-doc__rings i {
  position: absolute;
  left: 50%;
  top: 100%;
  border: 1px solid #111;
  border-radius: 50%;
  translate: -50% -50%;
}

.pc-doc__rings i:nth-child(1) { width: 4em; height: 4em; }
.pc-doc__rings i:nth-child(2) { width: 7em; height: 7em; }
.pc-doc__rings i:nth-child(3) { width: 10em; height: 10em; border-style: dashed; }
.pc-doc__rings i:nth-child(4) { width: 13em; height: 13em; }

/* Orange cover */
.pc--cover {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.1em;
  background: #e85d2f;
  color: #2b0d03;
  box-shadow: var(--pc-shadow-paper);
}

.pc-cover__kicker {
  margin: 0;
  max-width: 13em;
  font-size: 0.8em;
  line-height: 1.2;
}

.pc-cover__art {
  position: relative;
  flex: 1;
  margin-block: 0.8em;
}

.pc-cover__art i {
  position: absolute;
  right: -1.1em;
  top: 50%;
  border: 1px solid #2b0d03;
  border-radius: 50%;
  translate: 40% -50%;
}

.pc-cover__art i:nth-child(1) { width: 6em; height: 6em; }
.pc-cover__art i:nth-child(2) { width: 9em; height: 9em; }
.pc-cover__art i:nth-child(3) { width: 12em; height: 12em; border-style: dashed; }

.pc-cover__title {
  margin: 0;
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 1.55em;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.pc-cover__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 1.4em;
  font-size: 0.42em;
}

/* Flight widget */
.pc--flight {
  display: grid;
  align-content: center;
  gap: 0.3em;
  padding: 0.8em 1.2em;
  border-radius: 1.3em;
  background: #0b0b0b;
  color: #fff;
  box-shadow: var(--pc-shadow-float);
}

.pc-flight__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
}

.pc-flight__row--small {
  font-size: 0.55em;
  color: #b5b5b5;
}

.pc-flight__row--small b {
  color: var(--hot);
  font-weight: 500;
}

.pc-flight__row--big {
  font-size: 1.45em;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pc-flight__track {
  position: relative;
  flex: 1;
  height: 0.12em;
  border-radius: 1em;
  background: #3a3a3a;
}

.pc-flight__fill {
  position: absolute;
  inset: 0 45% 0 0;
  border-radius: inherit;
  background: var(--hot);
}

.pc-flight__plane {
  position: absolute;
  left: 55%;
  top: 50%;
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.12em var(--hot);
  translate: -50% -50%;
}

/* Book spread */
.pc--spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  box-shadow: var(--pc-shadow-paper);
}

.pc-spread__page--art {
  position: relative;
  overflow: hidden;
  background: #f4c53d;
}

.pc-spread__sun {
  position: absolute;
  left: 18%;
  top: 14%;
  width: 6.5em;
  height: 6.5em;
  border-radius: 50%;
  background: #e85d2f;
}

.pc-spread__block {
  position: absolute;
  right: 12%;
  bottom: 18%;
  width: 3.4em;
  height: 5em;
  background: #0b0b0b;
}

.pc-spread__arch {
  position: absolute;
  left: 10%;
  bottom: -2.5em;
  width: 6em;
  height: 9em;
  border-radius: 3em 3em 0 0;
  background: #f7efe1;
}

.pc-spread__page--words {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1em;
  box-shadow: inset 0.6em 0 0.8em -0.6em rgba(0, 0, 0, 0.18);
}

.pc-spread__page--words p {
  margin: 0;
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 1.3em;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.pc-spread__page--words span {
  font-size: 0.42em;
  color: #666;
}

/* Music card */
.pc--music {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  padding: 0.5em;
  border-radius: 1.6em;
  background: linear-gradient(160deg, #b2502a, #5a1f2e 70%);
  color: #fff;
  box-shadow: var(--pc-shadow-float);
}

.pc-music__art {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  aspect-ratio: 1;
  padding: 0.7em;
  border-radius: 1.3em;
  background:
    radial-gradient(circle at 28% 32%, #ff9a3d 0, transparent 42%),
    radial-gradient(circle at 72% 58%, #5b6cff 0, transparent 48%),
    radial-gradient(circle at 45% 85%, #ff3d7f 0, transparent 40%),
    #24102e;
  box-shadow: 0 0.3em 0.6em rgba(0, 0, 0, 0.3), 0 1.2em 1.2em rgba(0, 0, 0, 0.2);
}

.pc-music__art span {
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 1.35em;
  letter-spacing: -0.03em;
}

.pc-music__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.6em 0.5em;
}

.pc-music__meta p {
  display: grid;
  margin: 0;
  font-size: 0.6em;
}

.pc-music__meta b {
  font-weight: 500;
}

.pc-music__meta p span {
  color: rgba(255, 255, 255, 0.65);
}

.pc-music__play {
  display: grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.pc-music__play svg {
  width: 0.8em;
  fill: #5a1f2e;
}

/* Stats widget */
.pc--stats {
  padding: 0.9em 1em;
  border-radius: 1.1em;
  background: #fff;
  box-shadow: var(--pc-shadow-soft);
  font-size: 1em;
}

.pc-stats__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.55em;
  color: #555;
}

.pc-stats__head b {
  color: #0b0b0b;
  font-weight: 500;
}

.pc-stats__bar {
  display: flex;
  gap: 0.15em;
  height: 0.28em;
  margin: 0.55em 0 0.7em;
}

.pc-stats__bar i {
  border-radius: 1em;
}

.pc-stats__bar i:nth-child(1) { flex: 6; background: #61d4fb; }
.pc-stats__bar i:nth-child(2) { flex: 2; background: #a78bfa; }
.pc-stats__bar i:nth-child(3) { flex: 1.2; background: #10b980; }
.pc-stats__bar i:nth-child(4) { flex: 0.6; background: #feb600; }

.pc--stats ul {
  display: grid;
  gap: 0.55em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.5em;
  color: #333;
}

.pc--stats li {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.pc--stats li i {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
}

.pc--stats li:nth-child(1) i { background: #61d4fb; }
.pc--stats li:nth-child(2) i { background: #a78bfa; }
.pc--stats li:nth-child(3) i { background: #10b980; }
.pc--stats li:nth-child(4) i { background: #feb600; }

.pc--stats li span {
  margin-left: auto;
  color: #808080;
  font-variant-numeric: tabular-nums;
}

/* Chat bubbles */
.pc--chat {
  height: auto;
  display: grid;
  gap: 0.35em;
  rotate: -3deg;
}

.pc--chat p {
  margin: 0;
  padding: 0.55em 0.85em;
  border-radius: 1.1em;
  font-size: 0.7em;
  box-shadow: var(--pc-shadow-soft);
}

.pc-chat__in {
  justify-self: start;
  background: #fff;
  color: #0b0b0b;
}

.pc-chat__out {
  justify-self: end;
  background: #0083ff;
  color: #fff;
}

/* Phone */
.pc--phone {
  padding: 0.4em;
  border-radius: 2em;
  background: #0b0b0b;
  box-shadow: var(--pc-shadow-float);
}

.pc-phone__screen {
  height: 100%;
  padding: 0.8em 0.9em;
  border-radius: 1.65em;
  background: linear-gradient(180deg, #6c3ce9, #b69cff);
  color: #fff;
}

.pc-phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.45em;
}

.pc-phone__status i {
  width: 4em;
  height: 1.2em;
  border-radius: 1em;
  background: #0b0b0b;
}

.pc-phone__title {
  margin: 1.2em 0 0;
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 1.9em;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pc-phone__sub {
  margin: 0.2em 0 1.2em;
  font-size: 0.5em;
  opacity: 0.8;
}

.pc-phone__row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.45em;
  padding: 0.5em;
  border-radius: 0.8em;
  background: rgba(255, 255, 255, 0.92);
}

.pc-phone__row i {
  width: 1.6em;
  height: 1.6em;
  flex: none;
  border-radius: 0.45em;
  background: #f4c53d;
}

.pc-phone__row:nth-of-type(2) i { background: #e85d2f; }
.pc-phone__row:nth-of-type(3) i { background: #10b980; }

.pc-phone__row span {
  flex: 1;
  height: 0.35em;
  border-radius: 1em;
  background: #d9d2f5;
}

/* Prompt box */
.pc--prompt {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9em 1em;
  border-radius: 1.1em;
  background: #fff;
  box-shadow: var(--pc-shadow-soft);
}

.pc--prompt p {
  margin: 0;
  font-size: 0.8em;
  color: #0b0b0b;
}

.pc-prompt__caret {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 0.1em;
  vertical-align: -0.2em;
  background: var(--hot);
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.pc-prompt__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pc-prompt__plus {
  display: grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  color: #555;
  font-size: 0.9em;
  line-height: 1;
}

.pc-prompt__send {
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--hot);
}

.pc-prompt__send svg {
  width: 0.9em;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Poster */
.pc--poster {
  display: flex;
  flex-direction: column;
  padding: 1.1em;
  background: #f3f3f1;
  color: #0b0b0b;
  box-shadow: var(--pc-shadow-paper);
}

.pc-poster__top {
  display: flex;
  justify-content: space-between;
  font-size: 0.5em;
}

.pc-poster__big {
  margin: 0.4em 0 0;
  font-size: 3.2em;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.88;
}

.pc-poster__big span {
  text-transform: uppercase;
  font-size: 0.62em;
  letter-spacing: -0.02em;
}

.pc-poster__mid {
  margin: auto 0 0;
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 1.3em;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.pc-poster__dots {
  display: flex;
  gap: 0.35em;
  margin-top: 0.9em;
}

.pc-poster__dots i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #e5384c;
}

.pc-poster__dots i:nth-child(n + 3) {
  background: #0b0b0b;
}

/* Website card */
.pc--site {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.5em;
  background: #fff;
  box-shadow: var(--pc-shadow-soft);
}

.pc-site__image {
  flex: 1;
  background:
    radial-gradient(circle at 70% 30%, #f4c53d 0, transparent 30%),
    linear-gradient(180deg, #9fc6d8 0%, #d9e7ee 55%, #c9b79a 56%, #a9906b 100%);
}

.pc-site__foot {
  display: grid;
  gap: 0.2em;
  padding: 0.8em 0.9em;
  font-size: 0.6em;
}

.pc-site__foot b {
  font-weight: 500;
}

.pc-site__foot span {
  color: #808080;
}

/* Small number widget */
.pc--temp {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9em;
  border-radius: 1.5em;
  background: #fff;
  box-shadow: var(--pc-shadow-soft);
}

.pc--temp span {
  font-size: 0.5em;
  color: #808080;
}

.pc--temp p {
  margin: 0;
  font-family: var(--font-serif);
  --styl: 0;
  font-size: 2.4em;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pc--temp small {
  font-size: 0.4em;
  letter-spacing: 0;
  margin-left: 0.15em;
}

/* --- Work ---------------------------------------------------------------- */

/* One case per row: a wide image with big corners, then a caption row with
   the title left and the tags right. The heading and captions share the
   image's width so every left edge lines up. */
.work {
  --inset: clamp(0.5rem, 1.2vw, 1rem);
}

.work-shell {
  width: min(1240px, 100% - 2 * var(--inset));
  margin-inline: auto;
}

.work-list {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.work-item__link {
  display: block;
  text-decoration: none;
}

.work-item__media {
  width: min(1240px, 100% - 2 * var(--inset));
  margin-inline: auto;
  overflow: hidden;
  border-radius: clamp(1.25rem, 2.6vw, 2.5rem);
  background: var(--case-accent, var(--bg-sunken));
  aspect-ratio: 2212 / 1004;
}

.work-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.work-item__link:hover .work-item__media img {
  transform: scale(1.02);
}

.work-item__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  flex-wrap: wrap;
  padding-top: clamp(0.9rem, 1.6vw, 1.25rem);
}

.work-item__title {
  font-size: var(--step-h3);
}

.work-item__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* Once the images nearly touch the screen edge, the text steps back in to the
   usual page gutter. */
@media (max-width: 720px) {
  .work-item__media {
    aspect-ratio: 4 / 3;
  }

  .work-shell .section-head,
  .work-item__caption {
    padding-inline: calc(var(--gutter) - var(--inset));
  }
}

/* Placeholder card in the shape of a case study image, shown while the work
   section is switched off. Tall enough to read as content on the page. */
.work-soon {
  display: grid;
  place-items: center;
  height: 80vh;
  min-height: 20rem;
  max-height: 56rem;
  aspect-ratio: auto;
}

.work-soon__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* Tag with an accent dot, used on case study pages. */
.case-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.case-card__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--case-accent, var(--text-faint));
}

/* --- About --------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: clamp(220px, 26vw, 300px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about__aside {
  display: grid;
  gap: 1.35rem;
  position: sticky;
  top: 6rem;
}

@media (max-width: 820px) {
  .about__aside {
    position: static;
  }
}

.about__photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunken);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__contact p {
  margin-bottom: 0.35rem;
  font-size: var(--step-sm);
  color: var(--text-soft);
}

.about__email {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step-sm);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
  word-break: break-word;
}

.about__email:hover {
  border-bottom-color: var(--text);
}

.about__ps {
  margin-top: 1.1rem;
  font-size: var(--step-sm);
  color: var(--text-faint);
}

.about__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--step-sm);
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.pill:hover {
  color: var(--text);
  border-color: var(--text-faint);
  background: var(--bg-raised);
}

.about__text {
  max-width: var(--prose);
  font-size: var(--step-lg);
  line-height: 1.62;
  color: var(--text-soft);
}

.about__text a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}

.about__text a:hover {
  border-bottom-color: var(--text);
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(2rem, 4vw, 3rem);
}

.footer__text {
  font-size: var(--step-sm);
  color: var(--text-faint);
  text-wrap: pretty;
}

.footer__text a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.footer__text a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* --- Case study page ----------------------------------------------------- */

.case-hero {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.case-hero__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1.25rem;
}

.case-hero__title {
  font-size: var(--step-h1);
  line-height: 1.06;
  max-width: 24ch;
}

.case-hero__intro {
  max-width: 52ch;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  font-size: var(--step-lg);
  line-height: 1.58;
  color: var(--text-soft);
}

.case-hero__intro p + p {
  margin-top: 0.9em;
}

/* Key/value strip under the case study intro. */
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem 2rem;
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: clamp(1.75rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line-soft);
}

.case-meta__item {
  display: grid;
  gap: 0.4rem;
}

.case-meta__value {
  font-size: var(--step-sm);
  color: var(--text);
  text-wrap: pretty;
}

.case-cover {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-sunken);
  box-shadow: var(--shadow);
}

.case-cover img {
  width: 100%;
}

/* --- Case study body ----------------------------------------------------- */

.case-body {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

/* Content is a centred prose column; figures break out of it. */
.case-body__inner {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    min(var(--prose), 100%)
    minmax(0, 1fr);
}

.case-body__inner > * {
  grid-column: 2;
  min-width: 0;
}

.case-body__inner > .fig--wide {
  grid-column: 1 / -1;
  width: min(100%, 60rem);
  margin-inline: auto;
}

.case-body__inner > .fig--full {
  grid-column: 1 / -1;
}

.case-body__inner > .accent-block {
  grid-column: 1 / -1;
}

.case-body h2 {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  font-size: var(--step-h2);
}

.case-body h2:first-child {
  margin-top: 0;
}

.case-body h3 {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  font-size: var(--step-h3);
}

.case-body h2 + h3 {
  margin-top: 1rem;
}

.case-body p,
.case-body ul,
.case-body ol {
  color: var(--text-soft);
  line-height: 1.68;
}

.case-body p {
  margin: 0 0 1.15em;
}

.case-body h2 + p,
.case-body h3 + p {
  margin-top: 0.9rem;
}

.case-body strong {
  color: var(--text);
  font-weight: 600;
}

.case-body em {
  font-style: italic;
}

.case-body a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}

.case-body a:hover {
  border-bottom-color: var(--text);
}

.case-body ul,
.case-body ol {
  margin: 0 0 1.3em;
  padding-left: 1.35rem;
}

.case-body li {
  margin-bottom: 0.6em;
  padding-left: 0.2rem;
}

.case-body li::marker {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.case-body ol {
  counter-reset: item;
}

/* --- Figures ------------------------------------------------------------- */

.fig {
  margin: clamp(2.25rem, 5vw, 3.5rem) 0;
}

.fig img,
.fig .embed {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunken);
  border: 1px solid var(--line-soft);
}

.fig--full img,
.fig--full .embed {
  border-radius: var(--radius-lg);
}

.fig img {
  width: 100%;
}

/* Small logos and emoji-scale images sit inline in the prose column. */
.fig--icon,
.fig--logo {
  margin-block: clamp(2rem, 4vw, 3rem);
}

.fig--icon img,
.fig--logo img {
  width: auto;
  border: 0;
  border-radius: 0;
  background: none;
}

.fig--icon img {
  max-height: 40px;
}

.fig--logo img {
  max-height: 30px;
}

.fig figcaption {
  max-width: var(--prose);
  margin: 0.9rem auto 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-faint);
  text-wrap: pretty;
}

.fig--prose figcaption {
  margin-inline: 0;
}

.embed {
  position: relative;
  padding-top: var(--ratio, 56.25%);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Accent block -------------------------------------------------------- */

.accent-block {
  --accent-pad: clamp(1.5rem, 4vw, 3rem);
  margin: clamp(2.5rem, 6vw, 4.5rem) 0;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--case-accent, var(--text)) 8%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--case-accent, var(--text)) 18%, transparent);
}

/* Padding is added to the measure so the text still lines up with the
   surrounding prose column. */
.accent-block__inner {
  max-width: calc(var(--prose) + 2 * var(--accent-pad));
  margin-inline: auto;
  padding-inline: var(--accent-pad);
}

.accent-block h2,
.accent-block h3 {
  margin-top: 0;
}

.accent-block h3 + p {
  margin-top: 0.9rem;
}

.accent-block > .accent-block__inner > *:first-child {
  margin-top: 0;
}

/* --- More case studies --------------------------------------------------- */

.more-cases {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-soft);
}

.more-cases__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

.more-card {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.3s var(--ease);
}

.more-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line);
}

.more-card__media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sunken);
  aspect-ratio: 16 / 10;
}

.more-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.more-card:hover .more-card__media img {
  transform: scale(1.03);
}

.more-card__body {
  display: grid;
  gap: 0.5rem;
  padding: 0 0.5rem 0.5rem;
}

.more-card__title {
  font-size: var(--step-lg);
  line-height: 1.3;
  text-wrap: pretty;
}

/* --- Reveal on scroll ---------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Never hide content when JS is unavailable or motion is reduced. */
.no-js .reveal,
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
