/* Kavish Raj Singh — white page, black type, a mosaic portrait. Black and white only. */

:root {
  --bg: #ffffff;
  --soft: #f4f4f4;
  --ink: #141414;
  --body: #3b3a37;
  --dim: #6b6a66;
  --rule: #e6e5e1;
  --accent: #141414;   /* emphasis is black: weight and underline, never colour */
  --pad: max(clamp(20px, 4vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right));   /* clear of a notch on its side */
  --max: 1120px;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Newsreader", Georgia, serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b { font-weight: 600; color: var(--ink); }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
::selection { background: #141414; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 16px;
  font: 500 14px/1 var(--sans); text-decoration: none; border-radius: 6px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 8px;
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #333; }
.btn--line { border: 1px solid #cfcec9; color: var(--ink); background: rgba(255,255,255,.7); }
.btn--line:hover { border-color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn span { margin-left: 8px; }

/* ---------- top bar ---------- */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding: 0 var(--pad);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .3s ease;
}
.top.is-solid { border-bottom-color: var(--rule); }
.top.is-hidden { transform: translateY(-100%); }
.top a { text-decoration: none; color: var(--ink); }
.top__mark { font: 600 16px/1 var(--sans); letter-spacing: -0.01em; padding: 14px 0; }
.top__nav { display: flex; gap: clamp(16px, 2.4vw, 32px); }
.top__nav a { font: 500 15px/1 var(--sans); color: var(--body); padding: 16px 0; }
.top__nav a:hover { color: var(--ink); }

/* phones: one Menu button, and every link in a sheet that drops from the bar */
.top__menu { display: none; }
@media (max-width: 760px) {
  .top__menu { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0; border: 0; background: none; font: 500 15px/1 var(--sans); color: var(--ink); cursor: pointer; }
  .top__menu i { position: relative; width: 18px; height: 8px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transition: transform .35s cubic-bezier(.2,.7,.2,1), height .35s cubic-bezier(.2,.7,.2,1); }
  .top.is-open .top__menu i { height: 0; border-bottom: 0; transform: rotate(180deg); }
  .top__nav { position: fixed; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 4px var(--pad) 18px; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--rule); box-shadow: 0 18px 30px -24px rgba(20,20,20,.35);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s ease, transform .3s cubic-bezier(.2,.7,.2,1), visibility 0s linear .3s; }
  .top.is-open .top__nav { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
  .top__nav a { padding: 15px 0; font-size: 19px; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .top__nav a:last-child { border-bottom: 0; }
}

/* ---------- hero ---------- */

.hero { position: relative; }
.js:not(.rm) .hero { height: 460vh; height: 460svh; }   /* six photos arrive, then the collage rests */
.collage { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cl { position: absolute; margin: 0; font-size: 13px; padding: 8px 8px 44px; background: #fff; border-radius: 3px; box-shadow: 0 1px 2px rgba(20,20,20,.08), 0 18px 40px -18px rgba(20,20,20,.35); transform-origin: 50% 50%; visibility: hidden; opacity: 0; will-change: opacity, transform; }
.cl img { display: block; width: 100%; height: auto; border-radius: 1px; }
.cl figcaption { position: absolute; left: 10px; right: 10px; top: calc(100% - 38px); font-size: inherit; line-height: 1.2; color: var(--body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; }
.rm .collage, html:not(.js) .collage { display: none; }

.hero__stage {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg);
}
.js:not(.rm):not(.smooth) .hero__stage { position: sticky; top: 0; }

/* The still sets the portrait's box; the canvas reads it so both line up exactly. */
.hero__still {
  position: absolute;
  right: 3vw; bottom: 0;
  width: min(86svh, 50vw);
  height: auto;
  aspect-ratio: 1;
  max-width: none;
  user-select: none;
}
.js:not(.rm):not(.no-canvas) .hero__still { visibility: hidden; }

.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.rm .hero__canvas, html:not(.js) .hero__canvas, .no-canvas .hero__canvas { display: none; }

.hero__copy {
  position: absolute; z-index: 3;
  left: var(--pad); top: 50%;
  transform: translateY(-46%);
  width: min(32rem, 44vw);
}
.hero__role { font: 500 15px/1.4 var(--sans); color: var(--dim); }
.name {
  margin-top: 14px;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 650;
}
.hero__sub { margin-top: 20px; font-size: clamp(18px, 1.4vw, 20px); line-height: 1.55; color: var(--body); max-width: 30rem; }
.hero__cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__loc { margin-top: 28px; font: 400 13px/1 var(--mono); color: var(--dim); }
.clock { margin-left: 6px; font-variant-numeric: tabular-nums; }

.hero__cue {
  position: absolute; right: var(--pad); bottom: 22px;
  font: 400 12px/1 var(--mono); color: var(--dim);
  display: flex; align-items: center; gap: 10px;
}
.hero__cue::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.rm .hero__cue, html:not(.js) .hero__cue { display: none; }

.hero__cap {
  position: absolute; left: var(--pad); bottom: 22px; z-index: 4;
  margin: 0; font: 400 13px/1.3 var(--mono); color: var(--dim);
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transition: opacity .35s ease;
}
.hero__cap::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.hero__cap.is-on { opacity: 1; }
.rm .hero__cap, html:not(.js) .hero__cap { display: none; }

/* ---------- page sections ---------- */

.sheet { position: relative; z-index: 5; background: var(--bg); }
/* the page slides up over the last of the fly-through, so the hero never ends on an empty screen */
.js:not(.rm) .sheet { margin-top: -30vh; margin-top: -30svh; }
.js:not(.rm) .sheet::before { content: ""; position: absolute; left: 0; right: 0; top: -96px; height: 96px; background: linear-gradient(rgba(255,255,255,0), var(--bg)); pointer-events: none; }
.page { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

.sec { padding: clamp(88px, 13vh, 150px) 0; }
.sec h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.032em; }
.sec__head { max-width: 40rem; }
.sec__intro { margin-top: 16px; font-size: 19px; }
.lead { font-size: clamp(20px, 1.7vw, 23px); line-height: 1.5; color: var(--ink); }
.link { color: var(--ink); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size .35s cubic-bezier(.2,.7,.2,1); padding-bottom: 2px; }
.link:hover, .link:focus-visible { background-size: 100% 1px; }

/* about: one honest photo, three sentences */
.sec--about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding-top: clamp(48px, 8vh, 96px); }
.about__ph { margin: 0; overflow: hidden; border-radius: 14px; background: var(--soft); aspect-ratio: 4 / 5; }
.about__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.about__text h2 { font-size: clamp(38px, 4.4vw, 60px); }
.about__text .lead { margin-top: 22px; }
.about__text p + p { margin-top: 16px; }
.hero__role a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* the company, as one quiet row: name, what it is, where to see it */
.co { margin-top: 24px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); transition: border-color .2s ease, background-color .2s ease; }
.co:hover { border-color: #141414; background: #fafafa; }
.co__name { font-weight: 600; font-size: 16px; }
.co__meta { font-size: 14px; color: var(--dim); }
.co__name { grid-column: 1; }
.co__meta { grid-column: 1; }
.co__url { grid-column: 2; grid-row: 1 / 3; font-size: 14px; font-weight: 500; white-space: nowrap; }
.chap a:not(.btn) { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.about__cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }

/* how I think: one pinned scene. Tiles scatter, gather, lock into a grid, and one steps out.
   The left column lists all five lines; the one matching the motion is black, the rest grey. */
.think { position: relative; }
.think__stage { height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.think__copy h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.032em; }
.think__sub { margin-top: 10px; font-size: 19px; color: var(--body); }
.think__lines { list-style: none; margin: 24px 0 0; padding: 0; }
.think__line { padding: 12px 0; border-top: 1px solid var(--rule); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); text-wrap: pretty; }
.think__line:last-child { border-bottom: 1px solid var(--rule); }
.js:not(.rm) .think__line { color: #a9a9a9; transition: color .35s ease; }
.js:not(.rm) .think__line.is-on { color: var(--ink); }
.think__field { position: relative; height: min(68vh, 560px); }
.think__field i { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 2px; background: #8d8c88; will-change: transform; }
.think__tag { position: absolute; left: 0; top: 0; font-size: 14px; line-height: 1.3; color: var(--ink); font-weight: 600; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.rm .think__stage, html:not(.js) .think__stage { height: auto; padding: 96px 0; }

/* what I've built: a dated log, with a rail that fills as you read */
.log { list-style: none; margin: 56px 0 0; padding: 0; position: relative; --rail: 11rem; }
.log::before, .log::after { content: ""; position: absolute; left: calc(var(--rail) - 1px); top: 10px; bottom: 0; width: 1px; background: var(--rule); }
.log::after { background: var(--accent); transform-origin: 50% 0; transform: scaleY(var(--fill, 0)); }
.log__item { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); padding: 0 0 56px; position: relative; }
.log__item::before { content: ""; position: absolute; left: calc(var(--rail) - 5px); top: 8px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1px solid #cfcec9; transition: background-color .3s ease, border-color .3s ease; z-index: 1; }
.log__item.is-past::before { background: var(--accent); border-color: var(--accent); }
.log__when { font-size: 15px; color: var(--dim); padding: 2px 28px 0 0; }
.log__body { padding-left: 36px; max-width: 44rem; }
.log__body h3 { font-size: clamp(22px, 2vw, 27px); line-height: 1.22; letter-spacing: -0.022em; }
.log__body p { margin-top: 10px; }
.log__item--next .log__when { color: var(--ink); font-weight: 600; }
.log__item--next .log__body { background: var(--soft); border-radius: 12px; padding: 24px 28px; margin-left: 36px; padding-left: 28px; }
.log__item--next .join { margin-top: 20px; }
.log__note { font-size: 15px; color: var(--dim); }
.log__body > * + .film, .log__body > * + .flow, .log__body > .flow + .join { margin-top: 22px; }
.log__body a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* how a system works, as motion: each step lights up in turn and the line between them fills */
.flow { list-style: none; margin: 22px 0 6px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; row-gap: 10px; }
.flow li { display: flex; align-items: center; font-size: 14px; line-height: 1.3; color: var(--ink); }
.flow li span { display: block; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
.flow li + li::before { content: ""; flex: none; width: 22px; height: 1px; margin: 0 4px; background: var(--rule) linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / var(--f, 0%) 100%; }
.flow li.is-past span { border-color: var(--ink); }
.flow li.is-on span { background: var(--ink); color: #fff; border-color: var(--ink); }

/* films: muted, looping, play only while on screen */
.film { margin: 22px 0 0; }
.film__frame { overflow: hidden; border-radius: 10px; background: #141414; }
.film video { display: block; width: 100%; height: 100%; object-fit: cover; }
.film figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--dim); }
.film--tall { max-width: 320px; }
.sec__intro--quiet { font-size: 16px; color: var(--dim); }
.log__cta { margin-top: 14px; }
.log__item--next + .log__item--next { margin-top: 0; }
/* "almost ready": one quiet line that opens into an email field */
.ask { margin-top: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ask summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding: 10px 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.ask summary::-webkit-details-marker { display: none; }
.ask summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.ask[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.ask summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.ask .join { padding: 4px 0 18px; }
.ask[open] .join { animation: ask-in .4s cubic-bezier(.2,.7,.2,1); }
@keyframes ask-in { from { opacity: 0; transform: translateY(-6px); } }
.nums { margin: 22px 0 6px; display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 28px; justify-content: start; }
.nums dd { margin: 0; order: -1; font-size: clamp(34px, 3.4vw, 46px); font-weight: 300; line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.nums div { display: flex; flex-direction: column; gap: 8px; }
.nums dt { font-size: 14px; color: var(--dim); max-width: 12em; line-height: 1.35; }

/* what I've built: short words on one side, the thing itself on the other, like the 2019 clip.
   Sides alternate down the page; on a phone the card follows the words. */
.bxs { margin-top: clamp(40px, 6vw, 72px); position: relative; width: 100vw; margin-left: calc(50% - 50vw); }
/* one project per screen. Each panel is full-bleed and white; as you scroll, the next one slides up over
   it like a card on a deck (pinned by GSAP on desktop, CSS sticky on touch screens; main.js) */
.bx { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding-inline: var(--pad);
  background: var(--bg); border-top: 1px solid var(--rule); border-radius: 28px 28px 0 0; box-shadow: 0 -26px 50px -38px rgba(20,20,20,.4); }
.bx--first { border-radius: 0; box-shadow: none; border-top: 0; }
/* the opening card: the section's title, centred and full screen, so the eight that follow make sense */
.sec--built { padding-top: 0; }
.sec--built .bxs { margin-top: 0; }
.bx--intro .bx__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bx--intro h2 { font-size: clamp(52px, 8vw, 132px); line-height: 0.98; letter-spacing: -0.045em; }
.bx__lede { margin-top: 24px; max-width: 38rem; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.45; color: var(--ink); text-wrap: balance; }
.bx__list { margin-top: 28px; max-width: 46rem; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.7; color: var(--dim); text-wrap: balance; }
.bx__cue { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; color: var(--dim); }
.bx__cue::after { content: ""; width: 1px; height: 48px; background: linear-gradient(var(--ink), transparent); animation: cue 1.8s cubic-bezier(.6,0,.4,1) infinite; transform-origin: 50% 0; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.bx-sticky .bx { position: sticky; }
.bx__in { width: 100%; max-width: min(1680px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 80px); align-items: center; padding: clamp(48px, 8vh, 96px) 0; transform-origin: 50% 0; }
/* the film takes the larger share of the screen, but never taller than the screen allows */
.bx .paper { width: min(100%, calc((100vh - 200px) * 16 / 9)); width: min(100%, calc((100svh - 200px) * 16 / 9)); }
.bx .paper--tall { width: min(100%, 440px, calc((100vh - 220px) * 0.8)); width: min(100%, 440px, calc((100svh - 220px) * 0.8)); }
.bx__when { margin-bottom: 14px; font-size: clamp(15px, 1.05vw, 19px); line-height: 1.3; color: var(--dim); }
.bx--flip .bx__text { order: 2; }
.bx--flip .bx__in { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.bx__text h3 { font-size: clamp(34px, 3.6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; }   /* each project is a full screen: a scene-sized title */
.bx__text > p { margin-top: 18px; font-size: clamp(19px, 1.45vw, 26px); line-height: 1.55; max-width: 31rem; color: #2f2e2b; }
.bx__cta { margin-top: 22px; font-size: 18px; }
.bx .nums { margin: 28px 0 0; grid-template-columns: repeat(2, minmax(0, auto)); gap: 40px; }
.bx .nums dd { font-size: clamp(40px, 3.8vw, 70px); }
.bx .nums dt { font-size: 15px; }
.bx .ask { margin-top: 26px; max-width: 31rem; }
.bx .ask summary { font-size: 18px; min-height: 54px; }

/* the card: a page from the same diary as the 2019 clip, taped down at a slight angle */
.paper { position: relative; margin: 0; justify-self: center; width: min(520px, 100%); padding: 12px 12px 14px; border-radius: 4px; transform: rotate(-2deg); transition: transform .5s cubic-bezier(.2,.7,.2,1);
  background-color: #fbf8f0;
  background-image: repeating-linear-gradient(transparent 0 23px, #ece6d7 23px 24px), linear-gradient(90deg, transparent 0 26px, #efd9d4 26px 27px, transparent 27px);
  box-shadow: 0 1px 2px rgba(20,20,20,.08), 0 16px 34px -18px rgba(20,20,20,.38); }
.bx--flip .paper { transform: rotate(1.8deg); }
.paper:hover, .bx--flip .paper:hover { transform: rotate(0deg); }
.paper::before { content: ""; position: absolute; top: -11px; left: 50%; width: 86px; height: 22px; margin-left: -43px; background: rgba(236,228,206,.9); transform: rotate(3deg); box-shadow: 0 1px 2px rgba(20,20,20,.08); }
.paper__frame { overflow: hidden; border-radius: 2px; background: #141414; }
.paper video { display: block; width: 100%; height: 100%; object-fit: cover; }
.paper figcaption { margin-top: 10px; padding-left: 20px; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.35; color: #5d584d; }
.paper--tall { width: min(300px, 100%); }
.paper--steps { width: min(440px, 100%); padding: 26px 22px 16px; }

/* the steps inside a card: a dot travels down the line, and the step it reaches turns black */
.steps { position: relative; list-style: none; margin: 0; padding: 0 0 0 30px; }
.steps::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 18px; width: 1px; background: #cfc8b6; }
.steps li { position: relative; padding: 9px 0; font-size: 17px; line-height: 1.35; color: #9b968a; transition: color .4s ease; }
.steps li::before { content: ""; position: absolute; left: -27px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-radius: 50%; background: #fbf8f0; border: 1px solid #bdb6a3; }
.steps li.is-past { color: #4a4740; }
.steps li.is-on { color: var(--ink); font-weight: 600; }
.steps__dot { position: absolute; left: 3px; top: 0; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(20,20,20,.08); transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .4s ease; }
.rm .steps__dot, html:not(.js) .steps__dot { display: none; }
.rm .steps li, html:not(.js) .steps li { color: var(--ink); }

.also { margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--rule); }
.also__h { font-size: 15px; font-weight: 600; color: var(--ink); }
.also ul { list-style: none; margin: 10px 0 0; padding: 0; }
.also li { padding: 6px 0; font-size: 16px; color: var(--body); }

/* newsletter */
.news { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.news__text .lead { margin-top: 18px; }
.news__text p + p { margin-top: 12px; color: var(--dim); }
.join__label { display: block; font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.join__row { display: flex; gap: 10px; }
.join input[type="email"] { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid #d6d5d0; border-radius: 8px; background: #fff; font: 400 17px/1 var(--sans); color: var(--ink); }
.join input::placeholder { color: #9a9994; }
.join input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.join button { flex: none; height: 52px; padding: 0 24px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: 500 16px/1 var(--sans); cursor: pointer; transition: background-color .2s ease, transform .1s ease-out; }
.join button:hover { background: #333; }
.join button:active { transform: scale(0.97); }
.small { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--dim); }
.small a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }

.reads__list { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.reads__list a { display: block; text-decoration: none; }
.reads__img { display: block; overflow: hidden; border-radius: 10px; background: var(--soft); aspect-ratio: 3 / 2; }
.reads__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.reads__list a:hover .reads__img img { transform: scale(1.04); }
.reads__t { display: block; margin-top: 14px; font-size: 18px; line-height: 1.35; font-weight: 600; color: var(--ink); text-wrap: balance; }
.reads__d { display: block; margin-top: 6px; font-size: 14px; color: var(--dim); }

/* story door: the 2019 clip sits beside the text */
/* the last section fills the screen and holds still while the footer slides over it */
.sec--teaser { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.sec--teaser > .teaser { width: 100%; transform-origin: 50% 30%; }
.teaser { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.teaser__text { display: block; }
.teaser__h { display: block; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.032em; font-weight: 600; color: var(--ink); text-wrap: balance; }
.teaser__p { display: block; margin-top: 16px; font-size: 19px; }
.teaser .link { display: inline-block; margin-top: 24px; }

/* the clip: small, tilted, taped onto a diary page. A quiet looping preview; one tap plays it with sound */
.clip { position: relative; margin: 0; padding: 12px 12px 14px; border-radius: 4px; transform: rotate(-2.5deg); transition: transform .5s cubic-bezier(.2,.7,.2,1);
  background-color: #fbf8f0;
  background-image: repeating-linear-gradient(transparent 0 23px, #e9e3d4 23px 24px), linear-gradient(90deg, transparent 0 26px, #efd9d4 26px 27px, transparent 27px);
  box-shadow: 0 1px 2px rgba(20,20,20,.08), 0 16px 34px -18px rgba(20,20,20,.38); }
.clip::before { content: ""; position: absolute; top: -11px; left: 50%; width: 86px; height: 22px; margin-left: -43px; background: rgba(236,228,206,.86); transform: rotate(3deg); box-shadow: 0 1px 2px rgba(20,20,20,.08); }
.clip:hover, .clip.is-playing { transform: rotate(-1deg); }
.clip__frame { position: relative; overflow: hidden; border-radius: 2px; background: #141414; aspect-ratio: 640 / 368; }
.clip video { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip__play { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font: 600 13px/1 var(--sans); cursor: pointer; transition: transform .15s ease-out, background-color .2s ease; }
.clip__play::after { content: ""; position: absolute; inset: -6px; }   /* 44px tap area, same look */
.clip__play:hover { background: #fff; }
.clip__play:active { transform: scale(0.96); }
.clip__icon { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.clip__icon::after { content: ""; position: absolute; left: 6.5px; top: 5px; border-style: solid; border-width: 4px 0 4px 6.5px; border-color: transparent transparent transparent #fff; }
.clip__time { font-weight: 400; color: var(--dim); font-variant-numeric: tabular-nums; }
.clip.is-playing .clip__play { opacity: 0; pointer-events: none; }
.clip figcaption { margin-top: 10px; padding-left: 20px; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.35; color: #5d584d; }
.teaser .clip { width: min(420px, 100%); justify-self: center; }
/* on the story page it sits beside the text, and the words flow around it */
.clip--story { float: right; width: min(300px, 46%); margin: 10px -2.5rem 18px 30px; }
.chap .pull { clear: both; }


/* shared by the story page */
.ph { margin: 0; }
.ph__frame { position: relative; overflow: hidden; background: var(--soft); border-radius: 10px; }
.ph__frame img { width: 100%; }
.ph figcaption { margin-top: 10px; font-size: 14px; color: var(--dim); }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; }
.ticks li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.55; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 7px; height: 7px; border-radius: 1px; background: var(--accent); }

/* ---------- story page (Hinglish long read) ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.story { max-width: calc(44rem + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.story__head { padding: clamp(120px, 18vh, 180px) 0 48px; }
.story__head h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.06; letter-spacing: -0.035em; }
.story__dek { margin-top: 18px; font-size: 20px; line-height: 1.6; }
.story__toc { margin: 36px 0 0; padding: 0; list-style: none; counter-reset: toc; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.story__toc li { counter-increment: toc; border-top: 1px solid var(--rule); }
.story__toc a { display: flex; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--ink); font-size: 16px; }
.story__toc a::before { content: counter(toc); min-width: 1.2em; color: var(--dim); }
.story__toc a:hover { text-decoration: underline; text-underline-offset: 4px; }
.chap { padding: 64px 0; border-top: 1px solid var(--rule); }
/* the page opens straight on the first chapter */
.story > .chap:first-of-type { border-top: 0; padding-top: clamp(104px, 16vh, 160px); }
/* story: a photo or film sits beside the words, on a diary card, not in the middle of them */
.side.paper { width: min(280px, 44%); padding: 10px 10px 12px; }
.side--right { float: right; margin: 10px -2.5rem 20px 32px; transform: rotate(2deg); }
.side--left { float: left; margin: 10px 36px 20px -1.5rem; transform: rotate(-2deg); }
.side.paper:hover { transform: rotate(0deg); }
.side .paper__frame img { display: block; width: 100%; height: auto; }
.side figcaption { padding-left: 14px; font-size: 14px; }
.chap::after { content: ""; display: block; clear: both; }
.chap .note { font-size: 14px; line-height: 1.55; color: var(--dim); }
.say--quote { margin: 26px 0 8px; }
.say--quote cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 14px; line-height: 1.4; color: var(--dim); }
.say--quote cite i { font-style: italic; }
/* a card beside the words starts below the heading, so its tape never touches the title */
.chap h2 + .side { margin-top: 30px; }
.fw__soon { margin-top: 18px; display: inline-block; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px !important; font-weight: 600; color: var(--ink); line-height: 1.2 !important; }
@media (max-width: 760px) {
  .side.paper, .side--left, .side--right { float: none; width: min(330px, 88%); margin: 24px auto 26px; }
}

/* the framework page */
.fw { min-height: 72vh; min-height: 72svh; }
.fw h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.035em; }
.fw .story__dek { margin-top: 20px; }
.fw__join { margin-top: 32px; max-width: 36rem; }
.chap__n { font: 500 13px/1 var(--mono); color: var(--accent); }
.chap h2 { margin-top: 14px; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; letter-spacing: -0.028em; }
.chap p { margin-top: 18px; font-size: 19px; line-height: 1.75; }
.chap h2 + p { margin-top: 22px; }
.chap mark { color: var(--ink); font-weight: 550; background: linear-gradient(#141414, #141414) no-repeat 0 100% / var(--m, 100%) 1.5px; padding-bottom: 1px; }
.js:not(.rm) .chap mark { --m: 0%; }
.say { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.4vw, 30px) !important; line-height: 1.35 !important; color: var(--ink); }
.pull { margin: 36px 0 8px; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.3; color: var(--ink); letter-spacing: -0.01em; }
.pull .w { opacity: 1; }
.chap__ph { margin: 36px 0 8px; }
.chap__ph--tall .ph__frame { max-width: 360px; }
.chap__ph--tall img { aspect-ratio: 3 / 4; object-fit: cover; }
.chap .ticks { margin-top: 22px; }
.story__end { padding: 72px 0 96px; border-top: 1px solid var(--rule); }
.story__end h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; letter-spacing: -0.025em; }
.story__end > p { margin-top: 12px; font-size: 19px; }
.story__end .join { margin-top: 28px; max-width: 36rem; }
.top__nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
@media (min-width: 1100px) { .chap__ph:not(.chap__ph--tall) { margin-left: -8rem; margin-right: -8rem; } }
@media (max-width: 760px) {
  .story__toc { grid-template-columns: 1fr; }
  .chap p { font-size: 18px; }
}

/* ---------- footer: black, the one dark band on a white site ---------- */

.foot { background: #141414; color: #d6d6d6; padding: 80px var(--pad) 0; border-radius: 28px 28px 0 0; overflow: hidden; position: relative; z-index: 6; }
.sheet .page > .sec:last-child { padding-bottom: clamp(64px, 9vh, 104px); }
.foot__grid, .fine, .foot__end { max-width: var(--max); margin-left: auto; margin-right: auto; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.foot__sig { font: 600 22px/1.2 var(--sans); color: #fff; letter-spacing: -0.02em; }
.foot__line { margin-top: 8px; font-size: 15px; color: #9c9c9c; }
.foot__links { list-style: none; margin: 0; padding: 0; }
.foot__links li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; align-items: center; border-top: 1px solid rgba(255,255,255,.14); }
.foot__links li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.foot__links .lab { font-size: 14px; color: #8f8f8f; }
.foot__links a { display: block; padding: 13px 0; text-decoration: none; color: #fff; font-size: 16px; overflow-wrap: anywhere; }
.foot__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot :focus-visible { outline-color: #fff; }
.fine { margin-top: 48px; font-size: 13px; line-height: 1.6; color: #9a9a9a; }
.foot__end { margin-top: 24px; display: flex; justify-content: space-between; font-size: 13px; color: #8f8f8f; }
/* the page signs off with the name, set large and quiet */
.foot__mark { margin: 48px auto 0; padding-bottom: calc(clamp(20px, 3vw, 40px) + env(safe-area-inset-bottom)); max-width: var(--max); font-size: clamp(30px, 10.6vw, 158px); line-height: 0.95; font-weight: 650; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.28); white-space: nowrap; user-select: none; }

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .teaser { grid-template-columns: 1fr; }
  .bx__in, .bx--flip .bx__in { grid-template-columns: 1fr; gap: 28px; }
  .bx--flip .bx__text { order: 0; }
  .sec--about, .news, .teaser, .foot__grid { grid-template-columns: 1fr; }
  .about__ph { max-width: 460px; }
  .teaser__ph { max-width: 320px; }
  .think__stage { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 20px; }
  .think__field { height: 34vh; height: 34svh; order: -1; }
  .think__lines { margin-top: 14px; }
  .think__line { padding: 8px 0; font-size: 16px; }
  .think__sub { font-size: 16px; }
  .log { --rail: 0px; }
  .log::before, .log::after { left: 4px; }
  .log__item { grid-template-columns: 1fr; padding-left: 28px; }
  .log__item::before { left: 0; }
  .log__when { padding: 0 0 6px; }
  .log__body { padding-left: 0; }
  .log__item--next .log__body { margin-left: 0; padding: 20px; }
  .nums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .co { grid-template-columns: 1fr; }
  .co__url { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .clip--story { float: none; width: 82%; margin: 28px auto 8px; }
  .top { height: 56px; }
  .top__mark { font-size: 15px; }
  .top__nav { gap: 14px; }
  .top__nav a { font-size: 14px; }

  .hero__stage { min-height: 0; }
  /* main.js sizes the face to the room the words leave (fitFace); this is the no-script start */
  .hero__still { right: auto; left: 50%; top: 64px; bottom: auto; transform: translateX(-50%); width: min(92vw, 44svh); }
  .hero__copy { top: auto; bottom: calc(24px + env(safe-area-inset-bottom)); transform: none; width: auto; right: var(--pad); }
  .hero__role { font-size: 14px; }
  .name { font-size: clamp(34px, 9.4vw, 44px); margin-top: 8px; }
  .hero__sub { font-size: 16.5px; margin-top: 12px; }
  .hero__cta { margin-top: 18px; }
  .hero__cta .btn { flex: 1; }
  .hero__loc, .hero__cue { display: none; }
  .hero__cap { bottom: auto; top: calc(64px + min(92vw, 48svh) + 10px); }

  .nums { gap: 12px; }
  .bx { border-radius: 22px 22px 0 0; }
  .bx__in { gap: 24px; padding: 44px 0 48px; }
  .bx__text h3 { font-size: clamp(28px, 8vw, 36px); }
  .bx__when { font-size: 14px; margin-bottom: 8px; }
  .bx .paper { width: 100%; }
  .bx .paper--tall { width: min(100%, 320px); }
  .bx__text > p { font-size: 18px; margin-top: 12px; }
  .bx .nums { gap: 24px; }
  .bx .nums dd { font-size: clamp(30px, 8.6vw, 38px); }
  .bx .nums dt { font-size: 14px; }
  .bx .ask summary { font-size: 17px; }
  .paper { transform: rotate(-1.2deg); }
  .bx--flip .paper { transform: rotate(1.2deg); }
  .paper--steps { padding: 22px 16px 14px; }
  .steps li { font-size: 16px; }
  .flow { flex-direction: column; align-items: flex-start; row-gap: 0; }
  .flow li { flex-direction: column; align-items: flex-start; }
  .flow li + li::before { width: 1px; height: 14px; margin: 3px 0 3px 18px; background-size: 100% var(--f, 0%); }
  .film--tall { max-width: 260px; }
  .nums dd { font-size: clamp(22px, 6.6vw, 30px); }
  .think__stage { padding-top: 48px; }
  .think__field { height: 44vh; height: 44svh; }
  .sec { padding: clamp(72px, 11vh, 110px) 0; }
  .reads__list { grid-template-columns: 1fr; gap: 18px; }
  .reads__list a { display: grid; grid-template-columns: 112px 1fr; column-gap: 16px; align-items: start; }
  .reads__img { grid-row: 1 / 3; }
  .reads__t { margin-top: 0; font-size: 17px; }
  .join__row { flex-direction: column; }
  .join input[type="email"] { flex: none; }
  .join button { width: 100%; }
  .foot__links li { grid-template-columns: 5.5rem 1fr; }
}

/* tablets held upright: the phone's arrangement, bigger. Face on top, words below (fitFace sizes the face) */
@media (min-width: 761px) and (max-aspect-ratio: 20/23) {
  .hero__still { right: auto; left: 50%; top: 84px; bottom: auto; transform: translateX(-50%); width: min(80vw, 50svh); }
  .hero__copy { top: auto; bottom: calc(48px + env(safe-area-inset-bottom)); transform: none; width: min(40rem, calc(100% - 2 * var(--pad))); }
  .hero__cue { display: none; }
}

/* short phones (iPhone SE, small Androids): the words take less room so the face still fits */
@media (max-width: 760px) and (max-height: 700px) {
  .name { font-size: 34px; }
  .hero__role { font-size: 13px; }
  .hero__sub { font-size: 15.5px; line-height: 1.5; margin-top: 8px; }
  .hero__cta { margin-top: 14px; }
  .hero__copy { bottom: 16px; }
  .think__field { height: 38vh; height: 38svh; }
}

/* How I think on a phone: one line at a time, large enough to read, swapping as the tiles move.
   The rule above it fills in black as you go, so you can see how far through you are. */
@media (max-width: 760px), (max-height: 500px) {
  .js:not(.rm) .think__lines { position: relative; display: grid; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
  .js:not(.rm) .think__lines::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--k, 0.2)); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
  .js:not(.rm) .think__line { grid-area: 1 / 1; padding: 0; border: 0; font-size: clamp(19px, 5.4vw, 22px); line-height: 1.4; color: var(--ink); opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
  .js:not(.rm) .think__line:last-child { border-bottom: 0; }
  .js:not(.rm) .think__line.is-on { opacity: 1; transform: none; }
}

/* phones on their side and other short, wide screens: face right, words left, one screen tall */
@media (max-height: 500px) and (orientation: landscape) {
  .top { height: 52px; }
  .hero__stage { min-height: 0; }
  .hero__still { left: auto; right: 3vw; top: auto; bottom: 0; transform: none; width: min(84svh, 42vw); }
  .hero__copy { top: calc(50% + 26px); bottom: auto; right: auto; transform: translateY(-50%); width: min(26rem, 50vw); }
  .hero__role { font-size: 13px; }
  .name { font-size: clamp(28px, 8svh, 38px); margin-top: 6px; }
  .hero__sub { font-size: 15px; line-height: 1.45; margin-top: 8px; }
  .hero__cta { margin-top: 14px; }
  .hero__cta .btn { flex: none; min-height: 44px; }
  .hero__loc, .hero__cue { display: none; }
  .think__stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; gap: 28px; padding-top: 52px; }
  .think__field { order: 0; height: 72vh; height: 72svh; }
  .think__copy h2 { font-size: 28px; }
  .about__ph { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* page-to-page: one reveal. The new page opens from the click point over the old one, which
   sinks back a touch for depth. Chrome and Safari support cross-document view transitions;
   others just navigate. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: 0.75s; }
::view-transition-old(root) { animation: vt-sink 0.75s cubic-bezier(0.3, 0, 0.2, 1) both; }
::view-transition-new(root) { animation: vt-open 0.75s cubic-bezier(0.3, 0, 0.2, 1) both; }
@keyframes vt-sink { to { transform: scale(0.965); filter: brightness(0.92); } }
@keyframes vt-open {
  from { clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to { clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 50%)); }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
