/* =========================================================
   Lorenza Quinzi — Portfolio
   Type: Inter, one weight family throughout
   Theme: light/dark via [data-theme], defaults to system preference
   ========================================================= */

:root {
  --bg: #F9F9F7;
  --bg-raised: #EFEFEC;
  --placeholder: #DCDCD8; /* gray stand-in for images that aren't ready */
  --fg: #0A0A0A;
  --muted: #6E6E6B;
  --accent: #0A0A0A;
  --accent-soft: #E7E7E3;
  --accent-contrast: #F9F9F7;
  --border: #DEDEDA;
  --focus: #1857C4;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --max-w: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 16px;
  --stage: #000000; /* behind every image and recording: black in light mode, dark gray in dark mode */

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --bg-raised: #161614;
  --placeholder: #262624;
  --fg: #F5F5F2;
  --muted: #9A9A96;
  --accent: #F5F5F2;
  --accent-soft: #1D1D1A;
  --accent-contrast: #0A0A0A;
  --border: #262624;
  --focus: #8FB8FF;
  --stage: #1B1B1A;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A;
    --bg-raised: #161614;
    --placeholder: #262624;
    --fg: #F5F5F2;
    --muted: #9A9A96;
    --accent: #F5F5F2;
    --accent-soft: #1D1D1A;
    --accent-contrast: #0A0A0A;
    --border: #262624;
    --focus: #8FB8FF;
    --stage: #1B1B1A;
    color-scheme: dark;
  }
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ---------- Custom cursor dot (fine pointers only, motion allowed) ---------- */
.cursor-dot {
  --x: -100px;
  --y: -100px;
  --s: 1;
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 1.5px solid var(--fg);
  background: transparent;
  pointer-events: none;
  z-index: 60;
  transform: translate(var(--x), var(--y)) scale(var(--s));
  transition: opacity .2s ease, background-color .2s ease;
  opacity: 0;
}
.cursor-dot.is-active { opacity: 1; }
.cursor-dot.is-hovering {
  background: var(--fg);
  --s: 1.8;
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
  /* sticky footer: when a page is shorter than the screen, the footer sits at the bottom of it */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body > main { flex: 1 0 auto; }
body > .footer { margin-top: auto; }

img { max-width: 100%; height: auto; display: block; }

a { /* every link inside a string: the same dotted underline, scaled with the type (see Interaction system) */
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: currentColor;
  text-decoration-thickness: clamp(1.5px, 0.05em, 3px);
  text-underline-offset: 0.22em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 18px;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 14px;
}
.skip-link:focus {
  left: var(--gutter);
  top: 16px;
}

/* ---------- Nav ---------- */
.site-nav-wrap {
  position: sticky;
  top: clamp(12px, 2.5vw, 20px);
  z-index: 40;
  padding: 0 var(--gutter);
}

.site-nav {
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 12px 12px 22px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 12px 32px -20px rgb(0 0 0 / 0.35);
}

.site-nav__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav__name em {
  font-style: normal;
  color: var(--accent);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.site-nav__links a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
}
.site-nav__links a:hover { color: var(--fg); }

.theme-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

/* ---------- Index nav (always-visible, plain text — home page) ---------- */
.index-nav {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 26px var(--gutter) 22px;
  overflow: clip; /* the tilted video's corners must not hang below the nav's background, where nothing is there to blend against */
  transition: background-color .25s ease;
  background: var(--bg); /* gives the video logo's blend mode something to blend against (the nav is its own stacking context) */
}

.index-nav__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}
.index-nav__mark {
  display: block;
  height: 38px;
  aspect-ratio: 1418 / 744;
  background-color: currentColor;
  -webkit-mask: url("assets/logo/lolo-logo.svg") center / contain no-repeat;
  mask: url("assets/logo/lolo-logo.svg") center / contain no-repeat;
}

/* Video logo (test): the SVG mark above is the fallback and stays until the video can play (script.js adds .is-video-ready).
   The clip has a white background, so blend it into the page and trim its empty margins. */
.index-nav__logo--video { min-height: 55px; } /* the video's visible height, so the header doesn't jump when it takes over */
.index-nav__video {
  position: absolute;
  opacity: 0;
  display: block;
  height: 87px;
  width: auto;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.index-nav__logo--video.is-video-ready .index-nav__mark { display: none; }
.index-nav__logo--video.is-video-ready .index-nav__video {
  position: static;
  opacity: 1;
  margin: -20px -30px -12px -24px;
  transform: translateY(3px) rotate(10deg); /* the lettering sits a little above the clip's centre (nudge to the menu's optical middle) and climbs ~17° to the right (tilt it back toward the horizontal) */
}
:root[data-theme="dark"] .index-nav__video { filter: invert(1); mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .index-nav__video { filter: invert(1); mix-blend-mode: screen; }
}

.index-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(14px, 2.6vw, 30px);
}

.index-nav__links a {
  font-size: 13px;
  text-decoration: none;
  color: var(--fg);
}
.index-nav__links a:hover { color: var(--muted); }
.index-nav__logo:hover, .index-nav__logo:focus-visible { color: var(--fg); }
.index-nav__links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.index-nav__theme {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  color: var(--fg);
}
.index-nav__theme .disc {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: linear-gradient(90deg, var(--fg) 50%, transparent 50%);
}
.index-nav__theme .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero (full-width, interactive — home page) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: min(78svh, 760px);
  padding: clamp(28px, 5vw, 64px) var(--gutter);
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y; /* canvas reacts to touch, but vertical page scroll still works */
}
.hero .work-item__placeholder-tag {
  top: 16px;
  left: var(--gutter);
  z-index: 2;
}
.hero__content {
  position: relative;
  z-index: 1;
  pointer-events: none; /* let the pointer reach the canvas underneath */
}
.hero__title {
  max-width: 16ch;
  font-size: clamp(36px, 7.2vw, 108px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero__sub {
  margin-top: clamp(14px, 2vw, 24px);
  font-size: clamp(13px, 1.3vw, 16px);
  color: var(--muted);
}

/* ---------- Selected work (a plain list of projects) ---------- */
.index-section { padding: clamp(8px, 2vw, 16px) 0; }
.index-section__head { padding: 18px var(--gutter) 0; }

.work-list { margin: 0; padding: 28px var(--gutter) 12px; list-style: none; }
.work-list__item { border-top: 1px solid var(--border); }
.work-list__item a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content 24px; /* title ... company • year → */ /* the company sits right after the project name (the name column is only as wide as the longest title) */
  gap: 8px 24px;
  align-items: baseline;
  padding: clamp(18px, 2.4vw, 28px) 0;
  color: var(--fg);
  text-decoration: none;
}
.work-list__title { font-size: clamp(20px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
.work-list__meta, .work-list__year { font-size: 14px; color: var(--muted); }
.work-list__year { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; margin-left: -16px; margin-right: -10px; } /* "company • year", right next to the arrow */
.work-list__year::before { content: "\2022"; margin-right: 8px; } /* escaped, so it shows up even when the stylesheet is not served as UTF-8 */
.work-list__arrow { justify-self: end; text-align: right; color: var(--muted); transition: transform 0.25s ease, color 0.25s ease; }
.work-list__item a:hover .work-list__arrow,
.work-list__item a:focus-visible .work-list__arrow { transform: translateX(4px); color: var(--fg); }
.work-list__item a:hover .work-list__title { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.work-list__item a:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 640px) {
  .work-list__item a { grid-template-columns: max-content 1fr 24px; grid-template-areas: "title title arrow" "meta year arrow"; column-gap: 0; }
  .work-list__title { grid-area: title; }
  .work-list__meta { grid-area: meta; display: inline; }
  .work-list__year { grid-area: year; text-align: left; margin-left: 8px; margin-right: 0; } /* "company • year" under the name on phones */
  .work-list__arrow { grid-area: arrow; align-self: center; }
}

/* When a gray box gets a real image, just put an <img> inside it — these rules
   make it fill the box. (The case-study gallery boxes are replaced by an <img>
   with class "cs-gallery__img".) */
.cs-cover img,
.about-grid__portrait img {
  object-position: 50% 28%;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-gallery__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: clamp(56px, 10vw, 120px) var(--gutter);
  border-top: 1px solid var(--border);
}

.section--page {
  border-top: 0;
  padding-top: calc(clamp(8px, 2vw, 16px) + 18px); /* same distance under the nav as the home page's "Selected Work" label */
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 29.5px; /* puts the divider ~31.5px under the label text, like the home page's work list */
  flex-wrap: wrap;
}

.section__title {
  font-size: clamp(28px, 5vw, 44px);
}
/* Page titles styled as the home page's "Selected Work" label (the .eyebrow class supplies the look; this resets the heading's own size, weight and leading) */
.section__title.eyebrow {
  font-size: 12px;
  font-weight: 400;
  line-height: inherit;
}

.section__note {
  max-width: 42ch;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Placeholder tag (shared with case-study detail pages) ---------- */
.work-item__placeholder-tag {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 4px 8px;
  border-radius: 999px;
}

/* ---------- Experience ---------- */
.exp-list {
  border-top: 1px solid var(--border);
}

.exp-item {
  border-bottom: 1px solid var(--border);
}
.exp-item summary {
  display: grid;
  grid-template-columns: 170px 1fr auto 20px;
  gap: 8px 20px;
  align-items: baseline;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}
.exp-item summary::-webkit-details-marker { display: none; }
.exp-item summary:hover .role { color: var(--fg); }
.exp-item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.exp-item__chev {
  width: 8px;
  height: 8px;
  justify-self: end;
  align-self: center;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s ease;
}
.exp-item details[open] .exp-item__chev { transform: rotate(-135deg) translate(-2px, -2px); }
.exp-item details { interpolate-size: allow-keywords; }
.exp-item details::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete;
}
.exp-item details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) {
  .exp-item__chev, .exp-item details::details-content { transition: none; }
}

.exp-item__years {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.exp-item__role {
  font-size: 17px;
}
.exp-item__role .company { font-weight: 600; }
.exp-item__role .role { color: var(--muted); }

.exp-item__industry {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.exp-item__notes {
  margin: 0 0 26px 190px;
  padding: 0 0 0 1.1em;
  max-width: 64ch;
  list-style: disc;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.exp-item__notes--plain { list-style: none; padding-left: 0; } /* a single paragraph, no bullet */
.exp-item__notes li { margin-bottom: 6px; }
.exp-item__notes li:last-child { margin-bottom: 0; }

.exp-stats {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.exp-stats__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  color: var(--accent);
}
.exp-stats__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  max-width: 22ch;
  margin-top: 4px;
}

/* ---------- About / personal ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 6vw, 64px);
  align-items: start;
  border-top: 1px solid var(--border); /* divider under the title, like the lists on the home and Experience pages */
  padding-top: clamp(18px, 2.4vw, 28px);
}

.about-grid__portrait {
  position: relative;
  border-radius: 44px; /* rounder than the site's usual --radius */
  overflow: hidden;
  background: var(--placeholder);
  aspect-ratio: 1 / 1;
}

.about-copy p {
  font-size: clamp(17px, 2vw, 20px);
  max-width: 54ch;
  margin-bottom: 18px;
}
.about-copy p:last-child { margin-bottom: 0; }

/* ---------- Contact / footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 28px;
  padding: 22px var(--gutter) 26px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.footer__meta { color: var(--muted); }
.footer__links { display: flex; gap: clamp(14px, 2.6vw, 28px); margin-left: auto; }
.footer__links a { color: var(--fg); text-decoration: none; }
.about-contact { display: flex; flex-wrap: wrap; gap: 6px clamp(14px, 2.6vw, 28px); }

.footer__now-playing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.footer__now-playing:hover { color: var(--fg); }
.footer__now-playing[hidden] { display: none; }
.footer__now-playing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.footer__now-playing.is-playing .footer__now-playing-dot {
  background: var(--fg);
}
@media (prefers-reduced-motion: no-preference) {
  .footer__now-playing.is-playing .footer__now-playing-dot {
    animation: now-playing-pulse 1.6s ease-in-out infinite;
  }
}
@keyframes now-playing-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Placeholder banner (remove once real content is in) ---------- */
.placeholder-banner {
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  padding: 10px var(--gutter);
}
.placeholder-banner a { color: inherit; text-decoration-color: var(--accent-contrast); }

/* ---------- Motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Case study detail page ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
  padding: 20px var(--gutter) 0;
}
.back-link:hover { color: var(--fg); }
.back-link .arrow { transform: rotate(180deg); display: inline-block; }

.cs-hero {
  padding: clamp(32px, 6vw, 56px) var(--gutter) clamp(40px, 6vw, 64px);
}
.cs-hero__eyebrow { margin-bottom: 18px; }
.cs-hero__title {
  font-size: clamp(32px, 6vw, 60px);
  max-width: 20ch;
  margin-bottom: 20px;
}
.cs-hero__outcome {
  max-width: 60ch;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
}

.cs-cover {
  margin: 0 var(--gutter) clamp(40px, 6vw, 72px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
  aspect-ratio: 16 / 9;
  position: relative;
}

.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: clamp(40px, 6vw, 72px);
  margin: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
}
.cs-meta-grid dt.eyebrow { margin-bottom: 6px; }
.cs-meta-grid dd { margin: 0; font-size: 15px; }

.cs-body {
  padding: clamp(40px, 8vw, 88px) var(--gutter);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 5vw, 64px);
}
.cs-body + .cs-body { padding-top: 0; }
.cs-body__label { padding-top: 4px; }
.cs-body__text {
  max-width: 66ch;
  font-size: clamp(16px, 1.8vw, 18px);
}
.cs-body__text p { margin-bottom: 16px; }
.cs-body__text p:last-child { margin-bottom: 0; }

.cs-gallery {
  padding: 0 var(--gutter) clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 24px);
}
.cs-gallery__box {
  display: block;
  border-radius: var(--radius);
  background: var(--placeholder);
  aspect-ratio: 4 / 3;
  width: 100%;
}
.cs-gallery figure { margin: 0; }
.cs-gallery figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.cs-next {
  margin-top: clamp(40px, 7vw, 96px);
  padding: clamp(40px, 8vw, 80px) var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  text-decoration: none;
  color: inherit;
}
.cs-next__label { color: var(--muted); margin-right: clamp(16px, 2.4vw, 28px); }
.cs-next__title { font-size: clamp(24px, 4vw, 36px); margin-top: 8px; }

@media (max-width: 860px) {
  .cs-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-body { grid-template-columns: 1fr; }
  .cs-gallery { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .exp-item summary { grid-template-columns: 1fr 20px; grid-template-areas: "years chev" "role chev" "place chev"; gap: 4px 12px; }
  .exp-item__years { grid-area: years; }
  .exp-item__role { grid-area: role; }
  .exp-item__industry { grid-area: place; }
  .exp-item__chev { grid-area: chev; }
  .exp-item__industry { text-align: left; }
  .exp-item__notes { margin-left: 0; }
  .site-nav__links { gap: 14px; }
  .site-nav__links a { font-size: 12px; }
}

@media (max-width: 600px) {
  .site-nav-wrap { top: 10px; padding: 0 16px; }
  .site-nav { padding: 10px 10px 10px 18px; }
  .site-nav__links { display: none; }
  .work-list { padding-left: 16px; padding-right: 16px; }
  .index-section__head { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Case study (media-led) ----------
   Used by case-study-address-scanner.html. A big rounded stage for the hero,
   a title / summary row, then sections with the text on the left and the media
   on the right (modelled on the Everton / Mateus case pages). Phone recordings
   sit on a gray stage (--stage) that follows light / dark mode. */
.cs2 { padding-top: 8px; }

.cs2-stage {
  --pad: clamp(16px, 3vw, 44px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--pad);
  overflow: hidden;
  background: var(--stage);
  border-radius: var(--radius);
}
.cs2-media {
  display: block;
  height: var(--ph, clamp(380px, 62vh, 640px));
  width: auto;
  max-width: 100%;
  border-radius: clamp(18px, 2.4vw, 32px);
  background: #000;
  object-fit: cover;
}
.cs2-stage--multi { /* images sit side by side with a fixed 24px gap, at every screen size; they only shrink when there is no room */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.cs2-stage--multi .cs2-media { flex: 0 1 300px; width: auto; min-width: 0; max-width: 300px; height: auto; aspect-ratio: 1179 / 2556; }

.cs2-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4vw, 56px) var(--gutter) 0;
}
.cs2 > .cs2-head:first-child { padding-top: clamp(40px, 7vw, 96px); }
.cs2-head h1 {
  font-size: clamp(36px, 5.6vw, 84px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0;
}
.cs2-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.cs2-tags li { /* a label, not a control: filled, no outline (see Interaction system) */
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--muted);
  font-size: 13px;
}
.cs2-head__body { font-size: clamp(15px, 1.25vw, 17px); line-height: 1.5; max-width: 62ch; }
.cs2-head__body p { margin: 0 0 16px; color: var(--muted); }
.cs2-head__body .cs2-lede { color: var(--fg); font-size: clamp(20px, 2vw, 28px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; }
.cs2-meta { margin: 28px 0 0; display: grid; gap: 14px; font-size: 14px; }
.cs2-meta div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.cs2-meta dt { color: var(--muted); }
.cs2-meta dd { margin: 0; }

.cs2-sec {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(56px, 9vw, 128px) var(--gutter) 0;
}
.cs2-sec__text { position: sticky; top: 88px; max-width: 42ch; }
.cs2-sec h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.cs2-sec__text p { margin: 0 0 14px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; color: var(--muted); }
.cs2-kicker { font-size: 13px !important; letter-spacing: 0.02em; margin-bottom: 8px !important; }
.cs2-sec--wide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
/* very large screens: media, charts and figures stop growing (the text column keeps its own cap) */
.cs2-sec > :not(.cs2-sec__text) { max-width: 1000px; }
.cs2-sec--wide > :not(.cs2-sec__text) { max-width: 1400px; }
.cs2-sec--wide .cs2-sec__text { position: static; max-width: 64ch; } /* the same comfortable line length as the other sections, even on very wide screens */
.cs2-stage--bleed { padding: 0; } /* an image that brings its own background fills the stage edge to edge */
.cs2-sec--wide .cs2-sec__text h2 { margin: 0 0 18px; }

.cs2-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(24px, 4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.cs2-points li { padding-top: 16px; border-top: 1px solid var(--border); }


/* play / pause control on every clip (added by script.js) */
.cs2-clip-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); /* the stage is dark in both modes, so the control is a light glass pill */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cs2-stage:hover .cs2-clip-btn,
.cs2-clip-btn:focus-visible,
.cs2-clip-btn.is-paused { opacity: 1; }
.cs2-clip-btn:hover { background: rgba(255, 255, 255, 0.32); }
.cs2-clip-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.6); }
@media (hover: none) { .cs2-clip-btn { opacity: 1; } }

@media (max-width: 860px) {
  .cs2-head, .cs2-sec { grid-template-columns: minmax(0, 1fr); }
  .cs2-sec__text { position: static; max-width: none; }
  .cs2-points { grid-template-columns: minmax(0, 1fr); }
  .cs2-media { --ph: clamp(340px, 58vh, 560px); }
  .cs2-meta div { grid-template-columns: 96px minmax(0, 1fr); }
}

/* ---------- Case study: more media layouts ---------- */
.cs2-rows { display: grid; gap: 8px; }
.cs2-stage--stack { flex-direction: column; align-items: stretch; gap: 14px; }
.cs2-strip { display: block; width: 100%; height: auto; }
.cs2-stage--icons { gap: clamp(16px, 4vw, 48px); padding-block: clamp(40px, 9vw, 130px); }
.cs2-stage--icons img { width: clamp(96px, 22%, 200px); height: auto; }
.cs2-stage--plain img { display: block; width: 100%; height: auto; }
/* one image holding several screens, with a caption under each half */
.cs2-capped { width: 100%; }
.cs2-capped__caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; font-size: 12px; text-align: center; color: rgba(244, 244, 242, 0.62); }
.cs2-phones {
  display: grid;
  grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  gap: 24px; /* fixed: the distance between the images does not change with the screen size */
  align-items: end;
}
.cs2-phones figure { margin: 0; }
.cs2-phones img { display: block; width: 100%; height: auto; }
/* a pair where one side is a device frame: column widths follow the two aspect ratios so both sides are always the same height */
.cs2-phones--equal { grid-template-columns: minmax(0, 1.2294fr) minmax(0, 1fr); }
.cs2-phones--equal figure > img { max-width: 356px; margin-inline: auto; }
.cs2-phones--equal .cs2-frame { width: min(100%, 290px); margin-inline: auto; }
.cs2-phones figcaption { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.cs2-shot { margin: 0; overflow: hidden; border-radius: var(--radius); background: #000; }
.cs2-shot--dark { background: #141414; }
.cs2-shot img { display: block; width: 100%; height: auto; }
.cs2-pitch { margin: 0; }
.cs2-pitch video { display: block; width: 100%; height: auto; aspect-ratio: 1728 / 1080; border-radius: var(--radius); background: #000; }
.cs2-stage--frame { padding: clamp(16px, 3vw, 40px); }
.cs2-frame { position: relative; width: min(100%, 290px); }
.cs2-frame video, .cs2-frame .cs2-screen {
  position: absolute;
  left: 2.47%;
  top: 1.42%;
  width: 95.05%;
  height: 97.16%;
  border-radius: 5.78% / 3.25%;
  object-fit: cover;
  background: #000;
}
.cs2-frame img:not(.cs2-screen) { position: relative; display: block; width: 100%; height: auto; pointer-events: none; }
.cs2-list { list-style: disc; margin: 18px 0 0; padding: 0 0 0 1.15em; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; color: var(--muted); }
.cs2-list li { margin-bottom: 10px; }
.cs2-points--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs2-steps { counter-reset: step; }
.cs2-steps li::before { counter-increment: step; content: counter(step); display: block; margin-bottom: 10px; font-weight: 600; color: var(--muted); }
@media (max-width: 860px) {
  .cs2-points--3 { grid-template-columns: minmax(0, 1fr); }
}

/* Subtle data line chart (Address Scanner → Impact): smooth thin lines, a faint area under the
   leading series, three hairline guides and direct labels. Draws itself in once, unless reduced motion. */
.cs2-data { margin: 0; align-self: center; width: 100%; }
.cs2-data svg { display: block; width: 100%; height: auto; overflow: visible; }
.cs2-data__cap { font-size: calc(14px * var(--u, 1)); fill: color-mix(in srgb, var(--fg) 82%, var(--bg)); dominant-baseline: hanging; } /* chart text: --u (script.js) keeps it the same size on screen at every width; dark enough to read */ /* chart text: --u (script.js) keeps it the same size on screen at every width */
.cs2-data__tick { font-size: calc(13px * var(--u, 1)); fill: color-mix(in srgb, var(--fg) 82%, var(--bg)); }
.cs2-data__grid { stroke: color-mix(in srgb, var(--fg) 22%, var(--bg)); stroke-width: calc(1px * var(--u, 1)); stroke-dasharray: 2 5; }
.cs2-data__base { stroke: var(--border); stroke-width: calc(1px * var(--u, 1)); }
.cs2-data__area { fill: url(#data-fade); }
.cs2-data__line { fill: none; stroke-width: calc(2px * var(--u, 1)); stroke-linejoin: round; stroke-linecap: round; }
.cs2-data__line--android { stroke: var(--fg); }
.cs2-data__line--ios { stroke: color-mix(in srgb, var(--fg) 62%, var(--bg)); }
.cs2-data__halo { opacity: 0.14; }
.cs2-data__halo--android, .cs2-data__dot--android { fill: var(--fg); }
.cs2-data__halo--ios, .cs2-data__dot--ios { fill: color-mix(in srgb, var(--fg) 62%, var(--bg)); }
.cs2-data__label { font-size: calc(15px * var(--u, 1)); fill: color-mix(in srgb, var(--fg) 82%, var(--bg));  transform: translateX(calc(22px * var(--u, 1))); }
.cs2-data__label--android { fill: var(--fg); }
.cs2-data__num { font-weight: 600; }
.cs2-data__launchline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.cs2-data__dot { r: calc(4px * var(--u, 1)); }
.cs2-data__halo { r: calc(9px * var(--u, 1)); }
.cs2-data__launchdot { r: calc(4px * var(--u, 1)); }
.cs2-data__launchdot { fill: var(--fg); }
.cs2-data__launchlabel { font-size: calc(14px * var(--u, 1)); font-weight: 500; fill: var(--fg); dominant-baseline: hanging; }

.cs2-data__line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cs2-data__area, .cs2-data__end { opacity: 0; }
[data-reveal].is-visible .cs2-data__line { animation: cs2-draw 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards; }
[data-reveal].is-visible .cs2-data__area,
[data-reveal].is-visible .cs2-data__end { animation: cs2-data-in 0.8s ease 1.2s forwards; }
@keyframes cs2-draw { to { stroke-dashoffset: 0; } }
@keyframes cs2-data-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cs2-data__line { stroke-dashoffset: 0; animation: none !important; }
  .cs2-data__area, .cs2-data__end { opacity: 1; animation: none !important; }
}

/* About page: details list under the copy */
.about-facts { font-size: clamp(14px, 1.3vw, 16px); margin-top: 36px; }
.about-facts div { grid-template-columns: 110px minmax(0, 1fr); }
@media (max-width: 860px) {
  .about-facts div { grid-template-columns: 96px minmax(0, 1fr); }
  .about-grid__portrait { max-width: 340px; } /* the portrait file is small: don't stretch it across the page */
}

/* Other projects page: a project heading, then its sections one level down (h3) */
.cs2-proj {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin: clamp(72px, 11vw, 150px) var(--gutter) 0;
  padding-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--border);
}
.cs2-proj__kicker { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.cs2-proj h2 { margin: 0; font-size: clamp(30px, 4.2vw, 60px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.cs2-proj__goal { margin: 0 0 14px; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; max-width: 40ch; }
.cs2-proj__role { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 52ch; }
.cs2-proj__role strong { color: var(--fg); font-weight: 500; margin-right: 8px; }
.cs2-sec h3 { margin: 0 0 16px; font-size: clamp(24px, 3vw, 40px); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
.cs2-sec--wide .cs2-sec__text h3 { margin: 0; }
@media (max-width: 860px) { .cs2-proj { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Other projects: one full-screen slide per project ----------
   The page snaps from slide to slide as you scroll. Left: the project (title, goal, role,
   problems) with the carousel controls pinned at the bottom. Right: one stage whose content
   is a small horizontal carousel (the project's parts). Swipe, arrow keys, buttons or dots. */
html:has(.cs2--slides) { scroll-snap-type: y mandatory; }
.cs2--slides ~ .cs-next { scroll-snap-align: start; }
.cs2--slides ~ .footer { scroll-snap-align: end; } /* a short footer can only be reached by snapping its bottom to the bottom of the screen */
html:has(.cs2--slides) .index-nav { scroll-snap-align: start; }
/* the intro is just a normal header (same place and size as on the other project pages); the first slide follows right below it */
.cs2--slides .cs2-head--slide { padding-bottom: clamp(36px, 5vw, 64px); }

.cs2-slide {
  display: grid;
  grid-template-columns: minmax(280px, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 80px);
  height: 100svh;
  min-height: 600px;
  padding: clamp(20px, 3.5vh, 36px) var(--gutter);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-top: 1px solid var(--border);
}

/* left column: content on top, controls at the bottom, both lined up with the stage */
.cs2-slide__info { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-top: 4px; }
.cs2-slide__info::-webkit-scrollbar { display: none; }
.cs2-slide__info .cs2-proj__kicker { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.cs2-slide__info h1, .cs2-slide__info h2 { margin: 0 0 20px; font-size: clamp(28px, 3.4vw, 46px); font-weight: 600; line-height: 1.02; letter-spacing: -0.04em; }
.cs2-slide__info .cs2-proj__goal { margin: 0 0 14px; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; max-width: 38ch; }
.cs2-slide__info .cs2-proj__role { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 40ch; }
.cs2-slide__info .cs2-proj__role strong { display: block; margin: 0 0 2px; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--fg); }
.cs2-slide__problems { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.cs2-slide__problems h3 { margin: 0 0 8px; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; }
.cs2-slide__problems .cs2-list { margin: 0; font-size: 14px; line-height: 1.4; }
.cs2-slide__problems .cs2-list li { margin-bottom: 8px; }

.cs2-car__ctl { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; }
.cs2-car__btn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--fg);
  font-size: 15px; cursor: pointer; transition: border-color 0.2s ease, opacity 0.2s ease;
}
.cs2-car__btn:hover:not(:disabled) { border-color: var(--fg); }
.cs2-car__btn:disabled { opacity: 0.3; cursor: default; }
.cs2-car__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.cs2-car__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }

/* right column: the stage */
.cs2-car {
  position: relative;
  display: flex;
  gap: 0;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: var(--radius);
  outline: none;
}
.cs2-car::-webkit-scrollbar { display: none; }
.cs2-car:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.cs2-panel {
  --ink: var(--fg); --ink-soft: var(--muted);
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  background: var(--stage);
  overflow: hidden;
}
.cs2-panel--dark { background: #141414; --ink: #f4f4f2; --ink-soft: rgba(244, 244, 242, 0.62); }
.cs2-panel__head { position: relative; z-index: 2; flex: none; padding: clamp(16px, 2.2vw, 26px) clamp(16px, 2.2vw, 28px) 0; color: var(--ink); }
.cs2-panel__head h3 { display: inline-block; margin: 0; padding: 5px 12px; background: color-mix(in srgb, var(--ink) 12%, transparent); border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.2; }
.cs2-panel__head p { margin: 12px 0 0; max-width: 44ch; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.cs2-panel__head p strong { color: var(--ink); font-weight: 600; }
.cs2-panel__media { flex: 1 1 0; min-height: 0; display: flex; padding: clamp(12px, 2vw, 24px); }
.cs2-panel__media > * { flex: 1 1 auto; min-width: 0; min-height: 0; }

/* media inside the stage: no boxes of their own, scaled to fit */
.cs2-panel .cs2-shot, .cs2-panel .cs2-stage { height: 100%; margin: 0; padding: 0; border-radius: 0; background: transparent; display: flex; align-items: center; justify-content: center; overflow: visible; }
.cs2-panel .cs2-shot img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.cs2-panel .cs2-phones { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: clamp(10px, 2.4vw, 32px); align-items: stretch; justify-items: center; }
.cs2-panel .cs2-phones figure { display: flex; flex-direction: column; align-items: center; min-height: 0; min-width: 0; height: 100%; }
.cs2-panel .cs2-phones img { flex: 1 1 0; min-height: 0; width: auto; max-width: 100%; object-fit: contain; }
.cs2-panel .cs2-phones figcaption { flex: none; margin-top: 10px; color: var(--ink-soft); }
.cs2-panel .cs2-frame { height: 100%; width: auto; aspect-ratio: 728 / 1266; }
.cs2-panel .cs2-clip-btn { right: 12px; bottom: 12px; }

@media (max-width: 860px) {
  .cs2-slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 18px; height: auto; min-height: 100svh; }
  .cs2-slide__info { overflow: visible; }
  .cs2-slide__info h1, .cs2-slide__info h2 { margin-bottom: 10px; }
  .cs2-slide__problems { margin-top: 14px; padding-top: 12px; }
  .cs2-car__ctl { order: 3; padding-top: 14px; }
  .cs2-car { height: calc(100svh - 120px); min-height: 440px; }
}
/* landscape widgets (e.g. the volume swipes): keep them together at their own size */
.cs2-panel .cs2-phones--wide { grid-template-rows: auto; align-content: center; }
.cs2-panel .cs2-phones--wide figure { height: auto; }
.cs2-panel .cs2-phones--wide img { flex: none; width: 100%; height: auto; }

/* Experience: education */
.exp-edu { margin-top: clamp(48px, 7vw, 88px); }
.exp-edu__title { margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.exp-edu__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.exp-edu__list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.exp-edu__what { font-size: 17px; font-weight: 600; }
.exp-edu__where { font-size: 16px; color: var(--muted); }
@media (max-width: 860px) { .exp-edu__list li { grid-template-columns: minmax(0, 1fr); } }

/* About: the details table follows the text, with no divider above its first row */
@media (min-width: 861px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.about-facts { margin-top: 36px; }
.about-facts > div:first-child { border-top: 0; padding-top: 0; }

/* ---------- Home: opening line ---------- */
.intro { padding: clamp(40px, 8vw, 104px) var(--gutter) clamp(28px, 5vw, 64px); }
.intro__title span { display: block; text-wrap: balance; } /* two deliberate lines: the name, then the job; if the job doesn't fit, it splits evenly */
.intro__title {
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.035em;
}
.intro__link { text-decoration-line: none; } /* a link inside the headline is plain until hovered, like the project titles below it */
.intro__link:hover, .intro__link:focus-visible { color: inherit; text-decoration-line: underline; text-decoration-style: solid; }
.intro__link:focus-visible { outline-offset: 6px; border-radius: 4px; }


/* =========================================================
   INTERACTION SYSTEM: one set of rules for "this is tappable".

   1  Text link    One style for every link inside a string: a DOTTED underline, same weight scale,
                   same offset, same colour as the text around it. Hover: the underline turns solid and the
                   text goes muted. No other signal (no bold, no colour, no icon), whether the link stays
                   on the site or opens a new tab. One exception: a link inside the h1 is plain until
                   hovered (then underlined, colour unchanged), like the project titles on the same page.
   2  Link group   Header nav and footer links: no underline, because their position says "link".
                   Hover: muted. In the nav, an underline marks the current page ("you are here").
   3  Block link   A whole row is the target and ends in an arrow (→ stays here, ↗ leaves).
                   Hover and focus: the arrow nudges and the title is underlined.
   4  Button       Icon or text <button>, or an action link such as Email (copies the address and
                   says "Copied"). Hover: muted. Hit area is at least 44px on touch screens.
   5  Chip         OUTLINED pill = tappable (none on the site right now).
                   FILLED pill with no outline = a label (tags, "Before/After", panel names), never tappable.
   6  Disclosure   A row with a chevron that turns (Experience).

   Cursor: pointer on everything tappable, default elsewhere. The cursor dot grows on the same set.
   Focus: one ring (2px var(--focus)) on all of them.
   If you add a new interactive thing, it must fit one of these six. Don't invent a seventh.
   ========================================================= */

/* 1 · text links */
a:hover { color: var(--muted); text-decoration-style: solid; }

/* 2 · link groups (no underline) */
.index-nav__logo, .index-nav__links a, .footer__links a, .footer__now-playing { text-decoration: none; }
.index-nav__links a[aria-current="page"] { text-decoration: underline; text-decoration-style: solid; text-underline-offset: 5px; }

/* 3 · block links: colour stays put, the arrow and the title do the talking */
.work-list__item a:hover, .cs-next:hover { color: var(--fg); }
.cs-next > span[aria-hidden="true"] { color: var(--muted); transition: transform 0.25s ease, color 0.25s ease; }
.cs-next:hover > span[aria-hidden="true"], .cs-next:focus-visible > span[aria-hidden="true"] { transform: translateX(4px); color: var(--fg); }
.cs-next:hover .cs-next__title, .cs-next:focus-visible .cs-next__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.cs-next:focus-visible { outline-offset: -4px; }

/* 4 · buttons and actions */
.index-nav__theme:hover { opacity: 0.6; }
[data-copy-email] { position: relative; }
[data-copy-email] > span { transition: opacity 0.15s ease; }
[data-copy-email] .copy__done { position: absolute; left: 0; top: 0; white-space: nowrap; text-decoration: none; opacity: 0; } /* overlays, so the row never shifts */
[data-copy-email].is-copied .copy__label { opacity: 0; }
[data-copy-email].is-copied .copy__done { opacity: 1; }

/* cursor: pointer for tappable, nothing else */
a[href], button:not(:disabled), summary, [role="button"] { cursor: pointer; }
.vh-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* touch: every control reaches 44px without changing how it looks */
@media (pointer: coarse) {
  .index-nav__logo, .index-nav__links a, .index-nav__theme,
  .footer__links a, .footer__now-playing { position: relative; }
  .index-nav__logo::after, .index-nav__links a::after, .index-nav__theme::after,
  .footer__links a::after, .footer__now-playing::after { content: ""; position: absolute; inset: -12px -8px; }
  .cs2-clip-btn { width: 44px; height: 44px; }
  .exp-item summary { min-height: 44px; }
}

/* a device frame inside a Before/After pair (Bill 2.0): same frame, same controls as the íon clip,
   sized from the column width instead of the panel height */
.cs2-panel .cs2-phones .cs2-frame { flex: 0 0 auto; width: 100%; height: auto; margin: auto 0; }
.cs2-panel .cs2-phones .cs2-frame img { flex: none; width: 100%; height: auto; max-width: none; }

/* ---------- Case study: snippet pages (stats, quotes, a flow line, a dark stage) ---------- */
.cs2-stage .cs2-phones figcaption, .cs2-capped__caps { color: rgba(244, 244, 242, 0.62); }
.cs2-stage--dark .cs2-media { border-radius: 0; background: transparent; }
.cs2-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 64px); margin: 0; padding: 0; list-style: none; }
.cs2-survey__title { margin: 0 0 6px; font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.cs2-survey__cap { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.cs2-stats li { padding-top: 16px; border-top: 1px solid var(--border); }
.cs2-stats strong { display: block; margin-bottom: 10px; font-size: clamp(36px, 5vw, 72px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.cs2-stats span { font-size: 15px; line-height: 1.35; color: var(--muted); }
.cs2-quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 64px); }
.cs2-quote { margin: 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: clamp(18px, 1.9vw, 26px); line-height: 1.3; letter-spacing: -0.015em; }
.cs2-quote footer { margin-top: 12px; font-size: 14px; letter-spacing: 0; color: var(--muted); }
.cs2-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-size: clamp(22px, 3vw, 40px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.cs2-flow li + li::before { content: "\203A"; margin-right: 16px; color: var(--muted); }
.cs2-flow li.is-focus { font-weight: 600; }
@media (max-width: 860px) {
  .cs2-stats, .cs2-quotes { grid-template-columns: minmax(0, 1fr); }
}

/* Bill 2.0: two small charts stacked (an indexed line and share bars); same quiet style as the Address Scanner chart */
.cs2-datas { display: grid; gap: clamp(36px, 5vw, 64px); align-self: center; }
.cs2-data__xtick { font-size: calc(13px * var(--u, 1)); fill: color-mix(in srgb, var(--fg) 82%, var(--bg)); }
.cs2-bars__label { font-size: 14px; fill: var(--muted); }
.cs2-bars__bar { fill: var(--muted); }
.cs2-bars__bar--lead { fill: var(--fg); }
.cs2-bars__val { font-size: 14px; font-weight: 600; fill: var(--fg); }
.cs2-bars__bar { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); }
[data-reveal].is-visible .cs2-bars__bar { animation: cs2-grow 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards; }
.cs2-bars__val { opacity: 0; }
[data-reveal].is-visible .cs2-bars__val { animation: cs2-data-in 0.6s ease 0.9s forwards; }
@keyframes cs2-grow { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .cs2-bars__bar { transform: none; animation: none !important; }
  .cs2-bars__val { opacity: 1; animation: none !important; }
}
