/* ==========================================================================
   Alejandra Anderson — homepage
   Layout unit --u is 1% of a 1958×1319 design frame, fitted to the viewport,
   so the hero composition keeps its proportions on any desktop screen.
   ========================================================================== */

:root {
  --ink: #ffffff;
  --ink-muted: rgba(214, 208, 255, 0.72);
  --night: #120f3d;
  --line: rgba(255, 255, 255, 0.7);

  --display: "Questrial", ui-sans-serif, system-ui, sans-serif;
  --text: "Zen Kaku Gothic New", ui-sans-serif, system-ui, sans-serif;

  --u: min(1vw, 1.4845vh);

  /* Typography rhythm, shared by every page (legibility pass, Oct 2026) */
  --lead-body: 1.8;         /* paragraphs (was 1.75) */
  --lead-small: 1.68;       /* captions, notes, small supporting text (was 1.6) */
  --track-body: 0.025em;    /* reading text: letters never touch, words stay whole (was -0.005em) */
  --track-display: 0em;     /* giant title words (was -0.02em) */
  --track-head: 0.015em;    /* section titles (was -0.01em) */
  --track-lead: 0.02em;     /* subtitles, takeaways, quotes and other large display lines (was 0) */
  --track-card: 0.025em;    /* card and sub-section titles (was 0) */
  --track-ui: 0.025em;      /* buttons, links, tags, chips and small display text */
  --track-label: 0.24em;    /* small uppercase labels and numbers (was 0.2em) */

  /* Glass cards: one surface for every content card (testimonials, tiles, personas, prototype,
     Other work projects, contact form). A light sheen from the top left, frosted, no outline. */
  --glass-base: rgba(21, 23, 30, 0.92); /* nearly opaque: the scene behind no longer tints the card */
  --glass-sheen: linear-gradient(145deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 100%); /* one corner to the other */
  --glass-blur: blur(24px) saturate(1.25);
  --glass-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  --glass-shadow-sm: 0 16px 40px rgba(0, 0, 0, 0.28); /* small cards (tiles) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
/* The page stops at its ends. On iPhones a page can otherwise be dragged past its last line,
   into an empty band of the page colour, before it springs back. */
html,
body { overscroll-behavior-y: none; }

body {
  font-size: 17px; /* reading size for anything without its own (was the browser default, 16px) */
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }

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

/* ---------- One control system for the whole site ----------
   Buttons (do something) are rounded rectangles, like the homepage's "Ask about my work".
   Choice chips (pick an option) are pills with a radio dot.
   Tags (information only) are small, flat and never clickable.
   Icon buttons (scroll cues) are circles (.cue-ring). */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 16px;
  line-height: 1;
  letter-spacing: var(--track-ui);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); /* never opacity or transform: the intro animations own those */
}
.btn--primary { background: #fff; color: #0c0b1e; }
.btn--primary:hover { background: #f4f4f4; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38); } /* a dark shadow under the button, no coloured glow */
.btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.btn--secondary:hover { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px #fff; }
.btn--sm { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 15px; }
.btn--lg {
  height: clamp(52px, 3.8vw, 64px);
  padding: 0 clamp(24px, 2vw, 34px);
  border-radius: clamp(14px, 1.1vw, 18px);
  font-size: clamp(17px, 1.3vw, 22px);
}
.btn[disabled] { opacity: 0.6; cursor: default; box-shadow: none; }

.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: var(--track-ui);
  color: rgba(255, 255, 255, 0.88);
}

/* Read by screen readers, not shown */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Hide animated content until the intro timeline takes over (JS only) */
.js body.is-loading .nav,
.js body.is-loading .hero { visibility: hidden; }

/* ---------- Background ---------- */

#bg,
.bg-fallback {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.bg-fallback { display: none; }

.no-gl #bg { display: none; }
.no-gl .bg-fallback { display: block; }

.bg-fallback::before,
.bg-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}
.bg-fallback::before { background-image: var(--bg-a, url("../assets/bg/bg-hero.webp")); }
.bg-fallback::after {
  background-image: var(--bg-b, none);
  opacity: var(--p, 0);
}

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

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, calc(var(--u) * 1.6)) 8.2vw 0 11.5vw;
  font-family: var(--display);
  font-size: clamp(12px, 1.02vw, 18px);
}

/* Soft fade behind the bar once the page scrolls, so it never sits on top of text */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -48px;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(10, 9, 28, 0.82), rgba(10, 9, 28, 0.5) 55%, rgba(10, 9, 28, 0));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.is-scrolled .nav::before { opacity: 1; }
.menu-open .nav::before { opacity: 0; }

.nav__links { display: contents; }

/* Her name reads like the links: same size, in capitals */
.nav__name,
.nav__links a {
  text-transform: uppercase;
  letter-spacing: 0.05em; /* capitals need a little more air (was 0.02em) */
}

.nav a { opacity: 0.92; text-shadow: 0 1px 14px rgba(10, 9, 28, 0.45); transition: opacity 0.3s var(--ease); }
.nav a:hover { opacity: 0.6; }
/* Where am I: the current page is underlined in the nav and the phone menu */
.nav__links a[aria-current="page"],
.menu__list a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

/* ---------- Case thumbnails in the Work menu (js/worknav.js) ----------
   Resting: dimmed. Hover: full opacity and an outline, no words.
   The case you're on: fully visible with its number and title. */

.switcher__item {
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 12px;
  opacity: 0.62;
  transition: opacity 0.3s var(--ease), background-color 0.3s var(--ease);
}
.switcher__item:hover { opacity: 1; }
.switcher__item[aria-current="page"] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
.switcher__item img {
  width: 64px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.3s var(--ease);
}
.switcher__item:hover img { outline-color: rgba(255, 255, 255, 0.85); }
.switcher__label {
  display: block;
  max-width: 0;
  overflow: hidden; /* still read out by screen readers */
  font-family: var(--display);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: var(--track-ui);
}
.switcher__label b {
  display: block;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: var(--track-label);
  color: rgba(255, 255, 255, 0.66);
}
.switcher__item[aria-current="page"] .switcher__label {
  max-width: 200px;
  padding: 0 12px 0 12px;
}

/* ---------- Work menu: hover "Work" (desktop) to drop the case thumbnails under the nav (js/worknav.js) ---------- */

.navdrop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; /* js/worknav.js lines it up with the start of the word "Work" */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0s linear 0.25s; /* opacity only: the bar inside is animated by JS */
}
.navdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s var(--ease), visibility 0s;
}
.navdrop__bar {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(12, 11, 30, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 40px rgba(0, 0, 0, 0.3);
}
/* While its menu is open, "Work" shows the current-page underline */
.nav__links a[aria-expanded="true"] {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}
/* It sits inside the nav links, so undo their caps, spacing, dimming and current-page underline */
.nav .navdrop .switcher__item {
  opacity: 0.62;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
  text-shadow: none;
}
.nav .navdrop .switcher__item:hover,
.nav .navdrop .switcher__item:focus-visible,
.nav .navdrop .switcher__item[aria-current="page"] { opacity: 1; }

/* Phones: "Work" in the menu opens a list of the case studies */
.menu__work {
  display: flex;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: 15px 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--display);
  font-size: clamp(25px, 7.2vw, 32px);
  line-height: 1.15;
  letter-spacing: var(--track-head);
  text-align: left;
  cursor: pointer;
}
.menu__work::after {
  content: "";
  align-self: center;
  width: 0.3em;
  height: 0.3em;
  margin: 0 4px 0 auto; /* the arrow sits at the end of the row */
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.menu__work[aria-expanded="true"]::after { transform: translateY(15%) rotate(225deg); }
.menu__sub {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
  padding: 0 0 0 calc(24px + 16px); /* under the names, past the number column */
  list-style: none;
}
.menu__sub[hidden] { display: none; }
.menu__list .menu__sub a {
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 17px;
  line-height: 1.3; /* number above the name: not the big links' 1.1 */
  letter-spacing: var(--track-ui);
}
.menu__sub img {
  width: 56px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
/* Number and name share a row. As its own inline block, the number stays out of the
   underline that marks the current case. */
.menu__sub b {
  display: inline-block;
  margin-right: 10px;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: var(--track-label);
  color: var(--ink-muted);
}

/* ---------- Stage (pinned) ---------- */

main { position: relative; z-index: 1; }

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

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

.hero {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--u) * 100);
  height: calc(var(--u) * 67.37);
  transform: translate(-50%, -50%);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
}

.hero__pre,
.hero__word,
.hero__post {
  position: absolute;
  display: block;
  white-space: nowrap;
}

.hero__pre {
  left: calc(var(--u) * 14.77);
  top: calc(var(--u) * 12.78);
  font-size: calc(var(--u) * 3.66);
  overflow: hidden;
  padding-bottom: 0.12em; /* keeps the "g" descender inside the reveal mask */
}
.hero__pre > span { display: block; }

.hero__word {
  left: calc(var(--u) * 9.85);
  top: calc(var(--u) * 14.33);
  font-size: calc(var(--u) * 28.96);
  letter-spacing: -0.005em;
}
.hero__word .ch {
  display: inline-block;
  will-change: transform, filter, opacity;
}

.hero__post {
  right: calc(var(--u) * 20.33);
  top: calc(var(--u) * 41.01);
  font-size: calc(var(--u) * 2.67);
  letter-spacing: 0.065em;
  text-transform: uppercase;
}
/* The words after "to" take turns every 2 seconds (js/main.js), sliding up through this mask.
   The line stays right-anchored, and js/main.js lines its last letter up with the "y" of Clarity. */
.hero__swap {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  overflow: hidden;
  padding: 0.14em 0; /* room for capitals and descenders inside the mask */
  margin: -0.14em 0;
}
.hero__swap > span {
  display: inline-block;
  white-space: nowrap;
}

.hero__ask {
  position: absolute;
  left: calc(var(--u) * 72.3);
  top: calc(var(--u) * 46.75);
  width: calc(var(--u) * 14.55);
  height: calc(var(--u) * 4.3);
  min-height: 44px;
  padding: 0;
  border-radius: calc(var(--u) * 1.15);
  font-size: calc(var(--u) * 1.33);
}

.hero__roles {
  position: absolute;
  left: calc(var(--u) * 13.95);
  top: calc(var(--u) * 53.15);
  font-family: var(--display);
  font-size: calc(var(--u) * 1.23);
  line-height: 1.3;
  letter-spacing: var(--track-ui);
}
.hero__roles .is-muted { color: rgba(236, 233, 255, 0.92); } /* softer than the white lines, still ≥ 4.5:1 on the hero glass */

/* Scroll cue: a glass ring with a bobbing arrow, bottom centre of the screen */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5vh, 56px);
  z-index: 2;
  transform: translateX(-50%);
}
.cue-ring {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.cue-ring svg { animation: cue-bob 2.2s var(--ease) infinite; }
a:hover > .cue-ring {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

/* ---------- Case study (Spexi) ---------- */

.case {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 27vw) minmax(0, 35vw);
  justify-content: space-between;
  align-items: center;
  padding: 0 13.5vw 0 14.15vw;
  pointer-events: none;
}
/* All cases are stacked in the stage, so only the pieces that are actually shown take clicks
   (hidden ones are visibility: hidden and let clicks through to the case on screen) */
.case__text > :not(.case__scrim),
.case__shot { pointer-events: auto; }

/* Soft blurred panel behind the copy, tinted to each scene (--scrim set per case) */
.case__text {
  position: relative;
  isolation: isolate;
}
.case__scrim {
  position: absolute;
  inset: -64px -80px;
  z-index: -1;
  border-radius: 48px;
  background: var(--scrim, #000);
  opacity: var(--scrim-a, 0.5); /* per case, set with the scrim colour on the article */
  filter: blur(var(--scrim-blur, 48px));
  pointer-events: none;
}

.case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.6em;
  margin: 0 0 clamp(16px, 1.6vw, 32px);
}

.case__tags,
.case__meta {
  font-family: var(--display);
  font-size: clamp(11px, 0.75vw, 15px);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.case__title {
  margin: 0 0 clamp(20px, 2.4vw, 48px);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 3.3vw, 68px);
  line-height: 1.2;
  letter-spacing: var(--track-head);
}

/* Body copy settings matched to the previous (Lovable) site */
.case__body,
.think__step p {
  font-weight: 400;
  font-size: clamp(18px, calc(1.05vw + 1px), 20px);
  line-height: var(--lead-body);
  letter-spacing: var(--track-body);
  font-feature-settings: "ss01" 1;
  color: var(--ink);
}

.case__body {
  max-width: 23.2em;
  margin: 0 0 clamp(20px, 2.2vw, 44px);
}

.case__meta { margin: 0 0 clamp(24px, 2.4vw, 48px); }

.case__go {
  display: grid;
  place-items: center;
  width: clamp(48px, 3.15vw, 64px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.case__go:hover { background: #fff; color: #1d3526; }

.case__shot {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 40px 90px rgba(4, 22, 12, 0.45);
  transform-origin: 30% 50%;
}
.case__shot img { width: 100%; }
/* The screenshot opens the case study too (the arrow stays the keyboard stop) */
.case__shot-link { display: block; cursor: pointer; }

/* Alternate scenes put the image on the left */
.case--flip {
  grid-template-columns: minmax(0, 35vw) minmax(0, 27vw);
  padding: 0 14.15vw 0 13.5vw;
}
.case--flip .case__shot {
  order: -1;
  transform-origin: 70% 50%;
}

.case .case__body + .case__body { margin-top: calc(clamp(20px, 2.2vw, 44px) * -0.38); } /* homepage case blocks only */
.case--diovi { grid-template-columns: minmax(0, 27vw) minmax(0, 30vw); }

/* ---------- Skills band ---------- */

.skills {
  position: relative;
  display: flex;
  align-items: center;
  height: 90vh;
  overflow: hidden;
}

.skills__row {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: clamp(56px, 8.5vw, 170px);
  line-height: 1.1;
  white-space: nowrap;
  will-change: transform;
}
.skills__row li {
  display: flex;
  align-items: center;
}
.skills__row li::after {
  content: "";
  width: 0.12em;
  height: 0.12em;
  margin: 0 0.45em;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.55;
}
.skills__row li:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.75);
}

/* ---------- How I think ---------- */

.think {
  position: relative;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
}

.think__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 8vw;
  width: 100%;
  padding: 0 13.5vw 0 14.15vw;
}

.think__title {
  margin: clamp(16px, 1.6vw, 32px) 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 96px);
  line-height: 1.12;
  letter-spacing: var(--track-head);
}

.think__progress {
  position: relative;
  width: 1px;
  height: clamp(80px, 9vw, 160px);
  margin-top: clamp(32px, 3.6vw, 72px);
  background: rgba(255, 255, 255, 0.18);
}
.think__progress span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
}

.think__steps {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.think__step {
  display: grid;
  grid-template-columns: 3em 1fr;
  column-gap: 1em;
  opacity: 0.28;
  transform-origin: left center;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}
/* Steps build up as you scroll: each one fades in large and settles to size, left to right.
   Steps not reached yet wait out of view (JS only, so the text is always there without it). */
.js body:not(.no-motion) .think__step:not(.is-active):not(.is-past) {
  opacity: 0;
  transform: translateX(calc(-1 * clamp(24px, 3vw, 56px))) scale(1.14);
  filter: blur(6px);
}
.think__step.is-past { opacity: 0.28; }
.think__step.is-active {
  opacity: 1;
  transform: translateX(clamp(8px, 0.8vw, 16px));
}
@media (prefers-reduced-motion: reduce) {
  .js body:not(.no-motion) .think__step:not(.is-active):not(.is-past) { transform: none; filter: none; }
  .think__step { transition: opacity 0.3s linear; }
}
.think__num {
  grid-row: span 2;
  padding-top: 0.9em;
  font-family: var(--display);
  font-size: clamp(11px, 0.75vw, 15px);
  letter-spacing: var(--track-label);
}
.think__step h3 {
  margin: 0 0 0.45em;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 2vw, 40px);
  line-height: 1.25;
  letter-spacing: var(--track-card);
}
.think__step p {
  max-width: 32em;
  margin: 0;
}

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

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 18vh 8.2vw 40px 11.5vw;
}

.foot__title {
  margin: clamp(12px, 1.4vh, 24px) 0 0 -0.05em;
  font-family: var(--display);
  font-weight: 400;
  font-size: calc(var(--u) * 19);
  line-height: 1;
  letter-spacing: var(--track-display);
  white-space: nowrap;
}
.foot__title .ch { display: inline-block; }

/* A big "Email me" button instead of a printed address (keeps it away from spam scrapers) */
.foot__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(20px, 2.4vw, 40px);
  margin-top: clamp(28px, 4.5vh, 56px);
}
/* "Copy email": a quiet text button beside the main one */
.foot__alt {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: none;
  color: inherit;
  font-family: var(--display);
  font-size: clamp(17px, calc(1.15vw + 1px), 21px);
  letter-spacing: var(--track-ui);
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}
.foot__alt:hover { border-color: var(--ink); }

/* Shown after "Email me" in case no email app opened (js/email.js) */
.email-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 15px;
  line-height: var(--lead-small);
  letter-spacing: var(--track-body);
  color: rgba(255, 255, 255, 0.78);
}
.email-note button,
.email-note a {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: clamp(56px, 14vh, 160px);
  padding: 24px 110px 0 0; /* keeps clear of the floating orb */
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.foot__bar p { margin: 0; }
.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.foot__nav a { padding: 6px 0; opacity: 0.85; transition: opacity 0.3s var(--ease); } /* taller hit area (24px+) */
.foot__nav a:hover { opacity: 1; }

/* ---------- Static fallback (animation libraries failed to load) ---------- */

.no-motion .stage { height: auto; overflow: visible; }
.no-motion .hero { position: relative; left: auto; top: auto; margin: 0 auto; transform: none; }
.no-motion .case { position: relative; min-height: 100vh; }

/* ---------- Phones & narrow tablets ---------- */

@media (max-width: 760px) {
  /* Her name on the left, the menu button top right (its icon ends on the 20px page margin) */
  .nav {
    justify-content: space-between;
    gap: 14px;
    padding: 14px 10px 0 20px;
    font-size: 14px;
  }
  .nav__toggle { order: 2; }
  .nav__links { display: none; }

  .hero {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
  }
  .hero__pre,
  .hero__word,
  .hero__post,
  .hero__ask,
  .hero__roles { position: static; }

  .hero__pre { font-size: 30px; padding-left: 0.1em; }
  .hero__word { font-size: 27vw; margin: -0.02em 0 0 -0.06em; }
  .hero__post {
    align-self: flex-end;
    font-size: 4.3vw;
    margin-top: -0.2em;
  }
  .hero__ask {
    align-self: flex-start;
    width: auto;
    height: 48px;
    margin-top: 32px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 16px;
  }
  .hero__roles { margin-top: 28px; font-size: 15px; }
  .hero__cue { bottom: 28px; }

  .case {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 22px;
    padding: 64px 20px 24px;
  }
  .case__tags { margin-bottom: 12px; }
  .case__title { font-size: 27px; margin-bottom: 14px; }
  /* Reading size on phones: 17px (it was 15px, which she found very small on a real phone).
     The homepage cases keep the smaller size: each one has to fit a single pinned screen. */
  .case__body { font-size: 17px; line-height: 1.7; margin-bottom: 16px; }
  .stage .case__body { font-size: 15px; line-height: 1.78; margin-bottom: 14px; }
  .case__meta { margin-bottom: 16px; }
  .case__go { width: 44px; }
  .case--flip .case__shot { order: 0; }

  .skills { height: 60vh; }
  .skills__row { font-size: 56px; }

  .think__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 64px 20px 24px;
  }
  .think__title { font-size: 36px; }
  .think__progress { display: none; }
  .think__steps { gap: 18px; }
  .think__step { grid-template-columns: 2.4em 1fr; }
  .think__step h3 { font-size: 21px; }
  .think__step p { font-size: 17px; line-height: 1.7; }

  .foot { padding: 18vh 20px 32px; }
  .foot__title { font-size: 18.5vw; }
  /* Phones: no page links down here (they are in the menu). The place and LinkedIn share a
     line, the copyright sits under them. */
  .foot__bar {
    gap: 10px 24px;
    padding-right: 0;
    margin-bottom: 72px;
  }
  .foot__nav a:not([target="_blank"]) { display: none; }
  .foot__bar p:last-child { flex-basis: 100%; text-align: center; }
}

/* ---------- Phone menu (hamburger + full-screen drawer) ---------- */

.nav__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}
.menu-open .nav__toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-open .nav__toggle span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

.menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 24px max(32px, env(safe-area-inset-bottom));
  overflow-y: auto; /* short phones with the Work list open: the menu scrolls instead of overlapping */
  overscroll-behavior: contain;
  background: rgba(13, 11, 46, 0.86);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  backdrop-filter: blur(28px) saturate(1.2);
  /* Fades in where it is. It no longer waits off-screen to one side: on iPhones a panel parked
     beyond the edge can make the page scroll into empty space. */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease), visibility 0s;
}

/* A quiet list: medium type, a hairline between rows, the number on the name's baseline */
.menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.menu__list > li { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.menu__list li {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.menu-open .menu__list li {
  opacity: 1;
  transform: none;
  transition-duration: 0.8s;
  transition-delay: calc(0.18s + var(--i, 0) * 0.06s);
}
.menu__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  font-family: var(--display);
  font-size: clamp(25px, 7.2vw, 32px);
  line-height: 1.15;
  letter-spacing: var(--track-head);
}
.menu__num {
  flex: 0 0 24px;
  font-size: 11px;
  letter-spacing: var(--track-label);
  color: var(--ink-muted);
}

.menu__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-top: 32px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.menu-open .menu__foot {
  opacity: 1;
  transition: opacity 0.8s var(--ease) 0.5s;
}
.menu__links {
  display: flex;
  gap: 28px;
  margin: 0;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.menu__links a { display: inline-block; padding: 6px 0; } /* taller hit area (24px+) */

@media (max-width: 760px) {
  .nav__toggle,
  .menu { display: flex; }
}

/* ---------- Portfolio assistant ---------- */

.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.orb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.assistant-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.4s;
}
.past-hero:not(.assistant-open):not(.menu-open) .assistant-fab {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0s;
}
.past-hero:not(.assistant-open):not(.menu-open) .assistant-fab:hover { transform: scale(1.05); }
@media (min-width: 768px) {
  .assistant-fab { width: 80px; height: 80px; }
}

/* Catches a click outside the chat to close it. It no longer darkens or blurs the page:
   the chat is a light, nearly solid panel now and reads clearly on its own */
.assistant-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
.assistant-open .assistant-scrim {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* A light frosted panel with dark text (her reference, Oct 2026). The site's text tokens
   are redefined in here, so everything inside reads dark on light */
.assistant {
  --ink: #16161a;
  --ink-muted: #5c5c60;
  --hairline: rgba(0, 0, 0, 0.12);
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 51;
  display: flex;
  flex-direction: column;
  width: min(92vw, 30rem);
  max-height: 80vh;
  max-height: 80svh;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  background: rgba(252, 252, 251, 0.97);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 30px 90px -24px rgba(0, 0, 0, 0.5);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.96);
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.45s;
}
.assistant-open .assistant {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s;
}

.assistant__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.assistant__orb { width: 40px; height: 40px; flex-shrink: 0; }
.assistant__id { flex: 1; min-width: 0; }
.assistant__id .eyebrow { color: #47474b; }
.assistant__status {
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 13.8px;
  letter-spacing: var(--track-body);
  color: var(--ink-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.assistant__btn {
  padding: 8px 0 8px 8px;
  border: 0;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.assistant__btn:hover { color: var(--ink); }

.assistant__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 160px;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.assistant__msg {
  margin: 0;
  font-size: 16.2px;
  line-height: 1.72;
  letter-spacing: var(--track-body);
}
.assistant__msg.is-assistant {
  color: #47474b;
  white-space: pre-wrap;
}
.assistant__msg.is-user {
  padding-left: 12px;
  border-left: 1px solid var(--hairline);
}
.assistant__msg a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.assistant__msg strong { color: var(--ink); font-weight: 500; }
.assistant__thinking { color: var(--ink-muted); }
.assistant__error {
  margin: 0;
  font-size: 14.6px;
  line-height: 1.55;
  letter-spacing: var(--track-body);
  color: var(--ink-muted);
}

.assistant__suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.assistant__suggestions button {
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13.8px;
  line-height: 1.4;
  letter-spacing: var(--track-ui);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
}
.assistant__suggestions button:hover { border-color: var(--ink); }

.assistant__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
}
.assistant__note {
  margin: -4px 0 0;
  padding: 0 16px 12px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: var(--track-body);
  color: var(--ink-muted);
}
.assistant__voice,
.assistant__send {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px; /* pills in here, like the question chips above them */
  font-family: var(--display);
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
  letter-spacing: 0.14em;
}
.assistant__voice {
  border: 1px solid var(--hairline);
  background: none;
  color: var(--ink-muted);
}
.assistant__voice:hover,
.assistant__voice.is-active { border-color: var(--ink); color: var(--ink); }
.assistant__send {
  border: 0;
  background: var(--ink);
  color: #fff;
}
.assistant__send:disabled { opacity: 0.4; cursor: default; }
.assistant__input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16.2px;
  letter-spacing: var(--track-body);
  outline: none;
}
.assistant__input::placeholder { color: var(--ink-muted); }
.assistant__form:focus-within { border-top-color: rgba(0, 0, 0, 0.4); }

/* Very short screens (a phone on its side): let the chat use more of the height and the
   conversation shrink, so the question box never slips out of the panel */
@media (max-height: 420px) {
  .assistant { max-height: 94vh; max-height: 94svh; }
  .assistant__log { min-height: 64px; }
}

/* Orb reacts to what the assistant is doing */
.assistant[data-state="listening"] .assistant__orb { animation: orb-listen 1.6s ease-in-out infinite; }
.assistant[data-state="thinking"] .assistant__orb { animation: orb-think 2.2s ease-in-out infinite; }
@keyframes orb-listen { 50% { transform: scale(1.06); } }
@keyframes orb-think { 50% { transform: scale(0.96); opacity: 0.72; } }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cue-ring svg,
  .assistant__orb { animation: none !important; }
  .menu,
  .menu__list li,
  .assistant { transition-duration: 0.01s !important; }
}

/* Homepage → case study: the clicked screenshot opens up to fill the screen (js/main.js) */
.case-enter {
  position: fixed;
  z-index: 70;
  overflow: hidden;
  border-radius: 12px;
  background: center / cover no-repeat;
  pointer-events: none;
}
.case-enter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0b0a1f;
  opacity: var(--veil, 0);
}
