/* =========================================================
   br-index.com — shared styles
   Values matched to the live Cargo site (br-index.com).
   ========================================================= */

/* ---------- Fonts ----------
   Font files go in /fonts. Until they are added, the fallbacks are used.
   Serif: Fraunces Italic (loaded from Google Fonts in each page's <head>)
   stands in for Gramercy until the licensed Gramercy files are added.
   To switch: add a Gramercy @font-face here, change --font-serif below,
   and remove the Google Fonts links from the page <head>. */
@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("../fonts/AlteHaasGroteskRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("../fonts/AlteHaasGroteskBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Color (live site) */
  --color-text: #000;
  --color-line: #000;
  --color-box: #fff;
  --color-media: #eee;
  --color-placeholder: #d4d4d4;
  --color-accent: #1f3fd8;
  --color-hover: #0d63ff;                /* card arrow hover blue (live site) */
  --color-hover-text: #fff;              /* content on a blue box hover */

  /* Motion */
  --hover-duration: 300ms;
  --draw-duration: 500ms;                /* hover oval pen-stroke */
  --oval-stroke: 2.5px;                  /* hover oval line thickness */
  --gradient-top: #fff;
  --gradient-bottom: #7cb0ff;

  /* Type families */
  --font-sans: "Alte Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --serif-axes: "SOFT" 100, "WONK" 1;    /* Fraunces, playful: soft rounded strokes and quirky letters on (tamed: "SOFT" 0, "WONK" 0) */

  /* Base unit. Like Cargo, everything scales with the window width:
     1 unit = 10px at a 1500px-wide window, 13.3px at 2000px.
     It never drops below 10px so text stays readable on small screens. */
  --u: max(0.6667vw, 10px);

  /* Type sizes */
  --text-nav: calc(var(--u) * 1.4);      /* "Brian Le" / "Index", same as other serif text */
  --text-small: calc(var(--u) * 1.4);    /* role, timeline, card text, labels */
  --text-serif: calc(var(--u) * 1.3);   /* one size for all small serif text: eyebrows, labels, headers, role lines (not quotes) */
  --text-display: max(2.45vw, 28px);     /* statement and big link lists (between card titles at 2vw and the live site's 2.9vw) */
  --text-card-title: max(2vw, 24px);     /* project card titles */
  --text-arrow-button: calc(var(--u) * 1.4);

  /* Line height and tracking */
  --leading-display: 1.15;
  --leading-card-title: 1;
  --leading-body: 1.4;
  --tracking-display: -0.02em;
  --tracking-serif: -0.01em;    /* serif italic is set slightly tighter than default */

  /* Font weights */
  --weight-regular: 400;
  --weight-bold: 700;
  --weight-serif-light: 350;             /* labels, company and address lines (live site uses 300) */
  --weight-serif-nav: 450;               /* top bar */

  /* Space */
  --page-gutter: calc(var(--u) * 2.4);   /* around and between boxes */
  --page-top: calc(var(--u) * 2.8);      /* below the top bar */
  --box-pad-x: calc(var(--u) * 3.6);
  --box-pad-y: calc(var(--u) * 3.2);
  --label-gap: var(--u);                 /* label to big list */
  --header-pad-y: var(--u);
  --header-pad-x: calc(var(--u) * 1.8);
  --pair-gap: calc(var(--u) * 1.2);

  /* Sizes */
  /* Rounded to a whole pixel, so the header's bottom line and anything that
     meets it (dropdown, Index panel) land on the same pixel row: no thick or
     doubled lines */
  --header-height: round(up, calc(var(--text-nav) * 1.4 + var(--header-pad-y) * 2 + 1px), 1px);
  --header-total: var(--header-height);
  --arrow-button-size: calc(var(--u) * 4);
  --thumb-size: calc(var(--u) * 14.8);

  /* Lines */
  --line: 1px solid var(--color-line);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: linear-gradient(to bottom, var(--gradient-top), var(--gradient-bottom)) fixed;
  background-color: var(--gradient-bottom);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile browsers can scroll a fixed background attachment with the page. */
@media (max-width: 800px), (hover: none) and (pointer: coarse) {
  body {
    background-image: none;
    isolation: isolate;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, var(--gradient-top), var(--gradient-bottom));
    pointer-events: none;
  }
}

h1, h2, h3, p, ul, dl, dd {
  margin: 0;
}

/* Avoid orphans (a lone word on the last line) in running text.
   Supported in current Chrome, Edge and Safari; other browsers wrap normally. */
p,
li,
dd,
blockquote,
.cs-caption {
  text-wrap: pretty;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

strong,
b {
  font-weight: var(--weight-bold);
}

.serif {
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-light);
}

/* Arrow icons (SVGs in images/icons, taken from the live Cargo site).
   Sized to the surrounding text, the same way Cargo places them. */
.icon {
  display: inline-block;
  height: 1.2em;
  width: auto;
  aspect-ratio: 1;
  margin-top: -1em;
  margin-bottom: -0.25em;
  vertical-align: baseline;
}

/* ---------- Hand-drawn hover oval ----------
   Add `data-oval` to any link (or card title) and js/main.js draws a blue
   pen-stroke oval around it. Hidden at rest; on hover it draws itself,
   and when the mouse leaves it disappears right away. Offsets match the live site. */
[data-oval] {
  position: relative;
  --oval-left: var(--u);
  --oval-right: var(--u);
  --oval-bottom: calc(var(--u) * 0.1);
}

.oval {
  position: absolute;
  top: calc(var(--oval-top, 0px) * -1);
  /* --oval-extra-x adds a little breathing room on both sides of every
     oval, on top of each element's own --oval-left / --oval-right */
  --oval-extra-x: 0.15em;
  left: calc((var(--oval-left) + var(--oval-extra-x)) * -1);
  width: calc(100% + var(--oval-left) + var(--oval-right) + var(--oval-extra-x) * 2);
  height: calc(100% + var(--oval-top, 0px) + var(--oval-bottom));
  overflow: visible;
  pointer-events: none;
}

.oval path {
  fill: none;
  stroke: var(--color-hover);
  stroke-width: var(--oval-stroke);
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: none;
}

a[data-oval].is-active .oval path, /* current section in the project menu */
.index-cell:hover .index-cell__title .oval path, /* Index panel entries */
.index-cell:focus-visible .index-cell__title .oval path,
.index-cell[aria-current="page"] .index-cell__title .oval path,
a[data-oval]:hover .oval path,
a[data-oval]:focus-visible .oval path,
a:hover > [data-oval] .oval path,
a:focus-visible > [data-oval] .oval path,
.work-card:has(.work-card__head:hover) .oval path,
.card:has(.card__link:hover) .oval path,
.card:has(.card__link:focus-visible) .oval path {
  stroke-dashoffset: 0;
  opacity: 1;
  transition: stroke-dashoffset var(--draw-duration) ease-in-out;
}

.index-overlay .index-cell .index-cell__title .oval path,
.work-browser__menu .index-cell .index-cell__title .oval path {
  stroke-dashoffset: 0;
  transition: opacity var(--hover-duration) ease;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
/* Header: full-width bar with a line underneath. Each link is its own
   cell, marked off by a vertical line, with equal space left and right.
   The whole bar is solid white.
   The home link (every page except the homepage) is a square cell holding
   a drawn glass orb. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  height: var(--header-height);
  background: var(--color-box);
  border-bottom: var(--line);
  --oval-stroke: 1.5px;
  --oval-closed: 1;
}

.site-header__link {
  display: flex;
  align-items: center;
  padding: 0 var(--header-pad-x);
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-nav);
  font-size: var(--text-serif);
  line-height: 1;
}

.site-header__home {
  border-right: var(--line);
}

/* "br-index/…" label on the left, in its own cell marked off by a
   vertical line (on phones it sits centered with no lines instead) */
.site-header__name {
  border-right: var(--line);
}

/* Section switcher: "design" types itself in on page load (the caret
   leaves once it's done; js/main.js).
   Hovering the label (or tapping it on a touch screen) drops down the other
   portfolios in a small box hanging from the header (its top edge shares
   the header's bottom line). It slides down from behind the header line;
   its edges stay drawn the whole way, because the clip moves with the box
   and only hides the part still tucked above the header line. */
.site-switch {
  --menu-open: 380ms;
  --menu-open-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --menu-close: 520ms;
  --menu-close-ease: cubic-bezier(0.65, 0, 0.35, 1);
  --oval-stroke: 1.5px;
  --oval-closed: 1;
  position: relative;
  display: flex;
}

.site-switch__menu {
  position: absolute;
  top: calc(100% + 1px); /* starts just below the header's line, which is its top edge */
  left: 0;
  z-index: 11;
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--color-box);
  border: var(--line);
  border-top: 0; /* the header's line is its top edge: no double line */
  border-left: 0; /* the page edge; avoids a stray line at the window's edge */
  transform: translateY(-100%);
  clip-path: inset(100% -1px -1px -1px); /* fully tucked above the header line */
  visibility: hidden;
  transition:
    transform var(--menu-close) var(--menu-close-ease),
    clip-path var(--menu-close) var(--menu-close-ease),
    visibility 0s linear var(--menu-close);
}

/* The label cell stretches to the width js/main.js gives the switcher
   (the widest of the portfolio names), so it matches the dropdown. */
.site-switch > .site-header__name {
  flex: 1 1 auto;
  white-space: nowrap;
}


.site-switch:hover .site-switch__menu,
.site-switch:focus-within .site-switch__menu,
.site-switch.is-open .site-switch__menu {
  transform: translateY(0);
  clip-path: inset(0 -1px -1px -1px);
  visibility: visible;
  transition:
    transform var(--menu-open) var(--menu-open-ease),
    clip-path var(--menu-open) var(--menu-open-ease),
    visibility 0s;
}

/* Touch screens: only a tap opens it (a tap leaves a sticky hover/focus
   behind, which would otherwise keep it open) */
@media (hover: none) {
  .site-switch:not(.is-open) .site-switch__menu {
    transform: translateY(-100%);
    clip-path: inset(100% -1px -1px -1px);
    visibility: hidden;
    transition:
      transform var(--menu-close) var(--menu-close-ease),
      clip-path var(--menu-close) var(--menu-close-ease),
      visibility 0s linear var(--menu-close);
  }
}

/* The section part of each "br-index/…" label is blue */
.site-section {
  color: var(--color-accent);
}

.site-switch__menu li {
  padding: 0;
}

.site-switch__menu li + li {
  border-top: var(--line);
}

.site-switch__menu a {
  display: block; /* fills the whole row, so the box hover fills it */
  padding: var(--header-pad-y) var(--header-pad-x);
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-nav);
  font-size: var(--text-serif);
  line-height: 1.4;
}

.site-switch__menu a[data-oval] {
  --oval-left: 0.5em;
  --oval-right: 0.5em;
}

/* Box hover: text in its own box fills the box blue and turns white.
   Used by both header buttons and the dropdown rows (instead of the oval). */
.site-header__link,
.site-switch__menu a {
  transition:
    background-color var(--hover-duration) ease,
    color var(--hover-duration) ease;
}

.site-header__link:not(.site-header__index):hover,
.site-header__index:has(> span:hover),
.site-header__index[aria-expanded="true"],
.site-header__link:focus-visible,
.site-switch__menu a:hover,
.site-switch__menu a:focus-visible {
  background: var(--color-hover);
  color: var(--color-hover-text);
}

.site-header__link:hover .site-section,
.site-header__link:focus-visible .site-section,
.site-switch__menu a:hover .site-section,
.site-switch__menu a:focus-visible .site-section {
  color: inherit;
}

.site-section {
  transition: color var(--hover-duration) ease;
}

.site-header .oval,
.site-switch__menu .oval {
  display: none; /* boxed text uses the box hover, not the oval */
}

.site-header__index {
  margin-left: auto; /* always on the right, even when it is the only cell */
  border-left: var(--line);
}

/* Home link: a square cell (as tall as the bar) with the orb centered in it */
.site-header__home {
  justify-content: center;
  width: calc(var(--header-height) - 1px);
  padding: 0;
}

/* Glass orb (drawn in CSS) in the header's home cell, on every page except
   the homepage. Modeled on the reference: a milky white rim, a blue core,
   a dark band of shadow across the top and a dark spot at the top right,
   and a fine shadowed edge so it reads clearly against the white bar.
   A soft glint swings around it and a second reflection pulses opposite.
   The motion stops for reduced-motion visitors. */
.orb {
  position: relative;
  display: block;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 20%, rgba(18, 28, 70, 0.6) 0%, rgba(18, 28, 70, 0.25) 12%, rgba(18, 28, 70, 0) 24%),
    radial-gradient(ellipse 75% 42% at 52% 4%, rgba(24, 38, 92, 0.55) 0%, rgba(24, 38, 92, 0.2) 45%, rgba(24, 38, 92, 0) 75%),
    radial-gradient(circle at 50% 56%, #6f9cf0 0%, #8bb0f3 26%, #b6cbf4 50%, #e2eaf6 72%, #f6f4ee 86%, #e6dccb 100%);
  box-shadow:
    inset 0 0 0 0.5px rgba(30, 45, 100, 0.35),
    inset 0 -1px 2px rgba(255, 255, 255, 0.9),
    inset 2px 0 3px rgba(30, 45, 100, 0.12),
    0 0 0 0.5px rgba(30, 45, 100, 0.18),
    0 1px 2px rgba(20, 40, 110, 0.15);
}

/* Hover: the orb brightens with chrome-like contrast (still blue, so it
   stays visible on the white bar) and a soft blue glow around it */
.orb {
  transition: filter 300ms ease;
}

.site-header__home:hover .orb,
.site-header__home:focus-visible .orb {
  filter: brightness(1.08) contrast(1.55) saturate(0.7)
          drop-shadow(0 0 5px rgba(13, 99, 255, 0.55))
          drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
}

/* The swinging glint */
.orb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 10%, rgba(255, 255, 255, 0.25) 22%, rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0) 42%);
  filter: blur(0.6px);
  animation: orb-glint 4s ease-in-out infinite;
}

/* A second reflection that pulses on the opposite side */
.orb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 78%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.3) 18%, rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0) 46%);
  filter: blur(0.6px);
  animation: orb-breathe 2s ease-in-out infinite;
}

@keyframes orb-glint {
  0%   { rotate: 0deg; }
  50%  { rotate: -150deg; }
  100% { rotate: 0deg; }
}

@keyframes orb-breathe {
  0%, 100% { opacity: 0.1; }
  50%      { opacity: 1; }
}

.site-header__home:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -4px;
}

.site-header__link [data-oval] {
  display: inline-block;
  text-box: trim-both cap alphabetic;
  /* taller hover oval: the text box is trimmed to cap height, so give it room */
  --oval-top: 0.45em;
  --oval-bottom: 0.45em;
  --oval-left: 0.6em;
  --oval-right: 0.6em;
}

/* ---------- Boxes ---------- */
.box {
  position: relative;
  background: var(--color-box);
  border: var(--line);
}

.box__section {
  padding: var(--box-pad-y) var(--box-pad-x);
}

.box__section + .box__section {
  border-top: var(--line);
}

.placeholder {
  background: var(--color-placeholder);
}

/* Two sub-columns used in the role, timeline and card header.
   The second column starts a little left of center, as on the live site. */
.pair {
  display: grid;
  grid-template-columns: 5fr 7fr;
  column-gap: var(--pair-gap);
}

/* Role box: the address column starts where the right-hand text does in the
   project cards below (half the box width, plus the box padding). Two equal
   columns with a gap of twice the side padding land there; the extra 2px
   makes up for the card's 1px divider line. */
.box__section.pair,
.timeline .pair {
  grid-template-columns: 1fr 1fr;
  column-gap: calc(var(--box-pad-x) * 2 + 2px);
}

/* Role box only: a vertical divider down the middle, in the same place as
   the divider in the project card headers. */
.box__section.pair {
  position: relative;
}

.box__section.pair::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: var(--line);
}

/* Project card objective: hidden under the left (title) cell, it slides
   down over the image when the card header is hovered or focused. */
.card__link .work-card__cell {
  position: relative;
}

/* Homepage project cards: top and bottom padding a little under the side
   padding, since the italic eyebrow label already adds visual space on top
   (the Objective panel inherits this too). */
.work-card__head:has(.card__objective) .work-card__cell {
  padding-top: calc(var(--box-pad-x) * 0.8);
  padding-bottom: calc(var(--box-pad-x) * 0.8);
}

/* Description: always 2 lines, cut off with "…" */
/* Higher specificity so this beats the generic .work-card__cell padding.
   The right padding keeps the text a box-padding's width away from the
   arrow box's left edge. */
.work-card__cell.card__desc-cell {
  padding-right: calc(var(--arrow-button-size) + var(--box-pad-x) * 0.5);
}

.card__desc-cell .card__desc {
  text-box: normal; /* same line spacing as the full text in the hover box
                       (beats the older trim rule further down this file) */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Full description: a white box with a 1px line that covers the cell and
   slides down over the image on hover. At rest it's hidden and exactly
   the cell's height (max-height: 100%). */
.card__objective {
  position: absolute;
  z-index: 3;
  top: -1px;
  left: -1px;  /* sits on the divider line */
  right: -1px; /* sits on the card's outer line */
  height: calc(100% + 2px);
  overflow: hidden;
  padding: inherit;
  background: var(--color-box);
  border: var(--line);
  opacity: 0;
  pointer-events: none;
  /* on the way back up, stay visible until the slide finishes */
  transition: height 300ms ease-in, opacity 0s linear 300ms;
}

.card__link:hover .card__objective,
.card__link:focus-visible .card__objective {
  height: var(--open-h, auto); /* the box's full height, measured by js/main.js */
  opacity: 1;
  /* eases out with a slight overshoot, then settles */
  transition: height 420ms cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0s;
}

/* Timeline in the hover box, under the objective */
.card__timeline-label {
  margin-top: var(--text-small);
}

/* Homepage cards: the title is a little larger (the largest that keeps the
   longest title on one line). Same gap under its label as the right side. */
.card:has(.card__objective) .work-card__title {
  font-size: calc(var(--text-card-title) * 0.76); /* same size as the ceramics card titles on phones */
  margin-top: 2px; /* the description's taller lines add ~2px above its letters; match it */
}

@media (min-width: 801px) {
  /* on desktop: between the ceramics card size (0.66) and the old size (0.85) */
  .card:has(.card__objective) .work-card__title {
    font-size: calc(var(--text-card-title) * 0.75);
  }
}

/* Arrow button stays above everything */
.card__arrow {
  z-index: 4;
}

/* Project titles on the homepage and ceramics cards: bold */
.card .work-card__title {
  font-weight: var(--weight-bold);
}

/* Ceramics cards (the ones with a photo gallery): title and year a tad
   larger than the details on the ceramics project pages */
.work-card:has(.work-gallery, .work-mosaic) .work-card__title,
.work-card:has(.work-gallery, .work-mosaic) .work-card__value {
  font-size: calc(var(--text-card-title) * 0.76);
}

@media (min-width: 801px) {
  .work-card:has(.work-gallery, .work-mosaic) .work-card__title,
  .work-card:has(.work-gallery, .work-mosaic) .work-card__value {
    font-size: calc(var(--text-card-title) * 0.66);
  }
}

/* Ceramics cards (.work-card--mosaic), in the mobile detail format.
   Top strip: title on the left; year and materials on the right as
   unlabeled lines in the small serif (year heavier). Then a photo grid.
   It is complete on its own: no link or arrow.
   The grid matches the original Persimmons card: an 8 : 3 column split,
   so each piece gets one large photo on the left with two detail squares
   stacked beside it (the same proportions as .work-gallery). The group
   photo runs the full width. The 1px gaps show the black
   background, and the grid draws only the line above itself, so no edge
   is doubled. */
.work-mosaic {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  gap: 1px;
  background: var(--color-line);
  border-top: var(--line);
}

.work-mosaic img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Full-width photo keeps the shape of the group photo */
.work-mosaic img.work-mosaic__wide {
  grid-column: 1 / -1;
  aspect-ratio: 1720 / 1256;
}

/* The large photo fills whatever the two detail squares beside it
   measure; contain: size stops its own shape from making the rows taller */
.work-mosaic img.work-mosaic__main {
  grid-column: 1;
  grid-row: span 2;
  aspect-ratio: auto;
  contain: size;
}

/* The works (ceramics home): one box with a strip on top ("Selected
   works" and 2x / 3x / 4x), then a grid of square hero photos, each a link
   to its work's page.

   Lines: the box draws the outer line and the strip draws the line under
   itself; the 1px gaps in the grid show the black background. So no edge
   is ever doubled.

   Spacing (all visible gaps, measured from the ink, not the text box):
   the space left of, above and below "Archive" is equal, and the
   circles sit as far from the right edge as from the strip's top and
   bottom. */
.work-browser {
  --wb-t: calc(var(--text-card-title) * 0.85); /* title size */
  --wb-n: var(--text-serif);                    /* number size */
}

/* Empty cells at the end of the grid show the page gradient, with no line
   around them. So this box has no white fill and no right or bottom line
   of its own (the space for them stays, so nothing shifts): the two strips
   are white and draw the right edge beside themselves, and the photos draw
   the right and bottom edges beside themselves. The extra shadow on the
   top strip also fills the box's top-right corner pixel. */
.box.work-browser {
  background: none;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

.work-browser__bar,
.work-browser__sub {
  background: var(--color-box);
  box-shadow: 1px 0 0 var(--color-line); /* the box's right edge, beside this strip */
}

.work-browser__bar {
  display: flex;
  align-items: center;
  border-bottom: var(--line);
  box-shadow: 1px 0 0 var(--color-line), 1px -1px 0 var(--color-line);
}

/* The first row of tiles draws the shared edge when the grid is flush. */
.work-browser__bar:has(+ .work-squares),
.work-browser__head:has(> #ceramics-archive-menu) > .work-browser__bar {
  border-bottom: 0;
}

/* "Archive": light italic serif. The line box adds 0.176em above
   the capitals and 0.194em below the letters, and the "S" starts 0.029em
   in, so the padding subtracts those to make the visible gaps equal. */
.work-browser__title {
  --wb-gap: calc(var(--box-pad-y) * 0.6 + 0.176em); /* the visible gap */
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding:
    calc(var(--wb-gap) - 0.176em)
    0
    calc(var(--wb-gap) - 0.194em)
    calc(var(--wb-gap) - 0.029em);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-variation-settings: var(--serif-axes), "opsz" 22; /* fixed optical size, so the ink offsets above hold at every size */
  letter-spacing: var(--tracking-serif);
  font-size: var(--wb-t);
  line-height: 1.1;
}

/* Right: 2x / 3x / 4x as small italic serif numbers, centered in round
   buttons 2em across. The strip is 1.2 x pad-y + 1.082 x title size tall,
   so the right padding below puts the circles' edge as far from the right
   side as from the strip's top and bottom. */
.work-browser__cols {
  display: flex;
  flex: 0 0 auto;
  gap: calc(var(--wb-n) * 0.35);
  padding-right: calc(var(--box-pad-y) * 0.6 + var(--wb-t) * 0.541 - var(--wb-n));
}

.work-browser__cols button {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.work-browser__cols button:focus-visible {
  outline: none;
}

.work-browser__num {
  display: grid;
  place-items: center;
  width: calc(var(--wb-n) * 2);
  height: calc(var(--wb-n) * 2);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-serif-light); /* same as "Objects:" */
  font-variation-settings: var(--serif-axes);
  letter-spacing: var(--tracking-serif);
  font-size: var(--wb-n);
  line-height: 1;
  padding-bottom: 0.07em; /* lifts the digits a hair so their ink sits dead center */
  box-sizing: border-box;
  /* the blue circle: exactly the button's round box, a closed loop */
  --oval-stroke: 1.5px;
  --oval-closed: 1;
  --oval-left: 0px;
  --oval-right: 0px;
  --oval-top: 0px;
  --oval-bottom: 0px;
}

.work-browser__num .oval {
  --oval-extra-x: 0px;
}

/* The circle marks the current size, and whichever one is hovered or
   keyboard-focused; while another is hovered, the current one lets go */
.work-browser__cols button[aria-pressed="true"] .oval path,
.work-browser__cols button:hover .oval path,
.work-browser__cols button:focus-visible .oval path {
  stroke-dashoffset: 0;
  opacity: 1;
  transition: stroke-dashoffset var(--draw-duration) ease-in-out;
}

.work-browser__cols:has(button:hover) button[aria-pressed="true"]:not(:hover) .oval path,
.work-browser__cols:has(button:focus-visible) button[aria-pressed="true"]:not(:focus-visible) .oval path {
  stroke-dashoffset: 1;
  opacity: 0;
  transition: none;
}

/* Sub strip under "Archive": "Objects: 006" on the left, 2x / 3x / 4x
   on the right (their circles sit as far from the right edge as from the
   strip's top and bottom). All in the sans. It draws only the line under itself (the box draws the
   sides), so no edge is doubled. The insets match the strip above. */
.work-browser__sub {
  --wbs-gap: calc(var(--box-pad-y) * 0.6);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--wbs-gap);
  padding: calc(var(--box-pad-y) * 0.45) var(--wbs-gap); /* a little less above and below */
  border-bottom: var(--line);
  font-size: var(--text-serif);
  line-height: 1.3;
}

.work-browser__facts {
  margin: 0;
}

.work-browser__key,
.work-browser__objects,
.work-browser__sort {
  font-family: var(--font-sans);
}

/* " / Curated sequence" (Curated) or " / Newest first" (Chronological),
   after the count. The slash is in the label serif, with a little space
   on each side. */
.work-browser__sep {
  margin: 0 0.4em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-variation-settings: var(--serif-axes);
}

/* 2x / 3x / 4x in the sub strip: its padding already sets the gap */
.work-browser__sub .work-browser__cols {
  padding-right: 0;
}

/* Chronological / Curated (top strip, right): italic serif words, like
   2x / 3x / 4x; the blue circle marks the current order and moves to
   whichever one is hovered. The right padding is the title's gap plus room
   for the circle around "Curated". */
.work-browser__order {
  display: flex;
  flex: 0 0 auto;
  gap: calc(var(--u) * 1.6);
  padding-right: calc(var(--box-pad-y) * 0.6 + 0.65em);
  padding-left: var(--box-pad-y);
  font-size: var(--text-serif);
  line-height: 1.3;
}

.work-browser__order button {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-serif-light); /* same as "Objects:" */
  font-variation-settings: var(--serif-axes);
  letter-spacing: var(--tracking-serif);
  cursor: pointer;
}

.work-browser__order button:focus-visible {
  outline: none;
}

.work-browser__opt {
  display: inline-block;
  --oval-stroke: 1.5px;
  --oval-closed: 1;
  --oval-left: 0.5em;
  --oval-right: 0.5em;
  --oval-top: 0.3em;
  --oval-bottom: 0.3em;
}

.work-browser__order button[aria-pressed="true"] .oval path,
.work-browser__order button:hover .oval path,
.work-browser__order button:focus-visible .oval path {
  stroke-dashoffset: 0;
  opacity: 1;
  transition: stroke-dashoffset var(--draw-duration) ease-in-out;
}

.work-browser__order:has(button:hover) button[aria-pressed="true"]:not(:hover) .oval path,
.work-browser__order:has(button:focus-visible) button[aria-pressed="true"]:not(:focus-visible) .oval path {
  stroke-dashoffset: 1;
  opacity: 0;
  transition: none;
}

/* The grid. Each photo draws a 1px line around itself, out into the 1px
   gap, so neighbors share one line and the outer lines land right on the
   box's own edges (one line, not two). Empty cells at the end of the last
   row are left blank: no fill, no lines, so the page gradient shows. */
.work-squares {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
}

.work-squares[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-squares[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-squares img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.work-squares__item {
  position: relative;
  display: block;
  margin: 0;
  background: var(--color-box);
  box-shadow: 0 0 0 1px var(--color-line); /* a crisp 1px line, not a soft shadow */
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) .work-squares__item--highlight {
  grid-column: span 2;
  grid-row: span 2;
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) .work-squares__item--highlight-left {
  grid-area: 1 / 1 / span 2 / span 2;
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) .work-squares__item--highlight-right {
  grid-area: 3 / -3 / span 2 / -1;
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) .work-squares__item--highlight-third {
  grid-area: 5 / 1 / span 2 / span 2;
}

/* Spring and Algae fill the two cells beside the Phalaenopsis Jar. */
.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) > [data-popup-id="ritual-in-spring"] {
  grid-area: 5 / 3;
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) > [data-popup-id="ritual-in-algae"] {
  grid-area: 6 / 3;
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) .work-squares__item--highlight::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.work-squares:not([data-order="random"]):is(.work-squares--ceramics, [data-cols="3"], [data-cols="4"]) .work-squares__item--highlight img {
  position: absolute;
  inset: 0;
  height: 100%;
}

.work-squares--ceramics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Keyboard focus: the caption shows (below) instead of an outline */
a.work-squares__item:focus-visible {
  outline: none;
}

/* Hover caption: a small black box with white text, flush in the photo's
   bottom-left corner. One line: the title in bold sans-serif with a comma,
   then the year in the serif. Small type. Shows on hover and on keyboard
   focus; fades in and out quickly. */
.work-squares__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: calc(var(--u) * 0.6) calc(var(--u) * 1.5) calc(var(--u) * 0.75);
  background: none; /* no background */
  color: var(--color-text); /* black */
  font-size: calc(var(--u) * 1);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.work-squares__name {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-display);
}

.work-squares__year {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-regular);
  font-variation-settings: var(--serif-axes);
  letter-spacing: var(--tracking-serif);
}

.work-squares__item:hover .work-squares__caption,
.work-squares__item:focus-visible .work-squares__caption {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .work-squares__caption {
    transition: none;
  }
}

/* Orchid grid: names always show in a full-width box under each photo,
   split from the photo by a 1px divider (only on pages with
   data-captions="below") */
.work-squares[data-captions="below"] .work-squares__caption {
  position: static;
  display: block;
  width: 100%;
  padding: calc(var(--u) * 0.6) calc(var(--u) * 0.9);
  background: var(--color-box);
  border-top: 1px solid var(--color-line);
  color: var(--color-text);
  white-space: nowrap; /* one line only: a long name ends in "…" */
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
}

.theme-dark .work-squares[data-captions="below"] .work-squares__caption {
  background: var(--color-box);
}

/* Orchid names: light serif italic, like the other small labels */
.work-squares[data-captions="below"] .work-squares__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-variation-settings: var(--serif-axes);
  letter-spacing: var(--tracking-serif);
}

/* Unlabeled notes in the small serif (the label style); the year is
   heavier */
.work-card__label.work-card__note {
  margin-bottom: 0;
}

.work-card__label.work-card__note--year {
  margin-bottom: calc(var(--text-small) * 0.3);
  font-weight: 600;
}

/* Card years (ceramics): regular sans-serif, not italic serif */
.work-card__value.work-card__year {
  display: inline-block; /* lets the long oval end right after the years */
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: var(--weight-regular);
  font-variation-settings: normal;
  letter-spacing: var(--tracking-display);
}

/* ---------- Homepage layout ---------- */
/* Design homepage only: body text a touch smaller than the project pages
   (13px vs 14px at a 1440px-wide window), so the boxes feel roomier. */
.home--design {
  --text-small: calc(var(--u) * 1.3);
  font-size: var(--text-small);
}

.home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--page-gutter);
  align-items: start;
  padding: var(--page-top) var(--page-gutter) var(--page-gutter);
}

/* Left column stays in place and fills the window height (with a gap at the
   bottom) while the right column scrolls past it. */
.home__left {
  position: sticky;
  top: calc(var(--header-total) + var(--page-top));
  height: calc(100vh - var(--header-total) - var(--page-top) - var(--page-gutter));
  overflow-y: auto; /* only scrolls if the window is too short to fit it */
  display: flex;
  flex-direction: column;
}

.home__left > .box__section:last-child {
  flex: 1;
}

.home__right {
  display: flex;
  flex-direction: column;
  gap: var(--page-gutter);
}

/* Ceramics / Orchids pages: the right column is as tall as the left one,
   and the (for now empty) subject box fills whatever is left */
.home__right:has(.subject) {
  min-height: calc(100vh - var(--header-total) - var(--page-top) - var(--page-gutter));
}

.subject {
  flex: 1 0 auto;
}

/* Big statement and link lists */
.statement,
.link-list {
  font-size: var(--text-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

/* Typing intro (see js/main.js). Hidden until the script is ready,
   so the full sentence never flashes before typing starts. */
.js [data-type-in]:not(.is-ready) {
  visibility: hidden;
}

.type-char {
  position: relative;
  opacity: 0;
}

.type-char.is-shown {
  opacity: 1;
}

/* The key phrase in each page's own intro line ("designer", "ceramic artist",
   "grows orchids") gets the blue oval drawn around it once typing finishes,
   like the active state on links. It isn't a link. */
.intro-mark {
  position: relative;
  display: inline-block;
  --oval-closed: 1; /* a clean closed loop, no overlap */
  --oval-left: 0.22em;
  --oval-right: 0.3em;
  --oval-top: 0.02em;
  --oval-bottom: 0.08em;
}

/* This oval keeps its original width: no extra side room */
.intro-mark .oval {
  --oval-extra-x: 0px;
}

.intro-mark.is-drawn .oval path {
  stroke-dashoffset: 0;
  opacity: 1;
  transition: stroke-dashoffset var(--draw-duration) ease-in-out;
}

.type-char.is-caret::after {
  content: "";
  position: absolute;
  top: 0.12em;
  bottom: 0.02em;
  right: -0.08em;
  width: 2px;
  background: var(--color-hover);
}

.type-char.is-done::after {
  animation: caret-blink 1000ms steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.statement {
  max-width: 11.5em; /* wide enough that every intro line fits in 3 lines */
}

/* Preserve the authored line breaks before and after the typing script. */
.statement--ceramics,
.statement--orchids {
  max-width: 14em;
  white-space: pre-line;
  text-wrap: balance;
}

.home--design .statement br {
  display: none;
}

/* Fit each intro's three lines to the available width on phones. */
@media (max-width: 800px) {
  .statement {
    --statement-line-width: 11.6;
    max-width: none;
    font-size: min(var(--text-display), calc((100vw - 2 * (var(--page-gutter) + var(--box-pad-x) + 1px)) / var(--statement-line-width)));
    white-space: pre-line;
  }

  .statement--ceramics {
    --statement-line-width: 12.6;
  }

  .statement--orchids {
    --statement-line-width: 13.8;
  }

  .home--design .statement br {
    display: inline;
  }
}


/* Homepage serif (labels, company and address lines): a touch bigger */
.home .label,
.home .serif {
  font-size: var(--text-serif);
}

.label {
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-size: var(--text-serif);
  line-height: var(--leading-body);
  margin-bottom: var(--label-gap);
}

.link-list a {
  display: inline-block;
  white-space: nowrap; /* the arrow and its word never split onto two lines */
}

.link-list .link-list__arrow {
  height: 0.9em;
  margin-right: 0.12em;
}

/* Arrows inside year ranges (timeline and card years): 10% smaller, with the
   bottom margin adjusted so they stay centered on the numbers */
.timeline dd .icon,
.work-card__value .icon {
  height: 1.08em;
  margin-bottom: -0.19em;
}

/* Related entries with thumbnail */
.related {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--page-gutter);
}

/* The links keep their full width; when space runs short (e.g. tablets),
   the orb photo shrinks instead of the links wrapping */
.related > div {
  flex: 0 0 auto;
}

.related__thumb {
  flex-shrink: 0;
  display: block;
  width: var(--thumb-size);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: var(--line);
}

/* Orb photo with a live highlight: a soft light drawn on top of the glass
   orb in the photo, clipped to the orb's circle. js/main.js moves it
   (--hx, --hy) so the highlight leans toward the mouse, like light
   shifting across glass. --orb-x/y/r mark where the orb sits in the photo. */
.orb-photo {
  /* the orb's outline in the photo, measured from the image: it's a touch
     taller than wide, so it has a width radius and a height radius */
  --orb-x: 52%;
  --orb-y: 51.25%;
  --orb-r: 20.75%;   /* width radius */
  --orb-ry: 21%;     /* height radius */
  --hx: 45.8%; /* starting/resting highlight: a little left of center, on the middle line */
  --hy: 51.25%;
  --pink: 0.4; /* 0 = white highlight, 1 = pink; rises as it moves toward either side (js/main.js) */
  /* Curved highlight (js/main.js updates these as it moves): the light is
     drawn as an arc that bends like the orb's surface. --hr is how tightly
     it curves (tighter near the edge), --hcx where that curve is centered,
     --ht its thickness, --fs how much it's squeezed sideways near the edge. */
  --hr: calc(100cqw * 0.692); /* cqw: sized from the photo's actual width, so it scales when the photo shrinks */
  --hcx: 114.9%;
  --ht: calc(100cqw * 0.057);
  --fs: 0.954;
  --hl-g: calc(255 - 80 * var(--pink));
  --hl-b: calc(255 - 45 * var(--pink));
  position: relative;
  isolation: isolate; /* keeps the light layers and their blending inside the photo */
  container-type: inline-size;
  flex: 0 1 auto; /* may shrink (never grow) to make room for the links */
  min-width: 0;
  display: block;
  width: var(--thumb-size);
}

.orb-photo .related__thumb {
  width: 100%;
}

.orb-photo__light {
  position: absolute;
  inset: 1px; /* inside the photo's border */
  pointer-events: none;
  z-index: 2;
  clip-path: ellipse(var(--orb-r) var(--orb-ry) at var(--orb-x) var(--orb-y));
  /* Layers, top first. Normal blending (not screen) so the shade can darken
     the far side too; the contrast between the two makes the light read. */
  background:
    /* soft bright glow at the center of the light. Three faint, feathered
       ovals of different sizes, slightly offset from each other, so the
       brightest part spreads out unevenly instead of forming one round spot.
       They narrow as they near the edge, like shapes seen on a curve. */
    radial-gradient(ellipse calc(7% * var(--fs)) 8.5% at calc(var(--hx) - 1.2% * var(--fs)) calc(var(--hy) - 1.8%),
      rgb(255 255 255 / 0.28) 0%,
      rgb(255 255 255 / 0.16) 35%,
      rgb(255 255 255 / 0.05) 70%,
      rgb(255 255 255 / 0) 100%),
    radial-gradient(ellipse calc(5% * var(--fs)) 6.5% at calc(var(--hx) + 1.4% * var(--fs)) calc(var(--hy) + 1.4%),
      rgb(255 255 255 / 0.22) 0%,
      rgb(255 255 255 / 0.12) 40%,
      rgb(255 255 255 / 0) 100%),
    radial-gradient(ellipse calc(10% * var(--fs)) 7% at calc(var(--hx) + 0.4% * var(--fs)) calc(var(--hy) - 0.4%),
      rgb(255 255 255 / 0.14) 0%,
      rgb(255 255 255 / 0.06) 50%,
      rgb(255 255 255 / 0) 100%),
    /* thin bright reflection near the far rim */
    radial-gradient(circle at calc(var(--orb-x) * 2.04 - var(--hx) * 1.04) calc(var(--orb-y) * 2 - var(--hy)),
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 255, 255, 0.1) 6%,
      rgba(255, 255, 255, 0) 12%),
    /* soft blue shade that deepens away from the light */
    radial-gradient(circle at var(--hx) var(--hy),
      rgba(30, 50, 130, 0) 0%,
      rgba(30, 50, 130, 0) 16%,
      rgba(30, 50, 130, 0.16) 32%,
      rgba(30, 50, 130, 0.28) 44%);
}

/* Main highlight: a broad band of light that bends with the orb's surface.
   It's an arc of a circle (size --hr), so near the middle it's nearly
   straight and near the edge it curves to follow the rim. The mask fades
   its ends so it reads as a soft wash. Its color shifts from white toward
   pink as --pink rises (toward either side). */
.orb-photo__light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle var(--hr) at var(--hcx) var(--hy),
    rgb(255 var(--hl-g) var(--hl-b) / 0) calc(var(--hr) - var(--ht) * 2.2),
    rgb(255 var(--hl-g) var(--hl-b) / 0.2) calc(var(--hr) - var(--ht)),
    rgb(255 var(--hl-g) var(--hl-b) / 0.6) var(--hr),
    rgb(255 var(--hl-g) var(--hl-b) / 0.2) calc(var(--hr) + var(--ht)),
    rgb(255 var(--hl-g) var(--hl-b) / 0) calc(var(--hr) + var(--ht) * 2.2));
  -webkit-mask-image: radial-gradient(ellipse calc(20% * var(--fs)) 21% at var(--hx) var(--hy), #000 0%, rgb(0 0 0 / 0.6) 45%, transparent 100%);
  mask-image: radial-gradient(ellipse calc(20% * var(--fs)) 21% at var(--hx) var(--hy), #000 0%, rgb(0 0 0 / 0.6) 45%, transparent 100%);
}

/* Light that reaches the background, behind and around the orb:
   a bright patch of light focused through the glass into its shadow
   (a caustic), and a faint wash on the backdrop on the side the light
   comes from. Masked out where the orb is. js/main.js sets --cx/--cy/--lx. */
.orb-photo::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 11% 3.2% at var(--cx, 55.4%) var(--cy, 72%),
      rgb(255 var(--hl-g) var(--hl-b) / 0.75) 0%,
      rgb(255 var(--hl-g) var(--hl-b) / 0.28) 50%,
      rgb(255 var(--hl-g) var(--hl-b) / 0) 100%),
    radial-gradient(ellipse 42% 60% at var(--lx, 33.3%) 42%,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0) 100%);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-ry) at var(--orb-x) var(--orb-y), transparent 98%, #000 100%);
  mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-ry) at var(--orb-x) var(--orb-y), transparent 98%, #000 100%);
}

/* Soft extra shadow under the orb that slides away from the light (opposite
   the mouse), on top of the shadow already in the photo. It's masked out
   where the orb is, so it only ever darkens the surface it rests on.
   js/main.js sets --sx/--sy. */
.orb-photo::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 27% 8% at var(--sx, 57.6%) var(--sy, 72.4%),
    rgba(20, 30, 80, 0.42) 0%,
    rgba(20, 30, 80, 0.18) 45%,
    rgba(20, 30, 80, 0) 100%);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-ry) at var(--orb-x) var(--orb-y), transparent 98%, #000 100%);
  mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-ry) at var(--orb-x) var(--orb-y), transparent 98%, #000 100%);
}

/* Timeline */
.timeline {
  line-height: 1.5; /* a touch more space between lines than the body text */
}

.timeline dd {
  white-space: nowrap;
}

/* ---------- Project card ---------- */
.card {
  overflow: hidden;
}

.card {
  container-type: inline-size; /* lets the header respond to the card's own width */
}

/* Title and description line up at the top of their letters (cap height),
   not the top of their line boxes, so different sizes still align exactly. */
.card__title,
.card__desc {
  text-box: trim-start cap alphabetic;
}

.card__header {
  align-items: start;
  padding-right: calc(var(--box-pad-x) + var(--arrow-button-size) / 2);
}

.card__title {
  position: relative;
  justify-self: start; /* hug the text so the oval fits around it */
  font-size: var(--text-card-title);
  font-weight: var(--weight-regular);
  line-height: var(--leading-card-title);
  letter-spacing: var(--tracking-display);
}

/* Card titles: a generous oval with plenty of room around the title */
.card__title[data-oval] {
  --oval-top: 0.35em;
  --oval-bottom: 0.35em;
  --oval-left: 0.5em;
  --oval-right: 0.65em;
}

.card__image {
  display: block;
  width: 100%;
  height: auto;
  border-top: var(--line);
}

/* Ceramic work cards (ceramics page): a row of labeled cells across the
   top (title of work, year) divided by a vertical line, then the photo.
   Small serif label above a large value, like the reference. */
/* Three-image grid in a work card: a large photo on the left (spanning both
   rows) and two square photos stacked on the right. No gaps; single 1px
   lines between the photos (never doubled). The column split keeps the
   right-hand photos square: left 8 parts, right 3 parts, overall 11:6. */
.work-gallery {
  display: grid;
  grid-template-columns: 8fr 3fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 11 / 6;
  border-top: var(--line);
}

.work-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.work-gallery__main {
  grid-row: 1 / span 2;
  border-right: var(--line);
}

.work-gallery img:nth-child(2) {
  border-bottom: var(--line);
}

/* Two equal cells divided by a centered vertical line, with a little less
   padding top and bottom than the other boxes. Used for the work cards on
   the ceramics page. */
.work-card__head {
  display: grid;
  grid-template-columns: 1fr 1fr; /* divider centered */
}

.work-card__cell {
  padding: calc(var(--box-pad-y) * 0.6) var(--box-pad-x);
}

/* Ceramic project cards: the same padding on all four sides, with a little
   more on the left */
.card.work-card .work-card__cell {
  padding: calc(var(--u) * 2);
  padding-left: calc(var(--u) * 2.8);
}

.work-card__cell + .work-card__cell {
  border-left: var(--line);
}

.work-card__label {
  margin-bottom: calc(var(--text-small) * 0.3);
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-size: var(--text-serif);
  line-height: 1.2;
}

.work-card__title,
.work-card__value {
  font-size: calc(var(--text-card-title) * 0.85);
  line-height: var(--leading-card-title);
  letter-spacing: var(--tracking-display);
}

.work-card__title,
.work-card__value {
  font-weight: var(--weight-regular);
}

.work-card__title {
  display: inline-block; /* lets the hover oval hug the title */
}

/* A roomy oval around the work title */
.work-card__title[data-oval] {
  --oval-top: 0.45em;
  --oval-bottom: 0.45em;
  --oval-left: 0.75em;
  --oval-right: 0.75em;
}

/* Small square arrow button */
.arrow-button {
  display: grid;
  place-items: center;
  width: var(--arrow-button-size);
  height: var(--arrow-button-size);
  background: var(--color-box);
  border: var(--line);
  font-size: var(--text-arrow-button);
  line-height: 1;
}

.arrow-button .icon {
  margin: 0;
}

.card__arrow {
  position: absolute;
  top: -1px;
  right: -1px;
}

/* The whole top section (title + description) is the link */
.card__link {
  cursor: pointer;
}

/* Let hover pass through the arrow box to the link underneath */
.card__arrow {
  pointer-events: none;
}

.card__link:focus-visible {
  outline: none;
}

.card:has(.card__link:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Card hover (matches live site): arrow box turns blue,
   arrow turns white and rotates to point right */
.card__arrow,
.card__arrow .icon {
  transition:
    background-color var(--hover-duration) ease,
    filter var(--hover-duration) ease,
    rotate var(--hover-duration) ease;
}

.work-card:has(.work-card__head:hover) .card__arrow,
.card:has(.card__link:hover) .card__arrow,
.card:has(.card__link:focus-visible) .card__arrow {
  background-color: var(--color-hover);
}

.work-card:has(.work-card__head:hover) .card__arrow .icon,
.card:has(.card__link:hover) .card__arrow .icon,
.card:has(.card__link:focus-visible) .card__arrow .icon {
  filter: invert(1);
  rotate: 45deg;
}

/* When a card gets narrow, stack the title above the description */
@container (max-width: 600px) {
  .card__header {
    grid-template-columns: 1fr;
    row-gap: calc(var(--u) * 1.6);
  }
}

/* =========================================================
   Case study pages (projects/*.html)
   Values matched to the live Cargo case studies. On Cargo, 1rem there is
   about 1.17 of our base units (--u), so --cs-rem converts their numbers.
   ========================================================= */
.case-study {
  --cs-rem: calc(var(--u) * 1.17);
  --cs-title-size: calc(var(--text-card-title) * 1.1);
  --cs-pad: calc(var(--cs-rem) * 3);       /* box padding (same for every section, so columns line up) */
  --cs-gutter: calc(var(--cs-rem) * 7);    /* gap between text and media */
  --cs-panel-pad: calc(var(--cs-rem) * 4); /* gray border around images */
  display: flex;
  flex-direction: column;
  padding: var(--page-top) var(--page-gutter) calc(var(--page-gutter) + var(--arrow-button-size) + var(--u) * 2);
}

/* Each section is its own bordered box, separated by the page gutter */
.cs-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--cs-gutter);
  padding: var(--cs-pad);
  background: var(--color-box);
  border: var(--line);
  scroll-margin-top: calc(var(--header-total) + var(--page-top));
}

.cs-section + .cs-section {
  margin-top: var(--page-gutter); /* same gap as the side gutter */
}

.cs-text {
  grid-column: span 3;
}

.cs-media {
  grid-column: span 9;
  min-width: 0;
}

/* Hero title: equal space above and below it, with the rule under it running
   edge to edge from the box border to the image panel */
.cs-section--hero .cs-title {
  text-box: trim-both cap alphabetic;
  line-height: 1;
}

.cs-section--hero .cs-title + .cs-rule,
.cs-section--hero .cs-hero-copy > .cs-rule:first-child {
  margin: var(--cs-pad) calc(var(--cs-gutter) * -1) var(--cs-pad) calc(var(--cs-pad) * -1);
}

/* Titles */
.cs-title {
  font-size: var(--cs-title-size);
  font-weight: var(--weight-regular);
  line-height: 0.9;
  letter-spacing: var(--tracking-display);
}

.cs-section-title {
  font-size: var(--text-card-title);
  font-weight: var(--weight-regular);
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

.cs-number {
  margin-bottom: calc(var(--text-small) * 1.4);
}

.cs-rule {
  margin: calc(var(--text-small) * 1.4) 0;
  border: 0;
  border-top: var(--line);
}

.cs-hand-arrow {
  display: block;
  width: 15%;
  height: auto;
  margin: calc(var(--text-small) * 1.4 * 1.8) 0 calc(var(--text-small) * 1.4 * 2.1);
}

.case-study .cs-text p:not(.cs-number, .cs-note, .cs-award) {
  line-height: calc(var(--leading-body) + 0.1);
}

/* Body text: paragraphs separated by one blank line, headings in bold */
.cs-text p + p,
.cs-text p + .cs-block,
.cs-text .cs-block + p,
.cs-text .cs-block + .cs-block {
  margin-top: calc(var(--text-small) * 1.4);
}

.cs-text h3 {
  font-size: inherit;
  font-weight: var(--weight-bold);
}

/* Text wrapping on project pages only (.case-study).
   - Body paragraphs and captions keep text-wrap: pretty (set globally) and
     add light hyphenation, using the page's lang="en". Only words of 10+
     letters break, leaving at least 5 letters on each side, so breaks stay
     rare and readable (about 1 line in 10). Browsers that ignore the limit still hyphenate
     sensibly; ones without hyphenation just wrap normally.
   - Short headings and the centered pull quotes use text-wrap: balance so
     their lines come out even instead of leaving one short last line. */
.case-study .cs-text p,
.case-study .cs-text li,
.case-study .cs-caption {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 10 5 5;
}

.case-study .cs-title,
.case-study .cs-section-title,
.case-study .cs-text h3,
.case-study .cs-quote {
  text-wrap: balance;
}

/* Pull quote */
.cs-quote {
  margin: calc(var(--cs-rem) * 2) 0;
  padding: calc(var(--cs-rem) * 1.5);
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-size: calc(var(--cs-rem) * 1.5);
  line-height: 1.5;
  text-align: center;
}

/* Role line, e.g. "UX/Visual Designer -> Design Lead" */
.cs-text .icon {
  height: 1.2em;
}

/* "The Case Study" jump links */
.cs-jump-list {
  margin-top: 0.3em;
  --oval-stroke: 1.5px; /* thinner hover oval for small text */
  --oval-closed: 1;     /* the oval closes neatly, no overlap */
}

.cs-jump-list a {
  display: inline-block;
}

.cs-image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: 100dvh;
  margin: auto;
  padding: 0;
  border: var(--line);
  background: var(--color-box);
}

.cs-image-viewer::backdrop {
  background: rgb(0 0 0 / 65%);
}

.cs-image-viewer__close {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-out;
}

.cs-image-viewer__image {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 2px);
  object-fit: contain;
}

.case-study .cs-panel img[role="button"] {
  cursor: zoom-in;
}

.case-study .cs-panel img[role="button"]:focus-visible,
.cs-image-viewer__close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.cs-image-viewer--pointer .cs-image-viewer__close:focus {
  outline: none;
}

/* Gray media panel: images sit inside a #efefef border */
.cs-panel {
  display: flex;
  flex-direction: column;
  gap: var(--cs-panel-pad);
  padding: var(--cs-panel-pad);
  background: #efefef;
}

.cs-panel--flush-bottom {
  padding-bottom: 0;
}

.cs-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-caption {
  margin: var(--text-small) 0 calc(var(--text-small) * 2.6);
  font-size: max(14.5px, var(--cs-rem));
  line-height: 1.3;
}

.cs-caption:last-child {
  margin-bottom: 0;
}

.case-study .cs-caption {
  position: relative;
  padding-inline-start: 1.6em;
  font-family: var(--font-sans);
  font-size: var(--text-small);
}

.case-study .cs-caption .icon {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.05em;
  margin: 0;
}

@media (width > 1024px) {
  .case-study .cs-caption {
    box-sizing: content-box;
    max-inline-size: calc(50% - var(--cs-caption-image-inset, var(--cs-panel-pad)));
    font-size: 12px;
  }

  .case-study .cs-caption--above:has(+ .cs-panel--bare),
  .case-study .cs-panel--bare + .cs-caption:not(.cs-caption--above) {
    --cs-caption-image-inset: 0px;
  }
}

.cs-caption .icon {
  height: 1.2em;
}

/* Small pill labels above media */
.pill {
  display: inline-block;
  margin-bottom: calc(var(--text-small) * 1.4);
  padding: calc(var(--cs-rem) * 0.7) calc(var(--cs-rem) * 0.8);
  border-radius: 999px;
  font-size: calc(var(--cs-rem) * 0.9);
  font-weight: var(--weight-bold);
  line-height: 0.5;
}

.pill--process {
  color: rgb(0, 66, 169);
  background: rgb(206, 225, 255);
}

.pill--to-be {
  color: rgb(23, 137, 50);
  background: rgb(207, 245, 212);
}

.pill--as-is {
  color: rgb(167, 67, 67);
  background: rgb(249, 214, 214);
}

/* Project menu: a small "Contents" button fixed in the bottom-right corner.
   Hovering (or tapping) it opens a card above it, in the same white box and
   thin black line styling as the rest of the site.
   Type is the body sans at one size (--text-small, line height 1.4), all
   flush left, so every row sits on the same rhythm; groups are separated by a full-width line and
   equal padding. */
.project-menu {
  --menu-pad: calc(var(--u) * 2.2);
  --menu-open: 380ms;                               /* opening: smooth glide out */
  --menu-open-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --menu-close: 520ms;                              /* closing: slower, gentle */
  --menu-close-ease: cubic-bezier(0.65, 0, 0.35, 1);
  --oval-stroke: 1.5px; /* thin hover oval, like the case study links */
  --oval-closed: 1;     /* small links: the oval closes neatly, no overlap */
  position: fixed;
  right: calc(var(--u) * 0.94);
  bottom: calc(var(--u) * 0.94);
  z-index: 50;
  font-size: var(--text-small);
  line-height: 1.4;
}

/* Square arrow button: same look and hover as the homepage card arrows
   (blue fill, arrow turns white and rotates to point right). While the card
   is open, clicking it goes to the next section (or next project). */
.project-menu__button {
  position: relative;
  z-index: 2; /* sits on top of the card, in its bottom-right corner */
  display: flex;
  align-items: center;
  width: var(--arrow-button-size);
  height: var(--arrow-button-size);
  padding: 0;
  background: var(--color-box);
  border: var(--line);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-arrow-button);
  cursor: pointer;
  transition: background-color var(--hover-duration) ease;
}

.project-menu__button .icon {
  margin: 0 auto;
  transition: filter var(--hover-duration) ease, rotate var(--hover-duration) ease;
}

.project-menu__button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* The card: hidden until hover, focus, or tap. It sits directly above the
   button, its bottom edge sharing one line with the button's top edge, and
   grows from that corner up toward the top-left. */
.project-menu__panel {
  position: absolute;
  right: 0;
  bottom: calc(var(--arrow-button-size) - 1px);
  width: max-content;
  min-width: calc(var(--arrow-button-size) * 5);
  max-width: calc(100vw - var(--u) * 2);
  background: var(--color-box);
  border: var(--line);
  /* Hidden by clipping it down to the bottom-right corner (where the button
     is); opening grows the clip outward toward the top-left */
  clip-path: inset(100% 0 0 100%);
  visibility: hidden;
  transition:
    clip-path var(--menu-close) var(--menu-close-ease),
    visibility 0s linear var(--menu-close);
}

/* A border frame that grows with the reveal, so the card has all four
   edges the whole time it is opening (the clip alone would hide the top
   and left edges until the end). Same timing and easing as the clip. */
.project-menu__panel::before {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 0;
  height: 0;
  border: var(--line);
  pointer-events: none;
  transition:
    width var(--menu-close) var(--menu-close-ease),
    height var(--menu-close) var(--menu-close-ease);
}

.project-menu:hover .project-menu__panel::before,
.project-menu:focus-within .project-menu__panel::before,
.project-menu.is-open .project-menu__panel::before {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transition:
    width var(--menu-open) var(--menu-open-ease),
    height var(--menu-open) var(--menu-open-ease);
}

.project-menu:hover .project-menu__panel,
.project-menu:focus-within .project-menu__panel,
.project-menu.is-open .project-menu__panel {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition:
    clip-path var(--menu-open) var(--menu-open-ease),
    visibility 0s;
}

/* While the card is open the bar stays white with black text and the arrow
   turns to point right; it only turns blue (white text and arrow) when the
   bar itself is hovered or focused */
.project-menu:hover .project-menu__button .icon,
.project-menu:focus-within .project-menu__button .icon,
.project-menu.is-open .project-menu__button .icon {
  rotate: 45deg;
}

.project-menu__button:hover,
.project-menu__button:focus-visible {
  background: var(--color-hover);
  color: var(--color-box);
}

.project-menu__button:hover .icon,
.project-menu__button:focus-visible .icon {
  filter: invert(1);
}

.project-menu__group {
  padding: var(--menu-pad);
}

.project-menu__group + .project-menu__group {
  border-top: var(--line);
}

.project-menu__title {
  font-family: var(--font-serif);
  font-size: var(--text-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: 450; /* one step heavier than the other serif labels */
}

/* Lists sit flush left under their heading, arrows first, like the
   "The Case Study" links on the page */
.project-menu__list {
  margin: 0.3em 0 0;
  padding: 0;
  list-style: none;
}

.project-menu__list a {
  display: inline-block; /* lets the hover oval hug each link */
}

/* Case study extras -------------------------------------------------- */

/* Images shown without the gray border (as on the live site) */
.cs-panel--bare {
  padding: 0;
  background: none;
}

/* A caption that introduces the image below it */
.cs-caption--above {
  margin: 0 0 var(--text-small);
}

.cs-panel--bare + .cs-caption--above {
  margin-top: calc(var(--text-small) * 2.6);
}

.pill--info {
  color: rgb(0, 57, 193);
  background: rgb(225, 234, 255);
}

.cs-note .pill {
  margin-bottom: 0;
}

/* Tag + caption above the image (Cloud Pak System v2, section 1).
   The tag sits inline at the start of the caption, on the same baseline as
   the bold lead-in; the rest of the caption starts on the next line, flush
   with the tag's left edge. */
.cs-label-row {
  margin-bottom: calc(var(--text-small) * 1.4);
}

.cs-panel + .cs-label-row {
  margin-top: calc(var(--text-small) * 2.6);
}

/* Caption text next to a tag: Carbon Gray 80 (the tag keeps its own color) */
.case-study .cs-media .cs-label-row .cs-caption {
  color: #393939;
}

/* Caption lead-in sentence: bold, on its own line */
.cs-caption__lead {
  font-weight: var(--weight-bold);
}

/* Tag on its own line above the caption: sized in em so it stays about as
   tall as the caption text */
.case-study .cs-media .cs-label-row .pill {
  display: table; /* own line, but only as wide as the word */
  margin: 0 0 calc(var(--text-small) * 0.6);
  padding: 0.48em 0.6em;
  font-size: calc(var(--text-small) * 0.82 - 1px); /* fixed size, not tied to the caption */
}

/* Separate images shown side by side (they used to be one image with a
   built-in gray gap). Same gap as the hero pair. */
.cs-panel--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.cs-panel--pair,
.cs-panel__stack {
  gap: calc(var(--cs-panel-pad) / 2);
}

.cs-panel__stack {
  display: flex;
  flex-direction: column;
}

/* Three across (AI Framework v2 process sketches); stacks on phones like
   the pair */
.cs-panel--pair.cs-panel--trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Grid of illustration tiles: 4 across, the big tile spans 2 x 2.
   The big tile's image fills its cell (cropping a sliver of plain
   background if needed), so it always lines up with the small tiles. */
.cs-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(var(--cs-panel-pad) / 4);
}

.cs-tiles img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-tiles__big {
  position: relative;
  grid-column: span 2;
  grid-row: span 2;
}

.cs-tiles__big img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

/* Cloud Pak System v2: every image gets the same 1px Gray 30 border, drawn
   inside the image so it covers the image's own edge (built-in gray
   outlines and shadows were trimmed off the files). Keyboard focus still
   shows the blue focus ring. */
.case-study--v2 .cs-media .cs-panel img {
  border: 0;
}

.case-study--v2 .cs-media .cs-panel img:not(:focus-visible) {
  outline: 1px solid #c6c6c6; /* Carbon Gray 30 */
  outline-offset: -1px;
}

/* Images stacked in one panel sit at the same half gap everywhere */
.case-study--v2 .cs-panel {
  gap: calc(var(--cs-panel-pad) / 2);
}

.case-study .cs-media .cs-label-row .cs-caption {
  max-inline-size: none;
  margin: 0;
  padding-inline-start: 0;
  font-size: 12px;
  line-height: calc(var(--leading-body) + 0.1);
}

/* Version 2 layout test (projects/cloud-pak-system-v2.html, desktop only):
   a 1px divider runs top to bottom between the text and image columns, and
   the images drop the gray border, sitting with the same padding as the text.
   The text column keeps the same width it has in version 1. */
@media (width > 1024px) {
  .case-study--v2 .cs-section {
    grid-template-columns:
      calc((100% - 2 * var(--cs-pad) - 11 * var(--cs-gutter)) / 4 + 2 * var(--cs-gutter) + 2 * var(--cs-pad))
      minmax(0, 1fr);
    column-gap: 0;
    padding: 0;
  }

  .case-study--v2 .cs-text,
  .case-study--v2 .cs-media {
    grid-column: auto;
    padding: var(--cs-pad);
  }

  .case-study--v2 .cs-media {
    border-left: var(--line); /* the divider */
    background: #f4f4f4;      /* Carbon Gray 10 */
  }

  /* Hero rule runs from the box border to the divider */
  .case-study--v2 .cs-section--hero .cs-title + .cs-rule,
  .case-study--v2 .cs-section--hero .cs-hero-copy > .cs-rule:first-child {
    margin-right: calc(var(--cs-pad) * -1);
  }

  /* No gray border: images sit straight in the column */
  .case-study--v2 .cs-panel {
    padding: 0;
    background: none;
  }

  /* Captions and their arrows line up with the image's left edge */
  .case-study--v2 .cs-caption {
    --cs-caption-image-inset: 0px;
  }
}

/* Award link in the serif, like the live site */
.cs-award {
  --oval-stroke: 1.5px;
  --oval-closed: 1;
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-nav);
  font-size: calc(var(--text-small) * 1.2);
  line-height: 1.3;
}

.cs-award a {
  display: inline-block;
}

/* Index panel ------------------------------------------------------- */
/* Site navigation, in one bordered panel on the right, just below the
   header. It slides in from the right edge when you hover or click "Index".
   A title section ("/design" in sans, with a serif line under it), then
   groups with a serif label, divided by full-width lines. Single-line
   groups (Information, Correspondence) sit a little tighter. Each entry is a
   full-width link (sans title, serif years under it); hovering it draws the
   blue oval around the title, and the page you're on keeps its oval. */
.index-overlay {
  --index-pad-x: calc(var(--box-pad-x) * 0.75);
  --index-pad-y: calc(var(--box-pad-y) * 0.75);
  --index-cell-y: calc(var(--u) * 0.75);         /* space around each entry */
  --index-cell-y-compact: calc(var(--u) * 0.35); /* single-line entries */
}

.index-sec {
  /* the extra right padding is breathing room; it sits inside each section,
     so the divider lines still run the full width of the panel */
  padding: var(--index-pad-y) calc(var(--u) * 3) var(--index-pad-y) 0;
}

.index-sec + .index-sec {
  border-top: var(--line);
}

.index-sec--intro {
  padding: var(--index-pad-y) calc(var(--index-pad-x) + var(--u) * 3) var(--index-pad-y) var(--index-pad-x);
}

.index-title {
  margin: 0;
  font-family: var(--font-serif); /* "/design" in the italic serif */
  font-style: italic;
  font-variation-settings: var(--serif-axes);
  font-weight: var(--weight-serif-light); /* same light weight as the serif labels */
  font-size: var(--text-card-title);
  line-height: var(--leading-card-title);
  letter-spacing: var(--tracking-display);
}

/* "/design" links back to that portfolio's homepage (oval on hover) */
.index-title__link {
  color: inherit;
  text-decoration: none;
}

/* Its hover is a plain text underline in the hover blue, not the oval */
.index-title__link .oval {
  display: none;
}

.index-title__link:hover,
.index-title__link:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--color-hover);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* Serif lines: the subtitle and the years */
.index-sub,
.index-cell__meta {
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-size: var(--text-serif);
  line-height: var(--leading-body);
}

.index-sub {
  margin: calc(var(--u) * 0.6) 0 0;
}

.index-sec__head {
  padding: 0 var(--index-pad-x);
}

.index-sec__head .label {
  margin: 0 0 calc(var(--index-cell-y) * 0.5);
}
.index-cells {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The entry: full width of the panel, so the whole row is the hover target */
.index-cell {
  display: flex;
  padding: var(--index-cell-y) var(--index-pad-x);
}

.index-sec--compact .index-cell {
  padding-top: var(--index-cell-y-compact);
  padding-bottom: var(--index-cell-y-compact);
}


.index-cell__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.index-cell__title {
  display: inline-block; /* lets the oval hug the title */
  font-size: calc(var(--u) * 2);
  line-height: 1.2;
  --oval-closed: 1; /* the oval closes neatly, no overlap */
  --oval-top: 0.22em;
  --oval-bottom: 0.22em;
  --oval-left: 0.45em;
  --oval-right: 0.45em;
}

.index-cell__meta {
  margin-top: calc(var(--u) * 0.3);
}

.index-overlay {
  --menu-open: 380ms;
  --menu-open-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --menu-close: 520ms;
  --menu-close-ease: cubic-bezier(0.65, 0, 0.35, 1);
  position: fixed;
  top: var(--header-height); /* just below the header, so "Index" stays visible */
  right: 0;
  z-index: 60; /* above the page and the project menu */
  /* At least the design menu's width (measured in js/main.js), so every
     portfolio's menu matches it; wider only when its own longest line
     needs the room (e.g. long orchid names). */
  width: max-content;
  min-width: var(--index-width, 0);
  max-width: 100vw;
  border-width: 0 0 0 1px; /* left edge only; it slides in with the panel */
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  transform: translateX(100%); /* parked just off the right edge */
  visibility: hidden;
  transition:
    transform var(--menu-close) var(--menu-close-ease),
    visibility 0s linear var(--menu-close);
}

.index-open .index-overlay {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform var(--menu-open) var(--menu-open-ease),
    visibility 0s;
}

/* The last section fills the remaining height, like the homepage column */
.index-overlay {
  display: flex;
  flex-direction: column;
}

.index-overlay > .index-sec:last-child {
  flex: 1 0 auto;
}

.index-overlay__close {
  display: none;
}

/* Ceramic work pages (ceramics/*.html) -------------------------------- */
/* One white sheet across the page. On the left, a narrow metadata column
   (title, year, dimensions, materials) that
   scrolls with the page; a single vertical line separates it from
   the photo area. The photos sit inside the white sheet with padding all
   around and small gaps between them. Borders are never doubled: the sheet
   draws the outer edge, the column draws only its right edge, and cells
   draw only the lines between them. */
.work-page {
  --work-gap: max(6px, calc(var(--u) * 0.6)); /* small gap between photos */
  --work-pad: calc(var(--u) * 1.17 * 3); /* metadata cell padding: same as the AI Framework case study text column (--cs-pad) */
  padding: var(--page-top) var(--page-gutter) var(--page-gutter);
}

/* The details column is about 22% wide (at least 220px, set on .work-meta),
   but grows when needed so the title, year and dimensions always fit on
   one line */
.work-sheet {
  display: grid;
  grid-template-columns: fit-content(22%) 1fr;
}

/* One work per sheet; sheets stack with the page gutter between them */
.work-sheet + .work-sheet {
  margin-top: var(--page-gutter);
}

.work-meta {
  display: flex;
  flex-direction: column;
  min-width: 220px;
  border-right: var(--line);
}

/* fills the full height of the sheet and scrolls with the page */
.work-meta__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* stacked cells: one line between each, nothing on their sides */
.work-meta .work-card__cell {
  padding: calc(var(--u) * 2); /* the same on all four sides */
}

/* Title and values: the same size, a little smaller than on the ceramics
   home page cards */
.work-meta .work-card__title,
.work-meta .work-card__value {
  font-size: calc(var(--text-card-title) * 0.7);
}

/* The work's title stands out in bold */
.work-meta .work-card__title {
  font-weight: var(--weight-bold);
}

/* Title, year and dimensions never break onto a second line (materials
   can wrap) */
.work-meta .work-card__title,
.work-meta__inner > .work-card__cell:nth-child(2) .work-card__value,
.work-meta__inner > .work-card__cell:nth-child(3) .work-card__value {
  white-space: nowrap;
}

/* Multi-line values (e.g. Materials) get a little more line spacing; the
   title uses the same, so every line in the column is the same height */
.work-meta .work-card__title,
.work-meta .work-card__value {
  line-height: 1.2;
}

.work-meta .work-card__cell + .work-card__cell {
  border-left: 0;
  border-top: var(--line);
}

/* Photo area: padding all around, small gaps between photos */
.work-photos {
  min-width: 0;
  padding: 0;
}

/* Desktop: the title and detail text are a little smaller than on phones */
@media (min-width: 801px) {
  .work-meta .work-card__title,
  .work-meta .work-card__value {
    font-size: calc(var(--text-card-title) * 0.6);
  }
}

/* Photo sets: one large photo on the left, two smaller photos stacked on
   the right, repeating down the page. No padding or gaps: the photos are
   separated only by single 1px lines (the black background showing through
   a 1px gap), and their outer edges sit right on the sheet's border and the
   metadata column's line, so no line is ever doubled. */
.work-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-line);
}

.work-set {
  display: grid;
  grid-template-columns: 1.76fr 1fr;
  gap: 1px;
  background: var(--color-line);
}

.work-set img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.work-set__main {
  grid-row: span 2;
  height: 100%;
}

/* Side photos set the height of each set; the big photo fills the rest.
   Photos are cropped to these shapes (big about 1.14 : 1) before upload. */
.work-set__side {
  aspect-ratio: 1.3;
  height: auto;
}

/* Image popup ------------------------------------------------------- */
/* A photo shown larger, laid straight over the page (no veil), with a
   square close box just outside its top-right corner.
   The box grows out from its center with the same timing and easing as the
   project menu and Index panel (border growing along with it) and folds
   back the same way. */
.lightbox {
  --lightbox-mat: max(14px, calc(var(--u) * 2));
  --menu-open: 380ms;
  --menu-open-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --menu-close: 520ms;
  --menu-close-ease: cubic-bezier(0.65, 0, 0.35, 1);
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--menu-close) var(--menu-close-ease),
    visibility 0s linear var(--menu-close);
}

.lightbox-open .lightbox {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--menu-open) var(--menu-open-ease),
    visibility 0s;
}

@media (hover: none), (max-width: 800px) {
  .index-open .index-overlay,
  .site-header:has(.site-switch.is-open) {
    z-index: 71;
  }
}

.lightbox__frame {
  position: relative;
}

.lightbox__viewport,
.lightbox__center {
  display: contents;
}

.lightbox__box {
  position: relative;
  width: max-content; /* hugs the photo (sized in js/main.js) */
  padding: var(--lightbox-mat); /* thick white mat around the photo, inside the black line */
  background: var(--color-box);
  clip-path: inset(50% 50% 50% 50%);
  transition: clip-path var(--menu-close) var(--menu-close-ease);
}

.lightbox-open .lightbox__box {
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--menu-open) var(--menu-open-ease);
}

/* Border frame that grows from the center with the reveal */
.lightbox__box::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  border: var(--line);
  translate: -50% -50%;
  pointer-events: none;
  transition:
    width var(--menu-close) var(--menu-close-ease),
    height var(--menu-close) var(--menu-close-ease);
}

.lightbox-open .lightbox__box::before {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transition:
    width var(--menu-open) var(--menu-open-ease),
    height var(--menu-open) var(--menu-open-ease);
}

/* Every popup has the same shape (set in js/main.js); photos of another
   shape are cropped to fill it. A click anywhere closes it. */
.lightbox__img {
  display: block;
  object-fit: cover;
  border: var(--line); /* thin black line around the photo, inside the white mat */
}

/* Plain arrow over the popup (a click anywhere still closes it) */
.lightbox {
  cursor: default;
}

/* Full-size popup, used on every page and screen size (js/main.js always
   adds .lightbox--full). The photo is as large as fits below the header,
   with the page gutter around it (js/main.js reads this padding to size it).
   No white mat: the box's own black line is the photo's only border.
   A frosted-glass layer covers the page behind it, starting just below the
   header's line so the header stays clear and usable. */
.lightbox--full {
  --lightbox-mat: 0px;
  top: var(--header-height);
  padding: var(--page-gutter);
  background: rgb(255 255 255 / 0.3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.lightbox--full .lightbox__img {
  border: 0;
}

/* Five square thumbnail slots below the enlarged photo. */
.lightbox__media {
  display: flex;
  flex-direction: column;
}

.lightbox__thumbs {
  display: grid;
  grid-template-columns: repeat(5, min(20%, 103px, 18svh));
  align-self: end;
  border-top: var(--line);
}

.lightbox__thumbs[hidden] {
  display: none;
}

.lightbox__thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-right: var(--line);
  background: var(--color-box);
  cursor: pointer;
}

.lightbox__thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 150ms ease;
}

.lightbox__thumb:hover img,
.lightbox__thumb:focus-visible img,
.lightbox__thumb[aria-current="true"] img {
  opacity: 1;
}

.lightbox__thumb[aria-current="true"]::after,
.lightbox__thumb:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px #b8b8b8; /* bright gray, softer than white */
  pointer-events: none;
}

.lightbox__thumb:focus-visible {
  outline: none;
}

@media (width > 800px) {
  .lightbox__frame {
    display: flex;
    align-items: flex-start;
  }

  .lightbox__frame > .lightbox__thumbs {
    flex: none;
    align-self: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    border: var(--line);
    border-left: 0;
    background: var(--color-line);
    clip-path: inset(50%);
    transition: clip-path var(--menu-close) var(--menu-close-ease);
  }

  .lightbox-open .lightbox__frame > .lightbox__thumbs {
    clip-path: inset(0);
    transition: clip-path var(--menu-open) var(--menu-open-ease);
  }

  .lightbox__frame > .lightbox__thumbs .lightbox__thumb {
    border-right: 0;
  }
}

@media (max-width: 800px) {
  .lightbox--full {
    --lightbox-compact-padding: 8px 12px;
    --lightbox-compact-title-size: 15px;
    display: block;
    bottom: auto;
    height: calc(100dvh - var(--header-height));
    padding: 0;
  }

  .lightbox__viewport {
    --lightbox-viewport-padding: var(--page-gutter);
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: var(--lightbox-viewport-padding);
    overflow: hidden auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    touch-action: pan-y pinch-zoom;
  }

  /* Center against the stable viewport. Taller galleries grow downward so
     the full frame, including its top edge, remains reachable by scrolling. */
  .lightbox__center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100svh - var(--header-height) - 2 * var(--lightbox-viewport-padding));
  }

  .lightbox__thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Keep the photo popup's close control available to assistive technology. */
.lightbox__close {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 800px) {
  .lightbox__close .icon {
    display: none;
  }
}

/* Photos in work cards can be clicked to enlarge */
.work-card img:not(.icon),
.work-grid img {
  cursor: zoom-in;
}

.work-card img:not(.icon):focus-visible,
.work-grid img:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* ---------- Ceramics: list / grid view ----------
   PARKED: not on any page right now; kept for later. To bring it back,
   add the .view-toggle buttons, a .work-list wrapper around the cards
   and an empty .work-tiles div to ceramics.html (see js/main.js).
   A pill-shaped switcher, "List" and "Grid", stays at the bottom of the
   window, centered under the right column. The chosen side is a filled black pill inside the outline;
   hovering a side fills it blue. Cards keep the usual gutter between them;
   grid photos have a gap half that size. The grid is three across (two on
   phones); each item has its title above the photo. */
/* Stays fixed at the bottom of the window while you scroll, centered
   under the right column (its middle sits at 75% of the page, less a
   quarter gutter, since the column starts half a gutter past the middle
   and ends a gutter before the edge). */
.view-toggle {
  position: fixed;
  left: calc(75% - var(--page-gutter) / 4);
  bottom: var(--page-gutter);
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--color-box);
  border: var(--line);
  border-radius: 999px;
}

html:not(.js) .view-toggle {
  display: none; /* the switcher needs the script */
}

.view-toggle__button {
  display: flex;
  align-items: center;
  height: calc(var(--arrow-button-size) - 6px); /* whole pill matches the arrow buttons' height */
  padding: 0 var(--header-pad-x);
  background: transparent;
  color: var(--color-text);
  border: 0;
  border-radius: 999px;
  font-family: var(--font-serif);
  letter-spacing: var(--tracking-serif);
  font-variation-settings: var(--serif-axes);
  font-style: italic;
  font-weight: var(--weight-serif-nav);
  font-size: var(--text-serif);
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--hover-duration) ease,
    color var(--hover-duration) ease;
}

.view-toggle__button[aria-pressed="true"] {
  background: var(--color-text);
  color: var(--color-hover-text);
}

.view-toggle__button:hover,
.view-toggle__button:focus-visible {
  background: var(--color-hover);
  color: var(--color-hover-text);
  outline: none;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: var(--page-gutter);
}

.work-list[hidden],
.work-tiles[hidden] {
  display: none;
}

.work-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--page-gutter) / 2);
}

.work-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: var(--line);
  background: var(--color-media);
  color: inherit;
  text-decoration: none;
}

.work-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Metadata: the title in a strip above the photo,
   always shown, so each grid item is a rectangle taller than it is wide.
   One line between the strip and the photo. */
.work-tile__meta {
  background: var(--color-box);
  border-bottom: var(--line);
}

.work-tile__meta .work-card__cell {
  padding: calc(var(--u) * 1.2) calc(var(--u) * 1.6);
}

.work-tile__meta .work-card__label {
  margin-bottom: calc(var(--u) * 0.3);
  font-size: calc(var(--u) * 1.1);
}

.work-tile__meta .work-card__title,
.work-tile__meta .work-card__value {
  font-size: calc(var(--u) * 1.8); /* well above the 11px label */
  font-weight: var(--weight-bold);
  line-height: 1.2;
  letter-spacing: 0;
}

.work-tile:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Compact right column ----------
   js/main.js adds .is-compact to the timeline and to the card headers
   whenever any of their lines would otherwise wrap (and always on phones),
   so a line never breaks where it shouldn't. */

/* Timeline: just the role and the years, in regular weight */
.timeline.is-compact .timeline__team {
  display: none;
}

.timeline.is-compact strong {
  font-weight: var(--weight-regular);
}

/* Project and ceramics cards: no Timeline / Year cell, so the title spans
   the full width (leaving room for the arrow box in the corner) */
.work-card__head.is-compact {
  grid-template-columns: 1fr;
}

.work-card__head.is-compact > .work-card__cell + .work-card__cell {
  display: none;
}

.work-card__head.is-compact > .work-card__cell:first-child {
  padding-right: calc(var(--box-pad-x) + var(--arrow-button-size));
}

/* Never wrap: anything still too long ends in "…" */
.timeline.is-compact dt,
.timeline.is-compact dd,
.work-card__head.is-compact .work-card__title {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timeline.is-compact dt,
.timeline.is-compact dd {
  display: block;
}

/* The title keeps hugging its text (for the hover oval); the clip is
   widened so the oval isn't cut off */
.work-card__head.is-compact .work-card__title {
  overflow: clip;
  overflow-clip-margin: 1.2em;
}

/* Header label (all screen sizes): centered in the bar with a chevron after
   it, and the dropdown centered under it */
.site-switch {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  translate: -50% 0;
  justify-content: center;
}

.site-switch > .site-header__name {
  flex: 0 0 auto;
  border-right: 0;
}

/* Chevron after the label; it flips up while the dropdown is open */
.site-switch__chevron {
  display: inline-block;
  height: 1em;
  margin: 0 0 0 0.3em;
  vertical-align: -0.15em;
  transition: rotate 200ms ease;
}

.site-switch.is-open .site-switch__chevron {
  rotate: 180deg;
}

/* No box around the label here, so no box fill on hover */
.site-switch > .site-header__name:hover,
.site-switch > .site-header__name:focus-visible {
  background: none;
  color: inherit;
}

.site-switch > .site-header__name:hover .site-section,
.site-switch > .site-header__name:focus-visible .site-section {
  color: var(--color-accent);
}

/* Keyboard focus: a thin blue underline instead */
.site-switch > .site-header__name:focus-visible {
  outline: none;
  text-decoration: underline;
  text-decoration-color: var(--color-hover);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.site-switch__menu {
  left: 50%;
  translate: -50% 0;
  border-left: var(--line);
  text-align: center;
}

/* Mouse users: the chevron also flips while hovering opens the dropdown */
@media (hover: hover) {
  .site-switch:hover .site-switch__chevron,
  .site-switch:focus-within .site-switch__chevron {
    rotate: 180deg;
  }
}

/* Role box: "Design Lead at / International Business Machines"; on phones
   it becomes "Design Lead / at IBM", with IBM in the plain sans
   (see Small screens) */
.company--short {
  display: none;
}

/* ---------- Tablets and phones (up to 1024px) ----------
   Layout only: the two-column layouts stack into one column, which covers
   every iPad held upright. Sideways tablets and laptops keep two columns.
   Phone-only details (centered header, shorter text, smaller spacing)
   stay in "Small screens" below, at 800px. */
@media (max-width: 1024px) {
  /* Home pages: one column; the left column scrolls normally with the page */
  .home {
    grid-template-columns: 1fr;
  }

  .home__left {
    position: static;
    height: auto;
    overflow: visible;
  }

  /* Case studies: text above media */
  .cs-section--hero .cs-title + .cs-rule,
  .cs-section--hero .cs-hero-copy > .cs-rule:first-child {
    margin-right: calc(var(--cs-pad) * -1);
  }

  .cs-section {
    grid-template-columns: 1fr;
    row-gap: var(--cs-gutter);
  }

  .cs-text,
  .cs-media {
    grid-column: auto;
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 800px) {
  .case-study {
    --cs-stack-gap: max(var(--cs-pad), calc(var(--text-small) * 1.4));
    --cs-media-gap: calc(var(--cs-pad) / 2);
    --cs-caption-gap: calc(var(--cs-pad) * 2 / 3);
  }

  .case-study .cs-section {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--cs-stack-gap);
  }

  .case-study .cs-panel {
    padding: 0;
    background: none;
  }

  .case-study .cs-panel img {
    border: 1px solid var(--color-media);
  }

  .case-study .pill--process + .cs-panel img,
  .case-study .cs-panel--process img {
    border: 0;
  }

  .case-study .cs-media .pill {
    margin-bottom: var(--cs-media-gap);
  }

  .case-study .cs-label-row {
    margin-bottom: var(--cs-media-gap);
  }

  .case-study .cs-panel + .cs-label-row {
    margin-top: var(--cs-stack-gap);
  }

  /* Side-by-side images stack on phones */
  .case-study .cs-panel--pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-study .cs-panel--pair,
  .case-study .cs-panel__stack,
  .case-study--v2 .cs-panel {
    gap: var(--cs-media-gap);
  }

  /* v2: the full-width hero image touches the box edges on phones, so it
     skips the inside border (it would sit right next to the black line) */
  .case-study--v2 .cs-section--hero .cs-panel img:first-child:not(:focus-visible) {
    outline: none;
  }

  .case-study .cs-caption {
    margin-top: var(--cs-caption-gap);
    font-size: 10px;
  }

  .case-study .cs-caption:not(:last-child) {
    margin-bottom: var(--cs-stack-gap);
  }

  .case-study .cs-caption.cs-caption--above {
    margin-block: 0 var(--cs-caption-gap);
  }

  .case-study .cs-panel + .cs-caption.cs-caption--above {
    margin-top: var(--cs-stack-gap);
  }

  .case-study .cs-section--hero .cs-text,
  .case-study .cs-section--hero .cs-media,
  .case-study .cs-section--hero .cs-panel {
    display: contents;
  }

  .case-study .cs-section--hero .cs-title {
    order: -2;
  }

  .case-study .cs-section-title {
    font-size: var(--cs-title-size);
  }

  .case-study :is(.cs-title, .cs-section-title) br {
    display: none;
  }

  .case-study .cs-section--hero .cs-panel img:first-child {
    order: -1;
    box-sizing: content-box;
    width: calc(100% + 2 * var(--cs-pad));
    margin-inline: calc(-1 * var(--cs-pad));
    border-inline: 0;
  }

  .case-study .cs-hero-copy > .cs-rule:first-child {
    display: none;
  }

  .case-study .cs-section--hero .cs-caption {
    margin-top: calc(var(--cs-caption-gap) - var(--cs-stack-gap));
  }

  /* Role box: "Design Lead / at IBM" */
  .company--full {
    display: none;
  }

  .company--short {
    display: inline;
  }


  .index-overlay {
    width: 100%;
    max-width: none;
  }

  .index-overlay .index-sec--intro {
    position: relative;
  }

  .index-overlay__close {
    --index-close-hit-padding: max(10px, calc((45px - var(--text-card-title)) / 2));
    position: absolute;
    inset-block-start: calc(var(--index-pad-y) - var(--index-close-hit-padding));
    inset-inline-end: calc(var(--index-pad-x) - var(--index-close-hit-padding));
    display: block;
    padding: var(--index-close-hit-padding);
    appearance: none;
    border: 0;
    background: transparent;
    font-size: var(--text-card-title);
  }

  .index-overlay__close img {
    display: block;
    width: 1em;
    height: 1em;
  }

  .index-overlay__close:focus-visible {
    outline: 2px solid var(--color-accent);
  }

  /* Ceramic work pages on phones: the title on top, then the photos, then
     year, dimensions and materials underneath.
     The metadata column "dissolves" (display: contents) so its cells join
     the sheet's own two-column grid; order puts the photos after the title.
     Lines: the photos draw the line under the title; each cell after the
     title draws the line above itself, so no edge is doubled. */
  .work-sheet {
    grid-template-columns: 1fr 1fr;
  }

  .work-meta,
  .work-meta__inner {
    display: contents;
  }

  .work-meta__inner > .work-card__cell {
    order: 2;
  }

  .work-meta__inner > .work-card__cell:first-child {
    order: 0;
  }

  .work-photos {
    order: 1;
    grid-column: 1 / -1;
    border-top: var(--line);
  }


  /* Year and dimensions share one row, split by a vertical line.
     Title and materials keep the full width. */
  .work-meta__inner > .work-card__cell:first-child,
  .work-meta__inner > .work-card__cell:last-child {
    grid-column: 1 / -1;
  }

  .work-meta__inner > .work-card__cell:nth-child(3) {
    border-left: var(--line);
  }

  /* Photos on phones: all three square. The main photo runs the full
     width, with the two smaller ones side by side underneath. The 1px gaps
     show the black background, so each shared edge is a single line. */
  .work-set {
    grid-template-columns: 1fr 1fr;
  }

  .work-set__main {
    grid-column: 1 / -1;
    grid-row: auto;
    height: auto;
    aspect-ratio: 1;
  }

  .work-set__side {
    aspect-ratio: 1;
  }

  :root {
    --page-gutter: 16px;
    --page-top: 16px;
    --box-pad-x: 24px;
    --box-pad-y: 24px;
    --thumb-size: 96px;
    /* Big text shrinks on narrow screens (like a phone's small front
       screen) so the longest intro line still fits on one line: the
       longest is about 11.4em wide, and the box's text area is the screen
       minus 82px (16px gutters, 24px padding and 1px lines on each side).
       Card titles and the big serif titles scale down by the same amount. */
    --fit: calc((100vw - 82px) / 11.6);
    --text-display: min(28px, var(--fit));
    --text-card-title: min(24px, var(--fit) * 24 / 28);
  }

  .work-tiles {
    grid-template-columns: 1fr 1fr;
  }

  /* one column on phones: the switcher centers on the page */
  .view-toggle {
    left: 50%;
  }

  /* No "Access points" section on phones (all three home pages) */
  .home__left > .access {
    display: none;
  }

  /* Blue hand-drawn ovals (hover and the ones that stay drawn): 30%
     thinner on phones, wherever they appear */
  .oval path {
    stroke-width: calc(var(--oval-stroke) * 0.7);
  }

  /* Cards: no hover oval around the title on phones */
  .card .work-card__title .oval {
    display: none;
  }

  .card__header {
    grid-template-columns: 1fr;
    row-gap: var(--label-gap);
    padding-right: calc(var(--box-pad-x) + var(--arrow-button-size));
  }
}

/* ---------- About dialog ----------
   Opened from "About" in the design Index panel.
   Desktop: a landscape box, 42% of the window wide. The left column holds the
   orb, name and location; the statement fills the right.
   Phones: the orb is a small photo top-left with the name and location beside
   it; the statement follows below.
   The close X sits just outside the box, on its top-right corner.
   Lines are drawn only between cells and on the column divide; the dialog's
   own border is the outer edge. */
.about {
  --about-size: calc(var(--u) * 1.8);    /* all the large sans type in the dialog */
  box-sizing: border-box;
  width: 42vw;
  min-width: min(520px, 92vw);
  max-width: 92vw;
  margin: auto;
  padding: 0;
  border: var(--line);
  border-radius: 0;
  background: var(--color-box);
  color: var(--color-text);
  overflow: visible;                     /* lets the X sit outside the box */
}

/* Frosted glass behind the box: the page is blurred and lightly whitened */
.about::backdrop {
  background: rgba(246, 249, 255, 0.45);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.about[open] {
  animation: about-in 200ms ease-out;
}

@keyframes about-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* The grid places every part directly, so the two wrappers draw no box */
.about__grid {
  display: grid;
  grid-template-columns: 37% 1fr;
  grid-template-areas:
    "cover text"
    "info  text";
}

.about__side,
.about__main {
  display: contents;
}

.about__cover {
  grid-area: cover;
  position: relative;      /* holds the twinkling highlight */
  container-type: size;    /* lets the highlight match the photo's crop */
  aspect-ratio: 1;
  overflow: hidden;
  border-bottom: var(--line);
  background: #dfe8fb;
}

.about__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The About dialog's orb uses the homepage's moving light (.orb-photo).
   Here the photo fills the cover box, which may crop it on phones, so the
   orb photo is a square centered in the box and as big as the box's larger
   side: the same crop object-fit: cover would give, so the light stays on
   the orb. No border of its own (the box has its lines). */
.about__cover .about__orb {
  position: absolute;
  width: max(100cqw, 100cqh);
  left: calc((100cqw - max(100cqw, 100cqh)) / 2);
  top: calc((100cqh - max(100cqw, 100cqh)) / 2);
}

.about__cover .about__orb .related__thumb {
  width: 100%;
  height: auto;
  border: 0;
}

.about__orb .orb-photo__light,
.about__orb::before,
.about__orb::after {
  inset: 0;
}

/* PARKED (see parked/about-orb-twinkle.html): Twinkling highlight on the orb in the About dialog.
   The bright spot on the orb's upper right glows and breathes, white with
   passing shimmers of pink, and slowly drifts a little along the curve of
   the glass. Softer highlights pulse and drift along the bottom rim. Light from it also spills onto the backdrop: a soft halo just
   outside the rim and a brighter patch in the shadow (light focused through
   the glass), both rising and falling with the glow.
   .orb-glint is a square matching the photo's crop (the photo fills the box
   with object-fit: cover, so it may be cropped on phones). Positions are in
   % of the photo: --gx/--gy is the bright spot, --orb-* the orb itself.
   Reduced motion: it holds still at a gentle glow. */
.orb-glint {
  --orb-x: 52%;
  --orb-y: 51%;
  --orb-r: 20.5%;
  --gx: 64.5%;
  --gy: 44.5%;
  --glint-tilt: -27deg;   /* turns the glow to lie along the rim */
  --glint-s: max(100cqw, 100cqh);
  position: absolute;
  left: calc((100cqw - var(--glint-s)) / 2);
  top: calc((100cqh - var(--glint-s)) / 2);
  width: var(--glint-s);
  height: var(--glint-s);
  pointer-events: none;
}

.orb-glint > span {
  position: absolute;
  inset: 0;
}

/* Light on the backdrop: a halo just outside the upper-right rim and a
   bright patch in the shadow. Masked out where the orb is. */
.orb-glint__halo,
.orb-glint__rim {
  mix-blend-mode: screen;
  /* fades in softly just outside the rim, so there's no hard edge */
  -webkit-mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-r) at var(--orb-x) var(--orb-y), transparent 96%, rgb(0 0 0 / 0.5) 104%, #000 114%);
  mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-r) at var(--orb-x) var(--orb-y), transparent 96%, rgb(0 0 0 / 0.5) 104%, #000 114%);
}

/* the halo outside the upper-right rim travels with the glow */
.orb-glint__rim {
  background: radial-gradient(ellipse 20% 16% at 70% 40%,
    rgba(255, 240, 250, 0.6) 0%,
    rgba(255, 215, 238, 0.22) 50%,
    rgba(255, 236, 248, 0) 100%);
  opacity: 0.75;
  transform-origin: var(--orb-x) var(--orb-y);
  animation: orb-glint-halo 5.6s ease-in-out infinite, orb-glint-travel 13s ease-in-out infinite;
}

/* the bright patch in the shadow drifts a little the opposite way */
.orb-glint__halo {
  background:
    radial-gradient(ellipse 13% 3.8% at 48% 72.5%,
      rgba(255, 240, 248, 0.75) 0%,
      rgba(255, 215, 238, 0.28) 50%,
      rgba(255, 235, 245, 0) 100%);
  opacity: 0.75;
  transform-origin: 48% 72.5%;
  animation: orb-glint-halo 5.6s ease-in-out infinite, orb-glint-shift 13s ease-in-out infinite;
}

/* The glow itself, kept inside the orb */
.orb-glint__core {
  /* a soft fade at the rim (not a hard cut), so the glow never shows a
     sharp edge where it meets the side of the orb */
  -webkit-mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-r) at var(--orb-x) var(--orb-y), #000 80%, rgb(0 0 0 / 0.5) 91%, transparent 99%);
  mask-image: radial-gradient(ellipse var(--orb-r) var(--orb-r) at var(--orb-x) var(--orb-y), #000 80%, rgb(0 0 0 / 0.5) 91%, transparent 99%);
  mix-blend-mode: screen;
  /* the whole glow swings a little around the orb's center, so it slides
     along the curve of the glass rather than across it */
  transform-origin: var(--orb-x) var(--orb-y);
  animation: orb-glint-travel 13s ease-in-out infinite;
}

.orb-glint__core::before,
.orb-glint__core::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: var(--gx) var(--gy);
  rotate: var(--glint-tilt);
}

/* white glow: a bright soft center inside a wider haze */
.orb-glint__core::before {
  background:
    radial-gradient(ellipse 4% 6.5% at var(--gx) var(--gy),
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.5) 45%,
      rgba(255, 255, 255, 0) 100%),
    radial-gradient(ellipse 11% 16% at var(--gx) var(--gy),
      rgba(255, 240, 248, 0.55) 0%,
      rgba(255, 225, 242, 0.2) 50%,
      rgba(255, 255, 255, 0) 100%);
  opacity: 0.8;
  animation: orb-glint-pulse 5.6s ease-in-out infinite;
}

/* pink shimmer that drifts a little along the rim, on its own slower beat */
.orb-glint__core::after {
  background:
    radial-gradient(ellipse 5% 10% at calc(var(--gx) + 3.2%) var(--gy),
      rgba(255, 140, 200, 0.95) 0%,
      rgba(255, 150, 205, 0.38) 50%,
      rgba(255, 170, 215, 0) 100%),
    radial-gradient(ellipse 4% 6% at calc(var(--gx) - 2.6%) calc(var(--gy) + 2%),
      rgba(255, 160, 210, 0.55) 0%,
      rgba(255, 160, 210, 0) 100%);
  opacity: 0.3;
  animation: orb-glint-pink 7.3s ease-in-out infinite;
}

/* Soft highlights along the bright bottom rim of the orb, each pulsing and
   drifting along the rim on its own beat, so the light seems to move
   around the base of the glass. */
.orb-glint__dot {
  mix-blend-mode: screen;
  opacity: 0.2;
  background: radial-gradient(ellipse var(--dw) var(--dh) at var(--dx) var(--dy),
    rgba(255, 248, 252, 1) 0%,
    rgba(255, 185, 225, 0.5) 50%,
    rgba(255, 185, 225, 0) 100%);
  transform-origin: var(--orb-x) var(--orb-y);
  animation:
    orb-glint-dot var(--dt) ease-in-out var(--dd) infinite,
    orb-glint-drift calc(var(--dt) * 2.3) ease-in-out var(--dd) infinite;
}

.orb-glint__dot--1 { --dx: 51%;   --dy: 69.4%; --dw: 12%;  --dh: 3.4%; --dt: 3.4s; --dd: -0.6s; } /* the bottom */

@keyframes orb-glint-dot {
  0%, 100% { opacity: 0.05; }
  40%      { opacity: 1; }
  62%      { opacity: 0.3; }
  78%      { opacity: 0.9; }
}

@keyframes orb-glint-travel {
  0%, 100% { rotate: -6deg; }
  22%      { rotate: 4deg; }
  41%      { rotate: -2deg; }
  63%      { rotate: 9deg; }
  82%      { rotate: -4deg; }
}

@keyframes orb-glint-shift {
  0%, 100% { translate: 3% 0;       scale: 0.9 1; }
  22%      { translate: -2% 0.3%;   scale: 1.12 1.05; }
  41%      { translate: 1.5% -0.2%; scale: 0.95 0.95; }
  63%      { translate: -4% 0.4%;   scale: 1.2 1.08; }
  82%      { translate: 2% 0;       scale: 1 1; }
}

@keyframes orb-glint-drift {
  0%, 100% { rotate: -9deg; }
  50%      { rotate: 9deg; }
}

@keyframes orb-glint-pulse {
  0%   { opacity: 0.35; scale: 0.85; }
  18%  { opacity: 1;    scale: 1.14; }
  31%  { opacity: 0.6;  scale: 0.94; }
  47%  { opacity: 0.95; scale: 1.08; }
  64%  { opacity: 0.4;  scale: 0.87; }
  81%  { opacity: 1;    scale: 1.16; }
  100% { opacity: 0.35; scale: 0.85; }
}

@keyframes orb-glint-halo {
  0%, 100% { opacity: 0.3; }
  18%      { opacity: 1; }
  31%      { opacity: 0.55; }
  47%      { opacity: 0.9; }
  64%      { opacity: 0.35; }
  81%      { opacity: 1; }
}

@keyframes orb-glint-pink {
  0%, 100% { opacity: 0.25; translate: 0 -2%; }
  35%      { opacity: 1;    translate: 0 0.5%; }
  60%      { opacity: 0.45; translate: 0 2%; }
  80%      { opacity: 0.9;  translate: 0 -0.5%; }
}

@media (prefers-reduced-motion: reduce) {
  .orb-glint__halo,
  .orb-glint__rim,
  .orb-glint__core,
  .orb-glint__core::before,
  .orb-glint__core::after,
  .orb-glint__dot {
    animation: none;
  }
  .orb-glint__rim { opacity: 0.8; }
  .orb-glint__dot { opacity: 0.5; }
  .orb-glint__halo { opacity: 0.8; }
  .orb-glint__core::before { opacity: 0.85; }
  .orb-glint__core::after { opacity: 0.4; }
}

.about__info {
  grid-area: info;
}

.about__cell {
  padding: var(--box-pad-y) var(--box-pad-x);
}

.about__cell + .about__cell {
  border-top: var(--line);
}

.about__cell .label {
  margin-bottom: calc(var(--u) * 0.2);
  line-height: 1.2;
}

.about__value {
  margin: 0;
  font-size: var(--about-size);
  font-weight: var(--weight-bold);
  line-height: 1;
}

.about__text {
  grid-area: text;
  border-left: var(--line);
  padding: var(--box-pad-y) calc(var(--u) * 2.4) var(--box-pad-y) var(--box-pad-x);
}

.about__text p:not(.label) {
  margin: 0;
  font-size: var(--about-size);
  line-height: 1.45;
}

.about__text p.about__resume {
  margin-top: 1lh;
}

/* Square close button just outside the box's top-right corner, on the right
   edge. Its top edge sits on the box's top border and its left edge on the
   box's right border, so each shared edge is one line, not two. */
.about__close {
  position: absolute;
  top: -1px;
  right: calc(var(--arrow-button-size) * -1);
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--arrow-button-size);
  aspect-ratio: 1;
  padding: 0;
  border: var(--line);
  background: var(--color-box);
  cursor: pointer;
  transition: background-color var(--hover-duration) ease;
}

.about__close .icon {
  margin: 0;
  height: calc(var(--u) * 1.4);
  transition: filter var(--hover-duration) ease;
}

.about__close:hover,
.about__close:focus-visible {
  background: var(--color-hover);
  outline: none;
}

.about__close:hover .icon,
.about__close:focus-visible .icon {
  filter: invert(1);
}

/* Phones: the orb row on top (orb left, name and location right), then the
   statement */
@media (max-width: 800px) {
  .about {
    width: calc(100vw - 2 * var(--page-gutter));
    min-width: 0;
    max-width: none;
  }

  .about__grid {
    grid-template-columns: 30% 1fr;
    grid-template-areas:
      "cover info"
      "text  text";
  }

  /* The photo fills the height of the name block beside it */
  .about__cover {
    aspect-ratio: auto;
    align-self: stretch;
    border-right: var(--line);
  }

  .about__info {
    border-bottom: var(--line);
  }

  .about__text {
    border-left: 0;
  }

  /* On phones the X sits just outside the box's top-right corner. Its bottom
     and right edges sit exactly on the box's border, so there is one line. */
  .about__close {
    top: calc(var(--arrow-button-size) * -1);
    right: -1px;
    border: var(--line);
  }
}

/* ---------- Dark theme (orchids page only) ----------
   The page is marked <body class="theme-dark">. Only colors change here; the
   layout is the same as the light pages. Black boxes sit on a near-black
   page with a faint green at the bottom, so the black photo backgrounds blend
   into the boxes. --line is set again here because it was built from
   --color-line on :root, and a custom property keeps the value it was
   first resolved with. */
.theme-dark {
  color-scheme: dark;
  --color-text: #ecebe4;                 /* warm off-white */
  --color-line: #3a3a3a;                 /* site borders: dark gray */
  --color-box: #000;                     /* section backgrounds: black */
  --color-media: #141513;
  --color-placeholder: #1a1b19;
  --color-accent: #3b82ff;               /* secondary blue: "orchids" in the header, focus rings. Same hue as the site blue, lightened to pass contrast on black (about 5.8:1) */
  --color-hover: #3b82ff;                /* hover fill and hover oval, same blue */
  --color-hover-text: #000;              /* black text on the blue (about 5.8:1; white would be about 3.9:1) */
  --gradient-top: #000;                  /* solid black page background */
  --gradient-bottom: #000;
  --line: 1px solid var(--color-line);
}

/* Arrow icons are black SVGs. On the dark page they are flipped to white.
   The hover rules already flip them (to white on the blue fill), so they
   stay correct. */
.theme-dark .icon {
  filter: invert(1);
}

/* Hover caption on a photo: a soft black chip so the name reads over any
   flower color (the light theme has no chip) */
.theme-dark .work-squares__caption {
  background: rgb(0 0 0 / 0.72);
}

/* The orb photo: inverted, then grayscale, then darkened */
.theme-dark .orb-photo img {
  filter: invert(1) grayscale(1) brightness(0.25);
}

/* The moving highlight on the orb: turned down to about a third of its
   light-theme strength, so it reads as a soft sheen on the dark glass */
.theme-dark .orb-photo__light {
  opacity: 0.35;
}

/* The light under the orb is off: the moving patch of light (the caustic)
   is dropped. Only a very faint wash of background light is kept. */
.theme-dark .orb-photo::before {
  background: radial-gradient(ellipse 42% 60% at var(--lx, 33.3%) 42%,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0) 100%);
}

/* The enlarged photo sits over a dark veil, not the light frost of the
   light theme */
.theme-dark .lightbox--full {
  background: rgb(0 0 0 / 0.55);
}

/* Orchid photos: the page is marked data-popup-native. Photos in the grid
   are clickable and show larger in the popup. */
[data-popup-native] .work-squares img {
  cursor: pointer;
}

/* Orchid popup: metadata strip under the photo, split by a 1px line */
.lightbox__meta {
  box-sizing: border-box;
  display: block;
  padding: 0 0 calc(var(--u) * 0.75);
  border-top: var(--line);
  background: var(--color-box);
  color: var(--color-text);
  font-size: calc(var(--u) * 1);
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
}

.lightbox__meta[hidden] {
  display: none;
}

.lightbox__meta p {
  margin: 0;
}

.lightbox__meta-name {
  padding: calc(var(--u) * 0.6) calc(var(--u) * 0.9);
  font-size: calc(var(--u) * 1.25); /* the name reads a little larger than the details */
  border-bottom: var(--line); /* divider between the name and the details */
}

.lightbox__meta-details {
  padding: calc(var(--u) * 0.6) calc(var(--u) * 0.9) 0;
  font-size: calc(var(--u) * 1.1);
}

.lightbox__meta-name,
.lightbox__meta-row {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-serif-light);
  font-variation-settings: var(--serif-axes);
  letter-spacing: var(--tracking-serif);
}

/* The labels in the details ("Hybrid cross:", "Species native to:") match the values */
.lightbox__meta-label {
  font-weight: var(--weight-serif-light);
}

/* The name is set a little heavier than the details */
.lightbox__meta-name {
  font-weight: 500;
}

@media (max-width: 800px) {
  .lightbox__meta:has(> .lightbox__meta-name) {
    padding: 0;
  }

  .lightbox__meta-name,
  .lightbox__meta-details {
    padding: var(--lightbox-compact-padding);
  }

  .lightbox__meta-name {
    font-size: var(--lightbox-compact-title-size);
  }
}

.lightbox--full.lightbox--ceramics {
  background-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  opacity: 1;
  pointer-events: none;
  transition: visibility 0s linear var(--menu-close);
}

.lightbox--full.lightbox--ceramics::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom,
    color-mix(in srgb, var(--gradient-bottom) 48%, transparent),
    rgb(255 255 255 / 0.7) 50%,
    color-mix(in srgb, var(--gradient-bottom) 48%, transparent));
  -webkit-backdrop-filter: blur(14px) brightness(1.08) saturate(1.1);
  backdrop-filter: blur(14px) brightness(1.08) saturate(1.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease-out;
}

.lightbox-open .lightbox--full.lightbox--ceramics {
  pointer-events: auto;
  transition: visibility 0s;
}

.lightbox-open .lightbox--full.lightbox--ceramics::before {
  opacity: 1;
  transition-duration: 100ms;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox--full.lightbox--ceramics {
    transition-delay: 0s;
  }
}

/* The selected ceramics thumbnail is marked by opacity. Keep keyboard
   focus visible with a ring inset from the gallery dividers. */
.lightbox--ceramics .lightbox__thumb::after {
  box-shadow: none;
}

.lightbox--ceramics .lightbox__thumb:focus-visible {
  outline: 2px solid white;
  outline-offset: -5px;
}

/* Ceramics gallery details borrow the work page's labels and typography. */
.lightbox--ceramics .lightbox__meta:not([hidden]) {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 0;
  background: var(--color-line);
}

.lightbox__work-cell {
  min-width: 0;
  padding: calc(var(--u) * 0.75);
  background: var(--color-box);
}

.lightbox__work-cell .work-card__label {
  margin-bottom: calc(var(--text-small) * 0.3);
}

.lightbox__work-cell .work-card__title,
.lightbox__work-cell .work-card__value {
  font-size: calc(var(--text-card-title) * 1.05);
  line-height: 1.2;
}

.lightbox__work-cell .work-card__title {
  font-weight: var(--weight-bold);
}

@media (max-width: 800px) {
  /* The year cell spans the width of the first two thumbnail slots. */
  .lightbox--ceramics .lightbox__meta:not([hidden]) {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 0;
    background: var(--color-box);
  }

  .lightbox--ceramics .lightbox__work-cell {
    padding: var(--lightbox-compact-padding);
    font-size: 12px;
    line-height: 1.35;
  }

  .lightbox--ceramics .lightbox__work-cell:first-child .work-card__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .lightbox--ceramics .lightbox__work-cell:not(:last-of-type) {
    border-bottom: var(--line);
  }

  .lightbox--ceramics .lightbox__work-cell:is(:first-child, :nth-child(4)) {
    grid-column: 1 / -1;
  }

  .lightbox--ceramics .lightbox__work-cell:nth-child(2) {
    border-right: var(--line);
  }

  .lightbox--ceramics .work-card__title {
    font-family: var(--font-serif);
    font-style: italic;
    font-variation-settings: var(--serif-axes);
    letter-spacing: var(--tracking-serif);
    font-size: var(--lightbox-compact-title-size);
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lightbox--ceramics .lightbox__work-cell:not(:first-child) .work-card__label {
    display: inline;
    margin: 0;
    font: inherit;
    font-weight: var(--weight-bold);
    letter-spacing: normal;
  }

  .lightbox--ceramics .work-card__value {
    display: inline;
    margin-inline-start: 0.25em;
    font-size: inherit;
    line-height: inherit;
  }

  .lightbox--ceramics .lightbox__work-cell--dimensions .work-card__value {
    display: inline-block;
    white-space: nowrap;
  }
}

@media (width > 800px) {
  .lightbox--ceramics {
    --lightbox-details-width: 310px;
  }

  .lightbox--ceramics .lightbox__box {
    display: flex;
  }

  .lightbox--ceramics .lightbox__meta:not([hidden]) {
    flex: 0 0 auto;
    order: -1;
    width: var(--lightbox-details-width);
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, max-content) 1fr;
    border-top: 0;
    border-right: var(--line);
    contain: size;
    overflow: auto;
  }

  .lightbox--ceramics .lightbox__meta:has(> .lightbox__work-cell:nth-child(3):last-of-type) {
    grid-template-rows: max-content max-content 1fr;
  }

  .lightbox--ceramics .lightbox__meta:has(> .lightbox__work-cell:nth-child(2):last-of-type) {
    grid-template-rows: max-content 1fr;
  }

  .lightbox--ceramics .lightbox__work-cell {
    padding: calc(var(--u) * 2);
  }

  .lightbox--ceramics .lightbox__work-cell .work-card__title,
  .lightbox--ceramics .lightbox__work-cell .work-card__value {
    font-size: 21px;
  }
}

@media (width > 800px) {
  .lightbox--ceramics .lightbox__work-cell:first-child {
    padding-right: max(44px, calc(var(--u) * 2));
  }
}

/* Desktop ceramics reveal the close control for keyboard focus. */
@media (width > 800px) {
  .lightbox--ceramics .lightbox__close:focus-visible {
    top: 0;
    right: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: visible;
    clip: auto;
    background: none;
    cursor: pointer;
    outline: 2px solid var(--color-hover);
    outline-offset: -4px;
  }

  .lightbox--ceramics .lightbox__close .icon {
    height: 16px;
    margin: 0;
    translate: 4px -4px;
  }
}

/* Collection dropdown (orchids page): clicking "Collection" opens a list of
   the photos, by Species and then Hybrids. It reuses the Contents menu's
   look (.index-sec, .label, .index-cell) and floats over the photos at half
   the box's width (full width on phones). Its top edge is the bar's line and
   its left edge is the box's line; it draws only its right and bottom lines. */
.work-browser__head {
  position: relative;
}

/* "Collection" is the button. No hover or open state (only a focus line
   for keyboard users). */
.work-browser__toggle {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.work-browser__toggle:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 2px;
}

/* Chevron after "Collection", on the text's visual middle; it flips up
   while the list is open */
.work-browser__chevron {
  display: inline-block;
  width: calc(var(--wb-t) * 0.6);
  height: auto;
  margin-left: 0.35em;
  vertical-align: middle;
  position: relative;
  top: calc(var(--wb-t) * 0.25); /* nudged down onto the middle of the letters (cap top to baseline) */
  transition: rotate 200ms ease;
}

.work-browser__toggle[aria-expanded="true"] .work-browser__chevron {
  rotate: 180deg;
}

/* Species / Hybrids / All sits at the right end of the "Collection" row,
   styled like Chronological / Curated on the ceramics page */
.work-browser__bar--menu .work-browser__order {
  margin-left: auto;
}

/* "All" is short and leans right in italic, so its circle looked shifted
   left. Nudge it about 1px right (same total width). */
.work-browser__order button[data-filter="all"] .work-browser__opt {
  --oval-left: 0.42em;
  --oval-right: 0.58em;
}

/* Photos filtered out by Species / Hybrids */
.work-squares__item[hidden] {
  display: none;
}

/* Phones only: a square X box at the right end of the "Collection" row
   while the list is open. It sits inside the row, so it draws no lines of
   its own (like the X in the Contents panel). Box hover: fills blue, the X
   turns white. */
.work-browser__bar--menu {
  position: relative;
}

.work-browser__close {
  display: none;
}

@media (max-width: 800px) {
  .work-browser__close:not([hidden]) {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 0;
    background: var(--color-box);
    border: 0;
    cursor: pointer;
    transition: background-color var(--hover-duration) ease;
  }

  .work-browser__close .icon {
    margin: 0;
    height: calc(var(--u) * 1.4);
    transition: filter var(--hover-duration) ease;
  }

  /* While the list is open, the X takes the switcher's place at the end of
     the row (the list covers the photos, so the switcher has nothing to do) */
  .work-browser__bar--menu:has(.work-browser__close:not([hidden])) .work-browser__order {
    visibility: hidden;
  }

  .work-browser__close:hover,
  .work-browser__close:focus-visible {
    background: var(--color-hover);
    outline: none;
  }

  .work-browser__close:hover .icon,
  .work-browser__close:focus-visible .icon {
    filter: invert(1);
  }
}

.work-browser__menu {
  /* same spacing as the Contents menu */
  --index-pad-x: calc(var(--box-pad-x) * 0.75);
  --index-pad-y: calc(var(--box-pad-y) * 0.75);
  --index-cell-y: calc(var(--u) * 0.75);
  --index-cell-y-compact: calc(var(--u) * 0.35);
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 3;
  width: 50%;
  box-sizing: border-box;
  background: var(--color-box);
  border-right: var(--line);
  border-bottom: var(--line);
}

.work-browser__menu[hidden] {
  display: none;
}

#ceramics-archive-menu {
  --index-pad-y: calc(var(--box-pad-y) * 0.65);
  top: calc(100% - 1px);
  border-top: var(--line);
}

/* The names are buttons, set like the Contents menu's links */
.work-browser__menu .index-cell {
  width: 100%;
  margin: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.work-browser__menu .index-cell:focus-visible {
  outline: none; /* the oval shows focus */
}

/* Phones: the list runs the full width; its right edge is the box's edge,
   drawn beside it like the bar's */
@media (max-width: 800px) {
  .work-browser__menu {
    width: 100%;
    border-right: 0;
    box-shadow: 1px 0 0 var(--color-line);
  }
}

/* Orchid photos open the popup, so each one shows a white outline on hover
   and keyboard focus. The outline is drawn inside the photo's own edge, so
   it does not double up with the lines between photos. */
[data-popup-native] .work-squares__item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

[data-popup-native] .work-squares__item:hover::after,
[data-popup-native] .work-squares__item:focus-visible::after {
  box-shadow: inset 0 0 0 1px #fff; /* white outline on the dark orchids page */
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* These panels dismiss from outside, from their trigger, or with Escape. */
.about__close,
.work-browser__close,
.work-browser__close:not([hidden]) {
  display: none;
}

/* Browser mockup (case studies): a 16:10 window whose screen scrolls on its own.
   Hover, touch, or focus it and the visitor scrolls it themselves. */
.cs-browser {
  background: var(--color-box);
  border: var(--line);
}

.cs-browser__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: var(--line);
}

.cs-browser__dots {
  display: flex;
  gap: 5px;
  flex: none;
}

.cs-browser__dots i {
  width: 8px;
  height: 8px;
  border: var(--line);
  border-radius: 50%;
}

.cs-browser__viewport {
  aspect-ratio: 16 / 10;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.cs-browser__viewport:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.cs-panel .cs-browser__viewport img {
  width: 100%;
}

/* Sticky top bar and bottom action bar inside the browser mockup: the same
   screenshot cropped to that strip (height and offset set inline per image). */
.cs-browser__sticky {
  position: sticky;
  z-index: 1;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.cs-browser__sticky--top {
  top: 0;
  background-position: top;
}

.cs-browser__sticky--bottom {
  bottom: 0;
  background-position: bottom;
}

/* The browser frame already draws the edge, so the screen inside it skips
   the v2 inside border (and the phone border) that would double it up. */
.case-study--v2 .cs-media .cs-panel .cs-browser img:not(:focus-visible) {
  outline: none;
}

.case-study .cs-panel .cs-browser img {
  border: 0;
}

/* A media column split in two parts (Cloud Pak System v2, section 2): the
   second part bleeds out to the column's edges and is set off by one 1px
   line running edge to edge (it keeps the column's own background). */
.cs-media__part {
  margin: var(--cs-pad) calc(var(--cs-pad) * -1) calc(var(--cs-pad) * -1);
  padding: var(--cs-pad);
  border-top: var(--line);
}
