/* ==========================================================================
   neerajprabhu.com — hand-coded rebuild of the Framer site
   Colours, fonts and spacing are copied from the live Framer site.
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Pixel"; src: url("../fonts/geist-pixel.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f8f8f8;
  --fg: #121212;
  --muted: #a6a6a6;
  --dot: #dcdcdc;
  --pill: rgba(120, 120, 120, .88);
  --m-pill: var(--pill);
  --pill-fg: #fafafa;
  --menu: rgba(18, 18, 18, .92);
  --line: rgba(18, 18, 18, .1);
  --accent: #ff004d;
  --green: #10917c;
  --gate: #000;
  --font-pixel: "Geist Pixel", ui-monospace, monospace;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Inter", system-ui, sans-serif;
  --page: 800px;   /* case-study column */
  --wide: 1000px;  /* home grid + footer */
  --gutter: 16px;
  --img-border: #dedede;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --fg: #f8f8f8; --muted: #a1a1a1; --dot: #2b2b2b;
    --pill: rgba(8, 8, 8, .75); --m-pill: rgba(0, 0, 0, .25); --menu: rgba(10, 10, 10, .95); --line: rgba(255, 255, 255, .1); --img-border: #4d4d4d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --fg: #f8f8f8; --muted: #a1a1a1; --dot: #2b2b2b;
  --pill: rgba(8, 8, 8, .75); --m-pill: rgba(0, 0, 0, .25); --menu: rgba(10, 10, 10, .95); --line: rgba(255, 255, 255, .1); --img-border: #4d4d4d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 30px 30px;
  background-position: 15px 15px;
  background-attachment: fixed;
  color: var(--fg);
  font: 300 14px/1.3 var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ---------- type ---------- */
.t-pixel { font-family: var(--font-pixel); font-weight: 400; letter-spacing: -.02em; }
.t-hero  { font-family: var(--font-pixel); font-size: 24px; line-height: 1.2; letter-spacing: -.02em; color: var(--fg); }
.t-title { font-family: var(--font-pixel); font-size: 40px; line-height: 1.15; letter-spacing: -.03em; }
.t-h     { font-family: var(--font-pixel); font-size: 16px; line-height: 1.2; letter-spacing: -.04em; color: var(--fg); }
.t-body  { font: 300 14px/1.3 var(--font-sans); color: var(--muted); }
.t-body-lg { font: 300 16px/1.2 var(--font-sans); color: var(--muted); }
.t-label { font: 500 13px/1.4 var(--font-label); font-optical-sizing: auto; letter-spacing: .03em; text-transform: uppercase; color: var(--fg); }
.t-label.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 24px; left: 0; right: 0; z-index: 50; pointer-events: none; }
.topbar-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); height: 44px; display: flex; align-items: center; justify-content: space-between; }
.topbar a, .topbar button { pointer-events: auto; }
.back {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 16px; border-radius: 22px;
  background: var(--pill); color: var(--pill-fg); text-decoration: none; font-size: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform .2s ease;
}
.back svg { width: 16px; height: 16px; }
.back[hidden] { display: inline-flex; visibility: hidden; }
.social { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pill); color: var(--pill-fg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease;
}
.icon-btn svg { width: 15px; height: 15px; }

/* centre menu pill */
.menu {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 230px; pointer-events: auto;
  background: var(--pill); color: var(--pill-fg); border-radius: 22px; overflow: hidden;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: width .35s cubic-bezier(.2,.8,.2,1), border-radius .35s ease, background .3s ease;
}
.menu-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 12px 0 16px; }
.menu-head .brand { font: 400 16px/1.4 var(--font-pixel); letter-spacing: -.03em; text-decoration: none; color: inherit; }
.menu-toggle, .theme-toggle { background: none; border: 0; padding: 6px; color: inherit; cursor: pointer; display: grid; place-items: center; }
.menu-toggle svg, .theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle { display: none; }
.menu-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2,.8,.2,1); }
.menu-body > div { overflow: hidden; padding: 0 16px; }
.menu-links { list-style: none; margin: 6px 0 0; padding: 0 0 18px; border-bottom: 1px solid rgba(255,255,255,.15); }
.menu-links a { display: inline-block; font: 400 28px/1.5 var(--font-pixel); letter-spacing: -.03em; text-decoration: none; transition: color .2s, transform .2s; }
.menu-links a:hover { color: var(--accent); transform: translateX(4px); }
.menu-social { display: flex; gap: 12px; padding: 18px 0; }
.menu-social a { width: 36px; height: 36px; border-radius: 50%; background: #fafafa; color: #121212; display: grid; place-items: center; }
.menu-social svg { width: 15px; height: 15px; }
.book {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px; margin-bottom: 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.3); text-decoration: none; font-size: 14px; font-weight: 400; transition: background .2s;
}
.menu.open { width: 300px; border-radius: 18px; background: var(--menu); }
.menu.open .menu-body { grid-template-rows: 1fr; }
.menu.open .theme-toggle { display: grid; }
.menu-contact { display: none; }

/* ---------- footer ---------- */
.site-footer { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 160px var(--gutter) 24px; }
.footer-card { background-color: var(--green); background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 14px 14px; color: #fff; border-radius: 8px; padding: 14px 18px 10px; overflow: hidden; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.copy { border: 1px solid rgba(255,255,255,.8); border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.roll { position: relative; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; text-transform: uppercase; font: 400 14px/1.6 var(--font-sans); }
.roll::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right center; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.roll:hover::after, .roll:focus-visible::after { transform: scaleX(1); transform-origin: left center; }
.roll .rt { display: inline-block; overflow: hidden; height: 1.6em; }
.roll .rt span { display: block; }
.roll .rt span + span { display: none; }
.roll svg { width: 12px; height: 12px; }
.footer-top { position: relative; z-index: 1; }
.wordmark { pointer-events: none; display: block; font: 400 clamp(52px, 15.4vw, 170px)/.95 var(--font-pixel); letter-spacing: -.06em; white-space: nowrap; text-align: center; margin-top: 6px; }

/* "See all projects" buttons at the end of case studies */
.end-links { display: flex; justify-content: space-around; gap: 16px; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 110px auto 0; padding: 0 var(--gutter); flex-wrap: wrap; }
.end-links a {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 20px 0 22px; border-radius: 21px; border: 1px solid var(--muted); color: var(--fg);
  text-decoration: none; font: 400 20px/1 var(--font-pixel); letter-spacing: -.02em; transition: background .25s, border-color .25s, color .25s;
}
.end-links a svg { width: 16px; height: 16px; }
.end-links a .rt { height: 24px; line-height: 24px; overflow: hidden; display: inline-block; }
.end-links a .rt span { display: block; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.end-links a:hover .rt span { transform: translateY(-100%); }
.end-links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- home ---------- */
.hero { min-height: 88vh; min-height: calc(88 * var(--svh, 1svh)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px var(--gutter) 40px; box-sizing: border-box; }
.hero .t-hero { max-width: 800px; text-align: center; }
.marquee { width: min(800px, 100%); margin-top: 30px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { font: 400 13px/1 var(--font-sans); text-transform: uppercase; color: var(--muted); white-space: nowrap; padding-right: 24px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.projects { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.projects .row { display: flex; gap: 12px; }
.card { position: relative; display: block; height: 450px; border-radius: 8px; overflow: hidden; text-decoration: none; color: #fafafa; isolation: isolate; }
.card { --ease-out: cubic-bezier(.22, 1, .36, 1); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(196deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.55) 100%); opacity: 0; transition: opacity .6s var(--ease-out); }
.card .info { position: absolute; left: 20px; bottom: 18px; z-index: 2; overflow: hidden; padding-top: 2px; }
.card .info > * { display: block; transform: translateY(105%); opacity: 0; transition: transform .7s var(--ease-out), opacity .5s var(--ease-out); }
.card .info > p { transform: translateY(160%); }
.card .info .t-pixel { font-size: 24px; line-height: 1.2; }
.card .info p { font-size: 14px; margin-top: 4px; }
.card .go { position: absolute; left: 50%; top: 50%; z-index: 2; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transform: scale(0); transition: transform .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.card .go svg { width: 20px; height: 20px; }
.card .go.go-nda { width: auto; height: 34px; margin: -17px 0 0 0; padding: 0 14px; border-radius: 17px; translate: -50% 0; white-space: nowrap; font: 400 13px/34px var(--font-sans); color: #fff; letter-spacing: .01em; }
.card .nda { position: absolute; right: 16px; top: 16px; z-index: 2; width: 24px; height: 24px; color: #fff; opacity: .9; }
.card:hover img { transform: scale(1.05); }
.card:hover::after { opacity: 1; }
.card:hover .info > * { transform: none; opacity: 1; }
.card:hover .info > p { transition-delay: .07s; }
.card:hover .go { transform: scale(1); }

.about { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 440px var(--gutter) 200px; display: flex; gap: 36px; justify-content: center; align-items: flex-start; scroll-margin-top: 60px; }
.polaroid { position: relative; flex: 0 0 326px; height: 450px; padding: 0; background: none; border-radius: 4px; overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  box-shadow: var(--shx, 0px) var(--shy, 14px) 40px -14px rgba(0, 0, 0, var(--sha, .12)); will-change: transform; }
.polaroid img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; filter: grayscale(1); display: block; }
.polaroid::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--glare, 0); mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%); }
.about-text { flex: 0 1 448px; padding-top: 130px; color: var(--fg); }
.about-text p { font: 300 14px/1.3 var(--font-sans); margin-bottom: 18px; }

/* ---------- case studies ---------- */
.case { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 180px var(--gutter) 0; }
.case-head .t-title { margin-top: 12px; color: var(--fg); }
.flow { --s: 1; }
.flow > .band { display: flex; align-items: flex-start; }
.flow .col { display: flex; flex-direction: column; min-width: 0; }
.flow .col > * { width: 100%; }
.media { width: 100%; height: auto; object-fit: cover; background: rgba(127,127,127,.08); }
.flow .t-h, .flow .t-body, .flow .t-body-lg { white-space: pre-line; }
.meta { display: flex; }
.meta > div { display: flex; flex-direction: column; gap: 12px; }
.meta .t-body { white-space: pre-line; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; padding: 0; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* password gate (for NDA projects) */
.gate { position: fixed; inset: 0; z-index: 100; background: var(--gate); display: grid; place-items: center; padding: 16px; }
.gate form { width: 310px; max-width: 100%; background: #141414; border: 1px solid #262626; border-radius: 15px; padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 12px; text-align: center; color: rgba(255,255,255,.75); font: 500 14px/1.25 var(--font-label); }
.gate svg { width: 20px; height: 20px; margin: 0 auto; color: #fff; }
.gate input { height: 40px; border-radius: 10px; border: 1px solid #262626; background: #1c1c1c; color: #fff; padding: 0 12px; font: 400 14px var(--font-label); outline: none; }
.gate input:focus { border-color: #444; }
.gate button { height: 40px; border-radius: 10px; border: 0; background: #262626; color: rgba(255,255,255,.6); font: 600 12px var(--font-label); cursor: pointer; }
.gate button:hover { color: #fff; }
.gate .err { color: var(--accent); font-size: 12px; min-height: 1em; }
html.locked body > :not(.gate) { visibility: hidden; }

/* ---------- archives ---------- */
.page-intro { padding: 212px var(--gutter) 0; display: flex; justify-content: center; }
.page-intro .t-hero { max-width: 800px; text-align: center; }
.experiments { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 120px var(--gutter) 0; display: flex; flex-direction: column; gap: 110px; }
.experiment { display: flex; align-items: center; gap: 60px; }
.stack { position: relative; flex: 0 0 500px; height: 500px; cursor: pointer; }
.stack > * { position: absolute; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.25); transition: transform .6s cubic-bezier(.2,.8,.2,1), z-index 0s .3s; }
.stack:hover > :nth-last-child(2) { transform: var(--t) translate(-14px, -6px); }
.stack:hover > :nth-last-child(3) { transform: var(--t) translate(14px, 6px); }
.experiment .t-pixel { font-size: 32px; line-height: 1.1; letter-spacing: -.03em; color: var(--fg); }
.experiment .text { max-width: 351px; }
.experiment .t-body { margin-top: 14px; }
.experiment .hint { margin-top: 12px; }

/* ---------- gallery ---------- */
.gallery { padding: 120px 0 0; display: flex; flex-direction: column; gap: 70px; }
.reel-head { max-width: 1160px; margin: 0 auto 20px; padding: 0 clamp(0px, var(--gutter) - (100vw - 1160px) / 2, var(--gutter)); display: flex; gap: 40px; color: var(--fg); }
.reel { max-width: 1160px; margin: 0 auto; overflow: hidden; }
.reel-track { display: flex; gap: 10px; width: max-content; animation: reel var(--dur, 60s) linear infinite; }
.reel.js .reel-track { animation: none; will-change: transform; }
.reel.js { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.reel.js.dragging { cursor: grabbing; }
.reel.js img { -webkit-user-drag: none; pointer-events: none; }
.reel-track img { height: 592px; width: auto; object-fit: cover; flex: none; }
@keyframes reel { to { transform: translateX(calc(-50% - 5px)); } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
/* the about photo keeps its tilt once revealed */
.polaroid.reveal.in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  transition: opacity .8s ease; }

/* Animations play even when the computer's "reduce motion" / "animation effects" setting is on, same as Framer. */

/* ---------- tablet / phone ---------- */
@media (max-width: 1100px) {
  .topbar-inner { max-width: none; }
}
@media (max-width: 809px) {
  .topbar { top: 12px; }
  .topbar-inner { padding: 0 12px; }
  .back, .social { display: none !important; }
  .hero { align-items: flex-start; padding: 80px var(--gutter) 24px; }
  .hero .t-hero { text-align: left; }
  .projects .row { flex-direction: column; }
  .projects .row .card { flex: none !important; width: 100%; height: auto; aspect-ratio: 366 / 440; }
  .card .info > *, .card .info > p { opacity: 1; transform: none; }
  .card::after { opacity: 1; }
  .card .go { display: none; }
  .about { flex-direction: column; align-items: center; padding-top: 200px; }
  .polaroid { flex: none; width: min(326px, 100%); }
  .about-text { padding-top: 20px; }
  .case { padding-top: 140px; }
  .flow { --s: .55; }
  .meta { flex-direction: column; gap: 14px; }
  .meta > div { flex-direction: row; gap: 0; }
  .meta > div { margin-left: 0 !important; width: 100% !important; }
  .meta > div > :first-child { flex: 0 0 160px; }
  .flow .t-h, .flow .t-body { font-size: 14px; }
  .flow .indent { margin-left: 0 !important; width: 100% !important; }
  .end-links { padding: 0 var(--gutter); }
  .experiment { flex-direction: column; align-items: stretch; gap: 30px; }
  .stack { flex: none; width: 100%; height: auto; aspect-ratio: 1; }
  .reel-track img { height: 360px; }
  .reel-head { gap: 24px; }
  .footer-links { gap: 14px; }
  .site-footer { padding-top: 80px; }
}

/* ---------- phone navbar (matches Framer: brand pill left, dots pill right, full-screen menu) ---------- */
@media (max-width: 809px) {
  .topbar-inner { display: block; height: 0; padding: 0; }
  .menu, .menu.open { position: static; transform: none; width: auto; background: none; border-radius: 0; overflow: visible;
    backdrop-filter: none; -webkit-backdrop-filter: none; transition: none; color: #fafafa; }
  .menu-head { position: fixed; top: 12px; left: 12px; right: 12px; height: 35px; padding: 0; z-index: 2; pointer-events: none; }
  .menu-head > * { pointer-events: auto; }
  .menu-head .brand, .menu-toggle {
    background: var(--m-pill); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: #fafafa;
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); transition: background .3s, box-shadow .3s, opacity .3s;
  }
  .menu-head .brand { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 60px; font-size: 16px; letter-spacing: -.03em; }
  .home .menu:not(.open) .brand { opacity: 0; visibility: hidden; }
  .menu-toggle { width: 56px; height: 35px; padding: 0; border-radius: 30px; }
  .menu-toggle svg { width: 20px; height: 20px; }
  .menu-toggle .m { transition: opacity .3s; }
  .menu.open .menu-toggle .m { opacity: .15; }
  .theme-toggle, .menu.open .theme-toggle { display: none; }
  .menu.open .brand, .menu.open .menu-toggle { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu.open .brand { padding: 0 4px; }
  .menu-body, .menu.open .menu-body {
    position: fixed; inset: 0; z-index: 1; display: block; overflow-y: auto; overscroll-behavior: contain;
    background: rgba(0, 0, 0, .68); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  }
  .menu.open .menu-body { opacity: 1; visibility: visible; }
  .menu-body > div { overflow: visible; padding: 70px 16px 40px; }
  .menu-links { margin: 0; padding: 0 0 22px; border-bottom: 1px solid rgba(255, 255, 255, .55); }
  .menu-links li { padding: 12px 0; }
  .menu-links a { font-size: 55px; line-height: 60.5px; letter-spacing: -1.65px; transform: translateY(12px); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s, color .2s; }
  .menu.open .menu-links a { transform: none; opacity: 1; }
  .menu.open .menu-links li:nth-child(2) a { transition-delay: .04s; }
  .menu.open .menu-links li:nth-child(3) a { transition-delay: .08s; }
  .menu.open .menu-links li:nth-child(4) a { transition-delay: .12s; }
  .menu.open .menu-links li:nth-child(5) a { transition-delay: .16s; }
  .menu-links a:hover { transform: none; }
  .menu-social { display: none; }
  .menu-contact { display: block; padding-top: 40px; }
  .menu-contact p { margin: 0 0 8px; font: 400 13px/18.2px var(--font-label); letter-spacing: .03em; text-transform: uppercase; color: rgba(250, 250, 250, .6); }
  .menu-contact a { display: flex; align-items: center; gap: 6px; padding: 5px 0; font: 400 13px/15.6px var(--font-sans); text-transform: uppercase; text-decoration: none; color: inherit; }
  .menu-contact svg { width: 15px; height: 15px; }
  .book { margin: 32px 0 0; border-color: rgba(255, 255, 255, .3); color: #fafafa; }
  html.menu-open { overflow: hidden; }
}

/* ---------- home page entrance animations (timings measured from the Framer site) ---------- */
:root {
  /* Framer spring, duration 1, bounce .1, as Framer actually plays it (about .75s) */
  --spring-nav: linear(0, 0.009, 0.023, 0.084, 0.172, 0.26, 0.333, 0.417, 0.486, 0.541, 0.597, 0.674, 0.728, 0.77, 0.808, 0.841, 0.87, 0.894, 0.914, 0.931, 0.945, 0.957, 0.967, 0.975, 0.981, 0.986, 0.99, 0.993, 0.996, 0.998, 0.999, 1, 1);
}
@keyframes drop-in { from { opacity: 0; translate: 0 -60px; } }
/* Home load sequence: 1. intro text  2. navbar  3. social links  4. projects */
@keyframes intro-in { from { opacity: 0; scale: .9; } }
@keyframes slide-left-in { from { opacity: 0; translate: 24px 0; } }
@keyframes rise-in { from { opacity: 0; translate: 0 80px; } }
.home .hero { animation: intro-in 2.2s cubic-bezier(.33, 1, .68, 1) .15s backwards; }
@media (min-width: 810px) {
  .home .menu { animation: drop-in .75s var(--spring-nav) 1.4s backwards; }
  .home .social .icon-btn { animation: slide-left-in .8s cubic-bezier(.22, 1, .36, 1) backwards; }
  .home .social .icon-btn:nth-child(1) { animation-delay: 1.9s; }
  .home .social .icon-btn:nth-child(2) { animation-delay: 1.98s; }
  .home .social .icon-btn:nth-child(3) { animation-delay: 2.06s; }
}
@media (max-width: 809px) { .home .menu-head { animation: drop-in .75s var(--spring-nav) 1.4s backwards; } }
.home .projects { animation: rise-in 1.2s cubic-bezier(.22, 1, .36, 1) 2.3s backwards; }
@media (hover: none) {
  .card .info > *, .card .info > p { opacity: 1; transform: none; }
  .card::after { opacity: 1; }
}

/* ---------- navbar buttons: invert colours on hover ---------- */
.back, .icon-btn, .menu-social a, .book, .menu-toggle, .theme-toggle {
  transition: background-color .45s cubic-bezier(.22, 1, .36, 1), color .45s cubic-bezier(.22, 1, .36, 1),
    box-shadow .45s cubic-bezier(.22, 1, .36, 1), border-color .45s cubic-bezier(.22, 1, .36, 1), transform .45s cubic-bezier(.22, 1, .36, 1);
}
.menu-toggle, .theme-toggle { border-radius: 50%; }
@media (hover: hover) {
  .back:hover, .icon-btn:hover { background: #fafafa; color: #121212; }
  .icon-btn:hover { transform: scale(1.06); }
  .menu-social a:hover { background: #121212; color: #fafafa; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
  .book:hover { background: #fafafa; color: #121212; border-color: #fafafa; }
  .menu-toggle:hover, .theme-toggle:hover { background: #fafafa; color: #121212; }
}
@media (hover: hover) and (max-width: 809px) {
  .menu:not(.open) .menu-toggle:hover { background: #fafafa; color: #121212; }
}

/* ---------- Lenis smooth scroll (from lenis.css) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- page transition: smooth gradient wipe in the page background colour (drawn by site.js) ---------- */
html.pt-enter::after { content: ""; position: fixed; inset: 0; z-index: 9999; background: var(--bg); pointer-events: none; }
.pt-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 10000; pointer-events: none; }
.pt-canvas.blocking { pointer-events: auto; }

/* Experiments: taller intro so about 30% of the first experiment peeks in at the bottom */
.page-intro:has(+ .experiments) { box-sizing: border-box; min-height: calc(100 * var(--svh, 1svh) - 120px - 150px); padding: 80px var(--gutter) 0; align-items: center; }
@media (max-width: 809px) {
  .page-intro:has(+ .experiments) { min-height: calc(100 * var(--svh, 1svh) - var(--exp-pad, 120px) - .3 * (100vw - 2 * var(--gutter))); }
}

/* phones: intro text boxes span 90% of the screen, left aligned */
@media (max-width: 809px) {
  .hero, .page-intro { padding-left: 5vw; padding-right: 5vw; }
  .hero { align-items: flex-start; }
  .hero .t-hero, .page-intro .t-hero { width: 100%; max-width: none; text-align: left; }
  .page-intro { justify-content: flex-start; }
}

/* ---- every image: 12px corners, iOS-style smoothing (squircle) where the browser supports it ---- */
.media, .card, .stack > *, .polaroid, .polaroid img, .reel-track img, .yt, .work img, main img { border-radius: 12px; overflow: hidden; }
@supports (corner-shape: squircle) {
  .media, .card, .stack > *, .polaroid, .polaroid img, .reel-track img, .yt, .work img, main img { border-radius: 17px; corner-shape: squircle; }
}
/* home project thumbnails: 16px */
.card, .projects .row .card { border-radius: 16px; }
@supports (corner-shape: squircle) { .card, .projects .row .card { border-radius: 22px; corner-shape: squircle; } }
/* 1px hairline around every image (as on Framer); it follows the same smooth corner */
main img, .card, .polaroid, .stack > *, .yt { border: 1px solid var(--img-border); }
.card img, .polaroid img { border: 0; }

/* ---- cookie consent (shown only to European visitors, see analytics.js) ---- */
.consent {
  position: fixed; left: var(--gutter); bottom: var(--gutter); z-index: 80; max-width: 340px;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 18px;
  background: var(--pill); color: var(--pill-fg); font: 300 13px/1.3 var(--font-sans);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.8,.2,1);
}
.consent.show { opacity: 1; transform: none; pointer-events: auto; }
.consent p { margin: 0; }
.consent-btns { display: flex; gap: 6px; flex: none; }
.consent button {
  height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid rgba(250, 250, 250, .35);
  background: none; color: inherit; font: 400 12px var(--font-sans); cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.consent button:hover { border-color: rgba(250, 250, 250, .7); }
.consent button.yes { background: var(--accent); border-color: var(--accent); color: #fff; }
.consent button.yes:hover { background: #e60045; border-color: #e60045; }
@media (max-width: 480px) { .consent { right: var(--gutter); max-width: none; } }
