:root {
  --bg: #ffffff;
  --ink: #111111;
  --body: #444444;
  --muted: #8a8a8a;
  --rule: #111111;
  --hair: #e8e8e8;
  --frame: #f4f3f9;
  --purple: #553df6;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 0; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--purple); color: #fff; }
svg { display: block; fill: currentColor; }

/* shared type */
.label, .bar, .facts__label, .project__num, .nav nav a, .footer {
  font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}

/* nav */
.nav {
  position: relative; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  height: 72px; padding-inline: var(--gutter);
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__logo { width: 24px; height: 24px; transition: transform .6s var(--ease), color .3s; }
.nav__logo:hover { transform: rotate(90deg); color: var(--purple); }
.nav nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav nav a { color: var(--ink); transition: color .2s; }
.nav nav a:hover { color: var(--purple); }

/* hero */
.hero { position: relative; isolation: isolate; padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(56px, 8vh, 88px); max-width: 1440px; margin-inline: auto; }
/* soft lavender glow drifting behind the name */
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 0; top: 8%; width: min(900px, 90%); aspect-ratio: 2 / 1; pointer-events: none;
  background:
    radial-gradient(40% 55% at 30% 50%, rgba(85, 61, 246, .16), transparent 70%),
    radial-gradient(35% 50% at 65% 45%, rgba(228, 126, 240, .14), transparent 70%);
  filter: blur(30px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(8%, 10%) scale(1.08); } }
/* name letters rise in one by one */
.hero__name { flex-wrap: wrap; column-gap: .2em; }
.hero__name .word { display: inline-flex; white-space: nowrap; }
.hero__name .ch { display: inline-block; opacity: 0; translate: 0 .35em; animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + .1s); }
@keyframes rise { to { opacity: 1; translate: 0 0; } }
.hero__name {
  font: italic 400 clamp(84px, 13vw, 212px)/.9 var(--serif);
  letter-spacing: -.065em;
  display: flex; align-items: flex-start;
}
.hero__name sup { display: inline-block; width: .38em; height: .38em; margin: .04em 0 0 .08em; color: var(--purple); }
.hero__name sup svg { width: 100%; height: 100%; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__note {
  display: flex; gap: 5px; max-width: 620px; margin-top: clamp(16px, 2vw, 28px);
  color: var(--body); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6;
}
.hero__note strong { font-weight: 500; color: var(--ink); }
.hero__note svg { flex: none; width: .6em; height: .6em; margin-top: .25em; color: var(--purple); }

/* off-hours orbit: interests circling slowly beside the intro line */
.hero__row { display: grid; grid-template-columns: minmax(0, 620px) 1fr; gap: 32px; align-items: center; }
.interests { --r: 112px; --t: 70s; position: relative; justify-self: end; width: 280px; aspect-ratio: 1; margin: 0; }
.interests::before { content: ""; position: absolute; inset: calc(50% - var(--r)); border: 1px dashed #d9d6e6; border-radius: 50%; }
.interests__orbit { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; animation: spin var(--t) linear infinite; }
.interests:hover .interests__orbit, .interests:hover .interests__spin { animation-play-state: paused; }
.interests__item { position: absolute; left: 50%; top: 50%; transform: rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a))); }
/* zero-size pivot sitting exactly on the ring, so each badge counter-spins around its own centre */
.interests__spin { position: relative; display: block; width: 0; height: 0; animation: spin var(--t) linear infinite reverse; }
.interests__badge {
  position: absolute; left: -31px; top: -31px; display: grid; place-items: center; width: 62px; height: 62px; margin: 0; padding: 0; border-radius: 50%; cursor: default;
  background: #fff; border: 1px solid var(--hair); color: var(--ink);
  box-shadow: 0 10px 22px -12px rgba(30, 20, 90, .35); transition: border-color .25s, transform .35s var(--ease), box-shadow .35s;
}
.interests__badge:hover, .interests__badge:focus-visible { border-color: var(--purple); transform: scale(1.12); box-shadow: 0 14px 28px -12px rgba(85, 61, 246, .45); outline: none; }

/* duotone line icons: ink strokes, lavender fills, purple accents */
.ic { width: 30px; height: 30px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ic .t { fill: #e6e1ff; stroke: none; }
.ic .w { fill: #fff; }
.ic .a { stroke: var(--purple); }
.ic--sway { transform-origin: 50% 80%; }
.ic--tick .hand { transform-origin: 16px 16px; }
.interests__badge:hover .ic--sway, .interests__badge:focus-visible .ic--sway { animation: sway 1.2s ease-in-out infinite; }
.interests__badge:hover .ic--drive, .interests__badge:focus-visible .ic--drive { animation: drive .9s ease-in-out infinite; }
.interests__badge:hover .ic--lift, .interests__badge:focus-visible .ic--lift { animation: lift .9s ease-in-out infinite; }
.interests__badge:hover .ic--pop, .interests__badge:focus-visible .ic--pop { animation: pop .7s ease-in-out infinite; }
.interests__badge:hover .ic--tick .hand, .interests__badge:focus-visible .ic--tick .hand { animation: spin 2.4s linear infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes drive { 0%, 100% { transform: translateX(-2px); } 50% { transform: translate(2px, -1px); } }
@keyframes lift { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* centre: a quiet asterisk that gives way to the name of whatever you hover */
.interests__center { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; pointer-events: none; }
.interests__mark, .interests__text { grid-area: 1 / 1; transition: opacity .3s, transform .3s var(--ease); }
/* a single quiet dot at the centre, softly pulsing, until you hover an interest */
.interests__mark { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--purple); }
.interests__mark::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--purple); animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .45; } to { transform: scale(3.4); opacity: 0; } }
.interests.is-showing .interests__mark { transform: scale(.9); }
.interests__text { font: italic 400 26px/1.1 var(--serif); letter-spacing: -.015em; text-align: center; max-width: 140px; opacity: 0; transform: translateY(6px); }
.interests.is-showing .interests__mark { opacity: 0; }
.interests.is-showing .interests__text { opacity: 1; transform: none; }

/* facts strip: a ruled spec sheet */
.facts { display: grid; grid-template-columns: 1fr 1fr 1.6fr; border-block: 1px solid var(--rule); }
.facts__cell { display: flex; flex-direction: column; gap: 10px; padding: 24px var(--gutter); font-size: 18px; }
.facts__cell + .facts__cell { border-left: 1px solid var(--rule); }
.facts__label { color: var(--muted); }
.facts__cell a i, .link i { font-style: normal; display: inline-block; transition: transform .3s var(--ease); }
.facts__cell > a { align-self: flex-start; transition: color .2s; }
.facts__cell > a:hover { color: var(--purple); }
.facts__cell > a:hover i, .link:hover i { transform: translate(2px, -2px); }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--ink); border-radius: 999px; padding: 7px 18px; font-size: 15px; line-height: 1.3;
  transition: background .25s, color .25s, border-color .25s;
}
.pill:hover { background: var(--purple); border-color: var(--purple); color: #fff; }

/* section bar, as on the original site */
.bar {
  display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding-inline: var(--gutter);
  border-bottom: 1px solid var(--rule); margin-top: clamp(72px, 10vw, 120px); border-top: 1px solid var(--rule);
}
.facts + .reel > .bar { margin-top: clamp(96px, 12vw, 160px); }
.bar__aside { color: var(--muted); }
/* the reel's bar sticks under the nav and counts which project you're on */
.bar--sticky { position: sticky; top: 0; z-index: 9; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); }
.bar__count { display: inline-block; font-weight: 500; color: var(--purple); font-variant-numeric: tabular-nums; transition: transform .3s var(--ease), opacity .3s; }
.bar__count.is-flipping { transform: translateY(-40%); opacity: 0; }

/* projects */
.project { max-width: 1440px; margin-inline: auto; padding: clamp(64px, 8vw, 112px) var(--gutter); }
.project + .project { border-top: 1px solid var(--hair); }
.project__title {
  font: italic 400 clamp(32px, 3.2vw, 48px)/1.05 var(--serif); letter-spacing: -.015em; color: var(--ink);
  margin-bottom: 12px;
}
/* one-line tagline: dark and medium weight, set apart from the grey description by a short rule */
.project__text .project__tag { color: var(--ink); font-size: clamp(17px, 1.3vw, 20px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--hair); }
.project__row { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
/* media stage: light gradient backdrop, product floats on top */
.frame {
  --pad: clamp(18px, 6cqw, 56px);
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  container-type: size;
  display: grid; place-items: center;
  --g1: rgba(85, 61, 246, .22); --g2: rgba(85, 61, 246, .08); --g-base: #f3f1fb;
  background:
    radial-gradient(120% 90% at 85% 0%, var(--g1), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, var(--g2), transparent 60%),
    var(--g-base);
  box-shadow: inset 0 0 0 1px rgba(30, 40, 120, .07);
}
/* two light gradients, alternating: lavender and soft blue */
.project:nth-of-type(even) .frame, .feature:nth-of-type(even) .frame { --g1: rgba(42, 120, 246, .2); --g2: rgba(42, 120, 246, .08); --g-base: #eef4fd; }
.window {
  position: relative; border-radius: 10px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .06), 0 2px 4px rgba(30, 20, 90, .06), 0 24px 48px -20px rgba(30, 20, 90, .35);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.frame:hover .window { transform: translateY(-6px) scale(1.01); box-shadow: 0 0 0 1px rgba(17, 17, 17, .06), 0 4px 8px rgba(30, 20, 90, .06), 0 36px 64px -24px rgba(30, 20, 90, .45); }
.window video, .window img {
  display: block; width: auto; height: auto;
  max-width: calc(100cqw - 2 * var(--pad));
  max-height: calc(100cqh - 2 * var(--pad));
}
.project__text { padding-block: 8px; }
.project__num { display: block; color: var(--muted); margin-bottom: 10px; }
.project__text p { color: var(--body); font-size: clamp(16px, 1.2vw, 18px); }
.project__text p + p { margin-top: 1em; }
/* project links as chips, matching the hero buttons */
.link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; font-size: 15px; line-height: 1.3; color: var(--ink); transition: background .25s, color .25s, border-color .25s; }
.link:hover { background: var(--purple); border-color: var(--purple); color: #fff; }

/* about */
.about {
  max-width: 1440px; margin-inline: auto; padding: clamp(64px, 8vw, 112px) var(--gutter) 0;
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start;
}
.about__photo { position: sticky; top: 40px; border-radius: 12px; overflow: hidden; background: var(--frame); }
.about__photo img { display: block; width: 100%; height: auto; }
.about__lead { font: italic 400 clamp(36px, 3.8vw, 56px)/1.05 var(--serif); letter-spacing: -.015em; }
.about__body { margin-top: 24px; }
.about__body p { color: var(--body); }
.about__body p + p { margin-top: 1em; }
.about__group { margin-top: clamp(48px, 6vw, 72px); }
.label { color: var(--muted); margin-bottom: 12px; }
.entries { list-style: none; border-top: 1px solid var(--hair); }
.entries li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.entries b { display: block; font-weight: 500; }
.entries span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.entries time { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.awards { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.awards li { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 18px; border-radius: 12px; background: #f6f5fb; }
.awards b { font-weight: 500; line-height: 1.3; }
.award__meta { color: var(--purple); font-size: 13px; }

/* contact */
.contact { max-width: 1440px; margin-inline: auto; padding: clamp(64px, 8vw, 112px) var(--gutter); }
.contact__line span { color: var(--purple); font-style: italic; }
.contact__line { font: 400 clamp(48px, 6.5vw, 96px)/1.02 var(--serif); letter-spacing: -.015em; margin-bottom: 32px; }

/* ---------- case study pages ---------- */
.frame--wide { aspect-ratio: 16 / 10; }
.cs { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.cs-hero { padding-block: clamp(32px, 4vw, 56px) clamp(32px, 4vw, 48px); }
.back { display: inline-flex; gap: 8px; color: var(--muted); font-size: 15px; margin-bottom: clamp(24px, 3vw, 36px); transition: color .2s; }
.back:hover { color: var(--purple); }
.cs-hero .cs-hero__eyebrow { color: var(--purple); margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.cs-hero h1 { font: italic 400 clamp(40px, 4.8vw, 72px)/1.02 var(--serif); letter-spacing: -.015em; max-width: 22ch; }
.cs-hero .cs-hero__sub { max-width: 640px; margin-top: 16px; color: var(--body); font-size: clamp(18px, 1.5vw, 21px); }
.cs .facts { margin-inline: calc(-1 * var(--gutter)); margin-bottom: clamp(24px, 3vw, 40px); }
.cs .facts + .cs-section { border-top: 0; }

.cs-section { display: grid; grid-template-columns: 1fr 2.4fr; gap: clamp(24px, 5vw, 80px); padding-block: clamp(56px, 7vw, 96px); border-top: 1px solid var(--hair); }
.cs-section h2 { position: sticky; top: 40px; align-self: start; font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cs-section__body > p { color: var(--body); font-size: clamp(17px, 1.3vw, 19px); max-width: 720px; }
.cs-section__body > p + p { margin-top: 1em; }
.cs-section__body > .lead { color: var(--ink); font: 500 clamp(24px, 2.4vw, 32px)/1.3 var(--sans); letter-spacing: -.02em; }
.cs-section__body .frame { margin-top: clamp(28px, 4vw, 48px); }
.caption { margin-top: 14px; color: var(--muted); font-size: 14px; }

.points { list-style: none; counter-reset: pt; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.points li { counter-increment: pt; padding: 24px; border-radius: 14px; background: #f7f6fc; }
.points li::before { content: counter(pt, decimal-leading-zero); display: block; color: var(--purple); font-size: 13px; font-weight: 500; margin-bottom: 28px; }
.points b { display: block; font-weight: 500; margin-bottom: 8px; }
.points p { color: var(--body); font-size: 15px; line-height: 1.6; }

.feature { margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid var(--hair); }
.feature__num { display: block; color: var(--purple); font-size: 13px; font-weight: 500; letter-spacing: .08em; }
.feature h3 { font: 500 clamp(24px, 2.4vw, 32px)/1.2 var(--sans); letter-spacing: -.02em; margin: 10px 0 12px; }
.feature p { color: var(--body); max-width: 680px; }

.next { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(48px, 7vw, 96px) var(--gutter); border-top: 1px solid var(--rule); max-width: 1440px; margin-inline: auto; }
.next span { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.next a { font: 400 clamp(32px, 4.4vw, 60px)/1.1 var(--serif); letter-spacing: -.015em; transition: color .25s; }
.next a i { font-style: normal; display: inline-block; transition: transform .3s var(--ease); }
.next a:hover { color: var(--purple); }
.next a:hover i { transform: translateX(8px); }

.project__title a { transition: color .25s; }
.project__title a:hover { color: var(--purple); }

/* ---------- articles (case study layout + long-form bits) ---------- */
.cs-section__body ul { margin-top: 1em; padding-left: 1.2em; max-width: 720px; }
.cs-section__body li { color: var(--body); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; }
.cs-section__body li + li { margin-top: .6em; }
.cs-section__body li::marker { color: var(--purple); }
.cs-section__body strong { color: var(--ink); font-weight: 500; }
.feature p + p { margin-top: 1em; }
.cs-section__body blockquote { margin-top: 32px; max-width: 720px; padding: 4px 0 4px 24px; border-left: 2px solid var(--purple); font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; letter-spacing: -.01em; }
.points--2 { grid-template-columns: repeat(2, 1fr); }
/* the three complaints, styled as overheard speech bubbles stepping across the column */
.complaints { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; max-width: 720px; }
.complaints p {
  position: relative; align-self: flex-start; padding: 14px 24px; border-radius: 22px 22px 22px 6px;
  background: #f6f5fb; font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; color: var(--ink) !important;
}
.complaints p::before { content: "“"; position: absolute; left: -.1em; top: -.35em; font-size: 2.2em; line-height: 1; color: var(--purple); opacity: .9; }
.complaints p:nth-child(2) { margin-left: 12%; }
.complaints p:nth-child(3) { margin-left: 24%; }
.complaints b { font-weight: 500; color: var(--purple); }
@media (max-width: 480px) { .complaints p:nth-child(2) { margin-left: 6%; } .complaints p:nth-child(3) { margin-left: 12%; } }

.figure { margin-top: clamp(24px, 3vw, 36px); max-width: 720px; }
.figure img, .figure video { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--hair); }
.figure--sm { max-width: 340px; }
.figure figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }

.source-note { margin-top: 40px !important; font-size: 15px !important; color: var(--muted) !important; }
.source-note a { color: var(--purple); }

/* footer */
.footer { display: flex; justify-content: space-between; padding: 24px var(--gutter); border-top: 1px solid var(--rule); }
.footer a:hover { color: var(--purple); }

/* reveal */
.fade { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s); }
.fade.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transform: none; transition: none; }
  .hero__name sup svg { animation: none; }
  .hero__name .ch { opacity: 1; translate: none; animation: none; }
  .hero::before { animation: none; }
  .interests__orbit, .interests__spin, .interests__mark::after, .ic, .ic .hand { animation: none !important; }
}

/* responsive */
@media (min-width: 1100px) {
  .interests { position: absolute; right: var(--gutter); top: 50%; translate: 0 -50%; }
  .hero__row { grid-template-columns: minmax(0, 620px); }
}
@media (max-width: 860px) {
  .hero__row { grid-template-columns: 1fr; }
  .interests { --r: 96px; justify-self: center; width: 240px; margin-top: 8px; }
  .cs-section { grid-template-columns: 1fr; }
  .cs-section h2 { position: static; }
  .points { grid-template-columns: 1fr; }
  .next { flex-direction: column; align-items: flex-start; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts__cell--links, .facts__cell:nth-child(3) { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--rule); }
  .project__row, .about { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 420px; }
  .project__text { position: static; }
}
@media (max-width: 480px) {
  .points--2 { grid-template-columns: 1fr; }
  .awards { grid-template-columns: 1fr; }
  .nav nav a[href="#contact"] { display: none; }
  .facts__cell { font-size: 16px; padding-block: 18px; }
}
