/* Homepage. Measurements follow the Framer site: desktop from 1200px, tablet 768–1199px,
   phone below 768px. */

.page { position: relative; background: var(--paper); overflow: clip; }

/* entrance animations: hidden until js/home.js animates them in (no JS: everything shows) */
.js [data-appear]:not(.is-in),
.js .word:not(.is-in) { opacity: 0; }
.vt-in .works[data-appear]:not(.is-in) { opacity: 1; } /* back from a story: the card is already there */
.hero .is-away { opacity: 0; } /* the hero's words while Cyrus flies home from talk mode (js/talk/talk-mode.js) */

/* ---------- header ---------- */
.site-header {
  position: absolute; z-index: 10; top: 0; left: 0; right: 0; view-transition-name: site-header;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--gutter);
}
.logo { font: 600 38px/1.2 var(--sans); letter-spacing: -0.1em; color: var(--ink); white-space: pre; }
.nav { display: flex; align-items: center; gap: 16px; }
.nav a { font: 400 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink); white-space: pre; }

/* ---------- gradients (js/lib/liquid-gradient.js) ---------- */
.gradient { position: absolute; inset: 0; overflow: hidden; background: center / cover no-repeat; }
.gradient-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.4s linear; }
.gradient.is-live .gradient-canvas { opacity: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 0; overflow: clip;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  height: 100vh; min-height: 780px; padding: 24px; background: var(--paper);
}
.pill { position: absolute; width: 320px; height: 480px; left: calc(50% - 160px); top: calc(50% - 240px); border-radius: 999px; }
.pill-base { z-index: 0; }
.pill-base .gradient { border-radius: 999px; }
/* a plain rectangle in Framer too: color-dodge leaves the white around the pill untouched */
.pill-light { z-index: 5; mix-blend-mode: color-dodge; pointer-events: none; }

.hero-bust { position: relative; z-index: 1; width: 400px; aspect-ratio: 1; }
/* the whole pill opens talk mode: the bust's square box (and the name and subtitle in it) lets clicks
   through to the pill, all but the bust itself */
.hero-bust { pointer-events: none; }
.hero-bust canvas { pointer-events: auto; }
.pill-base { cursor: pointer; }
/* the ring of words round the pill (js/hero/talk-ring.js): over the bust's box, under the name; only
   the band along its line takes a click */
.hero-ring { z-index: 2; overflow: visible; pointer-events: none; }
.ring-words { font: 400 15px var(--sans); letter-spacing: -0.02em; }
.ring-clone { font: 400 12px var(--sans); letter-spacing: -0.01em; }
.ring-ink { stop-color: var(--ink); }
.ring-hit { fill: none; stroke: transparent; stroke-width: 44; pointer-events: stroke; cursor: pointer; }
/* Cyrus stands where the bust photo stood: the same size and place in the 400px square */
.hero-bust .cyrus { position: absolute; left: 25.22%; top: 4.79%; width: 49.55%; }

/* centred on the box even when wider than it: a zero-width column at the middle, overflowing evenly */
.hero-name, .hero-subtitle, .bye-title {
  position: absolute; left: 50%; width: 0; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center;
}
.hero-name {
  z-index: 10; bottom: -120px;
  font: 400 160px/1.2 var(--serif); letter-spacing: -0.06em; color: var(--ink);
}
.hero-subtitle { z-index: 1; bottom: -168px; text-align: center; font: 300 16px/1.2 var(--sans); color: var(--black); }
.hero-explore { position: absolute; z-index: 8; right: var(--gutter); top: min(calc(100% - 72px), calc(100svh - 72px)); display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 48px; min-width: 48px; padding: 0 16px; border: 1px solid #888; border-radius: 999px; background: var(--paper); font: 400 14px/1.4 var(--sans); color: var(--ink); }
.hero-explore svg { flex: none; }
@media (max-width: 1199.98px) {
  .hero-explore { width: 48px; padding: 0; }
  .hero-explore-label { display: none; }
}
.hero-explore:hover { border-color: var(--ink); }
.hero-explore:focus-visible, .academic-project-link:focus-visible { outline: 2px solid #2e9479; outline-offset: 5px; }
.academic-project-link { display: inline-block; }
.academic-project-link:hover { opacity: 0.7; }
.hero-at {
  position: absolute; z-index: 1; right: 32px; bottom: 32px; white-space: pre;
  font: 300 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink);
}

/* Cyrus opens talk mode: by keyboard too, so he shows where the focus is */
.hero-bust .cyrus canvas:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 4px; }

/* the talk wave: three bars that breathe (it marks talk mode's question box) */
.talk-wave { display: inline-flex; align-items: center; gap: 2px; height: 12px; }
.talk-wave i { width: 2px; height: 100%; border-radius: 1px; background: rgb(119, 217, 181); animation: talk-wave 1.4s ease-in-out infinite; transform-origin: center; }
.talk-wave i:nth-child(1) { animation-delay: -0.3s; }
.talk-wave i:nth-child(2) { animation-delay: -0.9s; }
.talk-wave i:nth-child(3) { animation-delay: -0.5s; }
@keyframes talk-wave { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .talk-wave i { animation: none; transform: scaleY(0.7); } }

/* ---------- about ---------- */
.about {
  position: relative; z-index: 0; overflow: clip;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  height: 100vh; padding: 32px;
  margin-bottom: 40vh; /* the line gets the screen to itself before Selected Works comes up */
}
/* the whole line in the serif, the phrases in its italic: one voice, set large, in three balanced lines */
.focus-text {
  width: min(100%, 12.5em); color: var(--black); text-wrap: balance;
  font: 400 clamp(44px, 5vw, 96px)/1.1 var(--serif); letter-spacing: -0.025em; word-spacing: 0.06em;
}
.focus-text em { font-style: italic; letter-spacing: -0.02em; }
.about-context { max-width: 40rem; margin-top: 28px; font: 300 17px/1.6 var(--sans); color: var(--ink); text-wrap: balance; }
/* words stay inline here, so a phrase, its star and the punctuation after never part at a line end */
.about .word { display: inline; transition: opacity 0.4s ease; }
/* hovering a phrase fades everything else back */
.about .focus-text.is-focusing .word { opacity: 0.14; }
.about .focus-text.is-focusing .glimpse.is-active .word { opacity: 1; }

/* each phrase has its colour (--c, drawn from its card) and a * right after it */
.about .glimpse[data-glimpse="analytics"] { --c: #d0801a; }
.about .glimpse[data-glimpse="pipelines"] { --c: #6a3fe0; }
.about .glimpse[data-glimpse="ml"] { --c: #2b72d9; }
.focus-text .glimpse { display: inline-block; white-space: nowrap; color: var(--c); outline: none; cursor: default; }
.glimpse-punctuation { color: var(--black); }
.glimpse-star { font: 400 0.5em/0 var(--sans); vertical-align: 0.9em; margin: 0 -0.2em 0 0.04em; } /* a comma after tucks in under it */


/* the glimpse cards (js/about/glimpse-cards.js): float up beside the cursor over a hovered phrase */
.glimpse-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.glimpse-card {
  position: absolute; left: 0; top: 0; overflow: hidden; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 18px 40px -12px rgba(0, 0, 0, 0.3);
  opacity: 0; scale: 0.86; transform-origin: 30% 100%;
  transition: opacity 0.2s ease, scale 0.45s cubic-bezier(0.2, 1.3, 0.35, 1);
  will-change: translate, rotate;
}
.glimpse-card.is-open { opacity: 1; scale: 1; }
.glimpse-card > :not(.gradient) { position: relative; z-index: 1; }

.glimpse-shot { width: 250px; padding: 20px 20px 0; background: center / cover no-repeat; display: flex; flex-direction: column; align-items: center; }
.glimpse-shot img { display: block; height: 230px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2)); }
.glimpse-caption {
  align-self: stretch; margin: 18px -20px 0; padding: 11px 16px 12px; background: var(--paper);
  font: 300 14px/1.25 var(--sans); letter-spacing: -0.03em; color: var(--ink);
}

.glimpse-stat { width: 250px; padding: 18px 20px 20px; background: var(--paper); }
.glimpse-big { font: 400 84px/0.9 var(--serif); letter-spacing: -0.05em; color: var(--ink); }
.glimpse-note { margin-top: 10px; font: 300 14px/1.3 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.glimpse-words { display: flex; flex-direction: column; font: 400 54px/1 var(--serif); letter-spacing: -0.05em; color: var(--ink); }
.glimpse-words s { opacity: 0.3; text-decoration-thickness: 3px; }

/* ---------- selected works ---------- */
.works { position: relative; display: flex; flex-direction: column; gap: 240px; padding: 180px 32px 0; }
.works-title {
  position: absolute; z-index: 0; left: 32px; top: 30px; white-space: pre;
  font: 400 160px/1.2 var(--serif); letter-spacing: -0.06em; color: var(--ink);
}
.works-row { position: relative; display: flex; gap: 32px; justify-content: center; align-items: center; overflow: clip; }
.work { position: relative; flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; overflow: clip; }
.work-media { position: relative; width: 100%; min-height: 680px; display: flex; justify-content: center; align-items: center; }
.work-media > .gradient { z-index: 0; }
.work-title { position: relative; z-index: 1; white-space: pre; font: 700 32px/1.1 var(--serif); color: var(--ink); }
.work-desc { position: relative; z-index: 1; white-space: pre; font: 300 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink); }

.bxgy-phone { position: relative; z-index: 1; width: 235px; height: auto; filter: hue-rotate(113deg); }
.cart-pilot-drawer { position: relative; z-index: 1; width: 281px; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.25)); }
.cart-pilot-drawer > img:first-child { width: 100%; height: auto; }
.cart-pilot-icon { position: absolute; z-index: -1; top: 0; right: -103px; width: 86px; height: auto; border-radius: 10px; }
.work-media-wide { gap: 32px; }
.ruflow-mobile, .ruflow-desktop {
  position: relative; z-index: 1; flex: none; height: auto; border-radius: 16px;
  box-shadow: 0 0.6px 0.84px -0.67px rgba(0, 0, 0, 0.1), 0 2.29px 3.2px -1.33px rgba(0, 0, 0, 0.11), 0 10px 14px -2px rgba(0, 0, 0, 0.15);
}
.ruflow-mobile { width: 222px; }
.ruflow-desktop { width: 665px; }
/* the Health Check: its Edit Bundle screen on the admin's surface, centred on the story's green; opening
   it closes a curtain in that green (js/lib/curtain.js) */
.health-shot {
  position: relative; z-index: 1; flex: none; width: min(860px, 86%); padding: 2.2%; border-radius: 14px; background: #f1f1f1;
  box-shadow: 0 40px 80px -36px rgba(8, 48, 32, 0.6), 0 2px 10px rgba(8, 48, 32, 0.12);
}
.health-shot img { display: block; width: 100%; height: auto; }

/* the curtain a card closes on its way into its story */
.curtain { position: fixed; z-index: 100; inset: 0; pointer-events: none; }

/* ---------- career ---------- */
.career { position: relative; padding: 240px var(--gutter) 200px; }
.career-title {
  margin: 0 0 48px; white-space: nowrap;
  font: 400 160px/1 var(--serif); letter-spacing: -0.06em; color: var(--ink);
}
.cx-rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid rgba(51, 51, 51, 0.2); }
.cx-row { border-top: 1px solid rgba(51, 51, 51, 0.2); transition: opacity 0.4s ease; }
.js .cx-row:not(.is-in) { opacity: 0; }
.cx-rows.is-focusing .cx-row:not(.is-open) { opacity: 0.28; }
.cx-line, .cx-more-inner {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 240px 150px 24px; column-gap: 24px;
}
.cx-line {
  width: 100%; align-items: baseline; padding: 28px 0; margin: 0;
  background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.cx-line:focus-visible { outline: 2px solid var(--c); outline-offset: 4px; }
.cx-years, .cx-company { font: 300 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink); }
.cx-years { font-variant-numeric: tabular-nums; }
.cx-role { font: 400 48px/1.05 var(--serif); letter-spacing: -0.04em; color: var(--ink); transition: color 0.3s ease; }
.cx-metric { font: 400 40px/1 var(--serif); letter-spacing: -0.04em; color: var(--ink); text-align: right; transition: opacity 0.3s ease; }
.cx-metric.cx-tag { font: 300 16px/1.3 var(--sans); letter-spacing: -0.02em; }
.cx-row.is-open .cx-role { color: var(--c); }
.cx-row.is-open .cx-metric { opacity: 0; } /* the open row shows it large */
.cx-plus { position: relative; align-self: center; width: 16px; height: 16px; justify-self: end; transition: transform 0.45s cubic-bezier(0.2, 1.3, 0.4, 1); }
.cx-plus::before, .cx-plus::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); }
.cx-plus::after { transform: rotate(90deg); }
.cx-row.is-open .cx-plus { transform: rotate(45deg); }
.cx-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cx-row.is-open .cx-more { grid-template-rows: 1fr; }
.cx-more-inner { min-height: 0; overflow: hidden; }
.cx-more-inner > * { padding-bottom: 36px; }
.cx-span { font: 300 15px/1.3 var(--sans); letter-spacing: -0.03em; color: var(--ink); opacity: 0.7; }
.cx-blurb { max-width: 46ch; font: 300 20px/1.35 var(--sans); letter-spacing: -0.02em; color: var(--black); }
.cx-story ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.cx-story li { font: 300 16px/1.4 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.cx-story li::before { content: '—'; margin-right: 10px; color: var(--c); }
.cx-detail-title { margin: 24px 0 8px; font: 400 24px/1.2 var(--serif); color: var(--c); }
.cx-story > p:not(.cx-blurb) { font: 300 17px/1.5 var(--sans); color: var(--ink); }
.education { padding-bottom: 0; }
.education .cx-figure b { font-size: clamp(36px, 4vw, 56px); }
.cx-figure { grid-column: 3 / -1; }
.cx-figure b { display: block; font: 400 72px/0.9 var(--serif); letter-spacing: -0.05em; color: var(--c); }
.cx-figure { font: 300 15px/1.35 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.cx-figure b { margin-bottom: 10px; }
.cx-figure b { font-size: clamp(40px, 4vw, 64px); overflow-wrap: anywhere; }
.cx-education {
  display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 28px 0 0;
  font: 300 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink); opacity: 0.7;
}
.cx-education p { flex: 1 1 320px; line-height: 1.5; letter-spacing: -0.02em; }
.cx-education p span { display: block; margin-bottom: 8px; }

/* ---------- personal contact ---------- */
.contact-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); align-items: center; gap: 64px; padding: 100px var(--gutter) 120px; border-top: 1px solid #ddd; }
.contact-eyebrow { margin-bottom: 28px; font: 400 14px/1.5 var(--sans); color: #595959; }
.contact-copy h2 { margin-bottom: 36px; font: 400 clamp(76px, 11vw, 160px)/.9 var(--serif); letter-spacing: -.05em; color: var(--ink); }
.contact-email { display: inline-block; padding: 10px 0; font: 300 clamp(18px, 2.4vw, 32px)/1.5 var(--sans); overflow-wrap: anywhere; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 20px; }
.contact-links a { display: inline-flex; align-items: center; min-height: 44px; font: 400 18px/1.5 var(--sans); }
.contact-links a:hover, .contact-email:hover { opacity: 0.7; }
.contact-section a:focus-visible { outline: 2px solid #2e9479; outline-offset: 6px; }
.contact-art { position: relative; width: 100%; aspect-ratio: 2 / 3; }
.contact-pill { position: absolute; inset: 0; border-radius: 999px; background: linear-gradient(150deg, #c8f0df, #6dd6bd 65%, #d8eee8); }
.contact-art img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767.98px) {
  .contact-section { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 64px 16px 72px; }
  .contact-copy h2 { font-size: clamp(72px, 19vw, 112px); }
  .contact-art { width: min(240px, 75%); justify-self: center; }
}

/* ---------- archived template contact ---------- */
.bye {
  position: relative; z-index: 0; overflow: clip;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  height: 100vh; padding: 24px; background: var(--paper);
}
.bye-links { position: absolute; left: 32px; right: 32px; bottom: 32px; display: flex; justify-content: center; align-items: flex-end; gap: 32px; }
.bye-links a { white-space: pre; font: 300 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink); }
.bye-frame { position: absolute; z-index: 0; width: 320px; height: 480px; left: calc(50% - 160px); top: calc(50% - 240px); }
.bye-portrait {
  position: relative; width: 249px; height: 374px;
  filter: contrast(1.24) grayscale(1); border-radius: 0 0 999px 999px;
  transform: translateY(260px) scale(2.1); /* js/home.js eases it to rest as the section scrolls in */
}
.bye-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.bye-title {
  z-index: 10; bottom: -110px;
  mix-blend-mode: difference; text-align: center;
  font: 400 160px/0.9 var(--serif); letter-spacing: -0.06em; color: var(--ink);
}

/* ---------- tablet ---------- */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .pill, .bye-frame { width: 256px; height: 384px; left: calc(50% - 128px); top: calc(50% - 192px); }
  .hero { min-height: 640px; }
  .hero-bust { width: 320px; }
  .hero-subtitle { bottom: -132px; }
  .hero-name { bottom: -87px; font-size: 120px; }

  .about { height: 90vh; }

  .works { gap: 120px; }
  .works-title { top: 69px; font-size: 120px; }
  .works-row:first-of-type { flex-direction: column; gap: 120px; }
  .works-row:first-of-type .work { flex: none; width: 100%; }
  .bxgy-phone { width: 240px; }
  .work-media-wide { justify-content: flex-start; padding-left: 64px; }

  .career { padding-top: 160px; }
  .career-title { font-size: 120px; }
  .cx-line, .cx-more-inner { grid-template-columns: 120px minmax(0, 1fr) 150px 80px 20px; column-gap: 18px; }
  .cx-role { font-size: 36px; }
  .cx-metric { font-size: 32px; }

  .bye-portrait { width: 196px; height: 294px; }
  .bye-title { bottom: -86px; font-size: 120px; left: 49%; }
}

/* ---------- phone ---------- */
@media (max-width: 767.98px) {
  .site-header { flex-wrap: wrap; gap: 8px 16px; }
  .logo { font-size: 26px; }
  .nav a { display: flex; align-items: center; min-height: 44px; font-size: 16px; }
  .nav-works { display: none; }

  .hero { padding: 16px; min-height: 600px; }
  .pill, .bye-frame { width: 200px; height: 300px; left: calc(50% - 100px); top: calc(50% - 150px); }
  .hero-bust { width: 240px; }
  .hero-subtitle { bottom: -106px; font-size: 14px; }
  .hero-name { bottom: -67px; font-size: 90px; }
  .ring-words { font-size: 13px; }
  .ring-clone { font-size: 11px; }
  .hero-at { display: none; }
  .hero-explore { top: auto; bottom: 16px; }

  .about { padding: 16px; }
  .focus-text { font-size: clamp(28px, 8.5vw, 40px); }

  .works { gap: 120px; padding: 230px 16px 0; }
  .works-title { left: 16px; top: 10px; font-size: 120px; line-height: 1; white-space: normal; width: min-content; }
  .works-row:first-of-type { flex-direction: column; gap: 120px; }
  .works-row .work { flex: none; width: 100%; }
  .work-media { height: 70vh; padding: 16px; }
  .work-title { font-size: 24px; }
  .work-title, .work-desc { white-space: pre-wrap; width: 100%; overflow-wrap: break-word; }
  .bxgy-phone { width: 210px; }
  .cart-pilot-icon { right: 0; top: -70px; width: 56px; }
  .work-media-wide { justify-content: flex-start; padding: 0 0 0 64px; }
  .health-shot { width: 100%; padding: 3%; border-radius: 10px; }

  .career { padding: 120px 16px 120px; }
  .career-title { font-size: 96px; margin-bottom: 28px; }
  .cx-line { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 22px 0; }
  .cx-years { grid-column: 1 / -1; font-size: 14px; }
  .cx-role { grid-row: 2; font-size: 30px; }
  .cx-metric { grid-row: 2; grid-column: 2; font-size: 28px; }
  .cx-company { grid-row: 3; font-size: 15px; }
  .cx-plus { display: none; }
  .education .cx-line { grid-template-columns: minmax(0, 1fr) 20px; }
  .education .cx-role { grid-column: 1; }
  .education .cx-company { grid-column: 1; }
  .education .cx-tag { display: none; }
  .education .cx-plus { display: block; grid-column: 2; grid-row: 2; }
  .cx-more-inner { grid-template-columns: minmax(0, 1fr); }
  .cx-span { display: none; }
  .cx-more-inner > .cx-story { padding-bottom: 20px; }
  .cx-figure { grid-column: auto; }
  .cx-figure b { font-size: 56px; }
  .cx-blurb { font-size: 17px; }
  .cx-education { font-size: 15px; }

  .bye { padding: 16px; }
  .bye-portrait { width: 156px; height: auto; aspect-ratio: 0.6658; }
  .bye-title { bottom: -70px; font-size: 100px; left: 49%; }
}

/* Keep a separate strip below the introduction on shorter phones too. */
@media (max-width: 767.98px) and (max-height: 650px) {
  .hero { min-height: 560px; }
  .hero-bust { width: 220px; }
  .pill { width: 180px; height: 270px; left: calc(50% - 90px); top: calc(50% - 135px); }
  .hero-name { font-size: 84px; bottom: -62px; }
  .hero-subtitle { font-size: 13px; bottom: -102px; }
}
