/* Glass: only active once glass.js has a WebGL2 canvas (html.glass-on). The canvas paints the beach and the
   slabs; this file takes the paint off the DOM boxes so the glass shows through, and rounds them to match. */
#glass {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}
.glass-on #myVideo,
.video-twin {
  opacity: 0;                 /* still play: they are the canvas's texture (the twin makes the loop gapless) */
}
.video-twin {
  position: fixed;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  pointer-events: none;
}
.glass-on body {
  background: #a08d6c;
}
.glass-on body::before {
  display: none;
}

/* slabs: no fill, no border, rounder corners (thick glass is never sharp) */
.glass-on .card,
.glass-on .nameplate,
.glass-on .bar,
.glass-on .card.contact-card {
  background: transparent;
  border-color: transparent;
  border-radius: 20px;
  box-shadow: none;
}
.glass-on .bar::before,
.glass-on .contact-card::before {
  display: none;
}
.glass-on .card:hover,
.glass-on .card.has-motion:focus-within,
.glass-on .card.contact-card:hover {
  border-color: transparent;
  box-shadow: none;
}

/* the rule under each title is a groove cut into the glass: a shaded wall on top, a lit lip below */
.glass-on .card-head {
  border-bottom: 1px solid rgba(30, 45, 35, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.glass-on .contact-card .card-head {
  border-bottom-color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 1px 0 rgba(237, 199, 103, 0.28);
}

/* text that belongs to the glass (Apple's "vibrancy" idea, without giving up contrast): the ink is a very dark
   shade of its own glass (green-black on sage, umber on sand, deep teal on sea), heavier than the house's 400 (500:
   thin strokes look weak on glass), and etched: a lit lip on the side away from the light. glass.js sets
   --ex/--ey per slab from where the light is (pointer or sun), so the engraving catches the light as it moves.
   Light ink on the green glass gets a dark lip toward the light instead. */
.glass-on .card,
.glass-on .nameplate {
  --ink: #1f2119;
  --ink-2: #33362c;
  --ink-3: #393c31;
  --etch: rgba(255, 255, 255, 0.58);
  --etch-shade: rgba(0, 0, 0, 0.12);
  text-shadow: calc(var(--ex, 0.5) * 1px) calc(var(--ey, 1) * 1px) 0 var(--etch),
    calc(var(--ex, 0.5) * -0.6px) calc(var(--ey, 1) * -0.6px) 0 var(--etch-shade);
}
.glass-on .card.sage { --ink: #16271b; --ink-2: #2a3a2d; --ink-3: #304133; }
.glass-on .card.sand { --ink: #2a1f12; --ink-2: #3d3020; --ink-3: #433524; }
.glass-on .card.sea { --ink: #11262a; --ink-2: #26393b; --ink-3: #2c3f41; }
.glass-on .nameplate { --ink: #241f15; --ink-2: #3a3324; --ink-3: #3f3828; }
.glass-on .card-content,
.glass-on .nameplate .lede {
  font-weight: 500;
}

/* each card head carries a small picture of what the card is about (static/images/etch/<name>.svg, and
   <name>-compact.svg with only its key object for narrow heads): matte, grainy paper in the house's soft
   illustration colours, set into the glass. Matte paper against the glossy, refracting slab. Under it, the wall of
   the cut it sits in: its silhouette in the card's own house colour (green on sage and sea, ochre on sand,
   terracotta on paper; dark on the green contact glass), toward the light. glass.js picks full or compact and sizes
   and places it (--art, right, width, height) so it never lies under the title. The drawings on sea and sage glass carry darker colours (their outlines nearly matched
   that glass), so every card shows its picture at one strength, outlines about 2.4:1. */
.etching {
  display: none;
}
.glass-on .card-head {
  position: relative;
}
.glass-on .card-head > :not(.etching) {
  position: relative;
  z-index: 1;
}
.glass-on .etching {
  display: block;
  position: absolute;
  pointer-events: none;
  background: var(--art) center / contain no-repeat;
}
.glass-on .etching[hidden] {
  display: none;
}
/* one plain image: the grain and the cut's wall are baked into each drawing (CSS masks and SVG filters here
   slowed scrolling enough to let the glass lag, and Safari drew the filtered ones blurry) */
.glass-on .card.contact-card,
.glass-on .bar {
  text-shadow: calc(var(--ex, 0.5) * -1px) calc(var(--ey, 1) * -1px) 0 rgba(0, 0, 0, 0.6),
    calc(var(--ex, 0.5) * 0.6px) calc(var(--ey, 1) * 0.6px) 0 rgba(255, 255, 255, 0.12);
}
.glass-on .bar .tab {
  --etch: rgba(255, 255, 255, 0.68);
  color: #1f2119;
  text-shadow: calc(var(--ex, 0.5) * 1px) calc(var(--ey, 1) * 1px) 0 var(--etch),
    calc(var(--ex, 0.5) * -0.6px) calc(var(--ey, 1) * -0.6px) 0 rgba(0, 0, 0, 0.1);
}

/* the tabs: light glass tiles on the green glass bar (drawn by glass.js); the active one is warmer glass
   with its terracotta rule. While the bar lies over the cards, glass.js fades them out under it */
.glass-on .bar .tab,
.glass-on .bar .tab:hover,
.glass-on .bar .tab.active {
  background: transparent;
  border-color: transparent;
  border-radius: 14px;
}
.glass-on .bar .tab.active {
  box-shadow: inset 0 -3px 0 rgba(181, 101, 77, 0.85);
}

/* what sits on the glass: frosted inlays rather than paper stickers */
.glass-on .group,
.glass-on .k3 .skill,
.glass-on .k2 .skill {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.55);
}
/* skill tiles tinted by how well I know them: Daily green, Solid blue, Familiar terracotta (each a hue apart from
   the sand glass);
   the groups without a level (payment systems, human languages) stay plain frosted glass. The legend's markers
   carry the same tints, so the key explains them */
.glass-on .skills[aria-label$=", daily"] .skill,
.glass-on .legend .s3 { --lvl: #2f8a68; --lvl-a: 22%; }
.glass-on .skills[aria-label$=", solid"] .skill,
.glass-on .legend .s2 { --lvl: #2f6fb0; --lvl-a: 24%; }
.glass-on .skills[aria-label$=", familiar"] .skill,
.glass-on .legend .s1 { --lvl: #b5654d; --lvl-a: 16%; }
.glass-on .skills[aria-label$=", daily"] .skill,
.glass-on .skills[aria-label$=", solid"] .skill,
.glass-on .skills[aria-label$=", familiar"] .skill {
  background: color-mix(in srgb, var(--lvl) var(--lvl-a), rgba(255, 255, 255, 0.4));
  border-color: color-mix(in srgb, var(--lvl) 45%, rgba(255, 255, 255, 0.5));
}
.glass-on .skills[aria-label$=", daily"] a.skill:hover,
.glass-on .skills[aria-label$=", solid"] a.skill:hover,
.glass-on .skills[aria-label$=", familiar"] a.skill:hover {
  background: color-mix(in srgb, var(--lvl) calc(var(--lvl-a) + 10%), rgba(255, 255, 255, 0.55));
}
.glass-on .carousel-item > button {
  background: rgba(220, 212, 191, 0.5);
}
.glass-on .card iframe,
.glass-on .carousel-item img {
  border-radius: 10px;
}

/* the paper plane, redrawn as SVG and rendered at 1x and 2x so it stays sharp on retina screens;
   glass.js treats the pointer as the light the glass catches */
.glass-on body {
  cursor: url("../images/cursor-plane.png") 2 2, default;
  cursor: -webkit-image-set(url("../images/cursor-plane.png") 1x, url("../images/cursor-plane@2x.png") 2x) 2 2, default;
  cursor: image-set(url("../images/cursor-plane.png") 1x, url("../images/cursor-plane@2x.png") 2x) 2 2, default;
}

/* the carousel's bar at the bottom of the card: the arrows and the count as one group in the middle,
   ‹ 2 of 5 › (together, never at opposite ends), under a groove like the head's rule. The Skills card's count and
   arrows live here too */
.card-foot {
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 10px;
  border-top: 2px solid var(--e);
}
.card-foot .count {
  min-width: 4.5em;
  margin: 0;
  text-align: center;
  font: 500 0.875rem/1.3 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.glass-on .card-foot {
  border-top: 1px solid rgba(30, 45, 35, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
@media (max-width: 760px) {
  .card-foot {
    padding: 6px 14px 8px;
  }
}

/* every card fits the screen (fit.js): at most the visible height minus the bar; text that does not fit is paged
   (a carousel without autoplay, its pages start at the top). The scrolling content box stays only as the last
   resort for one block taller than a page */
.card {
  max-height: var(--fit-h, none);
}
.card-content {
  overflow: auto;
}
.carousel.pages {
  flex: 1;
}
/* the resume: one fixed A4 sheet (794 x 1123 px, 0.5 in margins), scaled by fit.js (--s) to fit the card whole and
   centred in it; white paper. Its frame (the resume's own document) sits inside the margins at 698 px, scaled with
   the sheet, as tall as the page's text. Two sheets share one grid cell: the one shown and the next page, ready to
   slide in beside it */
.frames {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  --s: 0.5;
}
.sheet {
  grid-area: 1 / 1;
  position: relative;
  width: calc(794px * var(--s));
  height: calc(1123px * var(--s));
  visibility: hidden;
  background: #fbfaf6 url("../images/paper-white.png") 0 0 / calc(256px * var(--s)) repeat;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(40, 35, 20, 0.22), 0 4px 14px rgba(40, 35, 20, 0.16);
}
.sheet.shown {
  visibility: visible;
}
.sheet {
  cursor: zoom-in;               /* a tap or click opens the page full screen (fit.js) */
  -webkit-tap-highlight-color: transparent;
}
.sheet > iframe,
.sheet > #cv-iframe {           /* site.css gives the frame 85 % of the screen and a border */
  position: absolute;
  top: 0;
  left: 0;
  width: 698px;
  height: 1027px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform-origin: 0 0;
  transform: translate(calc(48px * var(--s)), calc(48px * var(--s))) scale(var(--s));
}
.glass-on .card .sheet > iframe {
  border-radius: 0;
}
/* the resume's bar: print at the start, the PDF at the end, the page arrows together in the middle; all three
   as the same deep-green glass slabs (glass.js draws every .arrow), the two ends with a word beside their icon */
.card-foot.resume-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.resume-foot > #cv-print-btn {
  grid-column: 1;
  justify-self: start;
}
.resume-foot > #cv-download-btn {
  grid-column: 3;
  justify-self: end;
}
.resume-foot > .pager {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.arrow.labelled {
  width: auto;
  display: inline-flex;
  gap: 8px;
  padding: 0 16px 0 12px;
  font: 600 0.9375rem/1 var(--sans);
  white-space: nowrap;
}
.arrow.labelled svg {
  flex: none;
  width: 20px;
  height: 20px;
}
.glass-on .arrow.labelled span {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
/* the head is an ordinary head now (its buttons moved to the bar): the picture sits in its top right corner */
.card.resume .card-head {
  grid-template-columns: minmax(0, 1fr) auto;
}
@media (max-width: 760px) {
  .card.resume .card-head {
    height: auto;
    padding: 8px 14px;
  }
  .arrow.labelled {
    padding: 0 12px 0 10px;
  }
  .arrow.labelled .long {
    display: none;
  }
}
/* a narrow phone: the three groups did not fit side by side with words; the ends keep their icon (printer,
   download tray) and their names as aria-label */
@media (max-width: 439px) {
  .arrow.labelled {
    width: var(--ctl);
    padding: 0;
    justify-content: center;
  }
  .arrow.labelled span {
    display: none;
  }
}
/* a phone card grows with its content, a frame has none: the resume card takes the whole room there */
.card.resume {
  height: var(--fit-h, auto);
}
.carousel.pages > .carousel-inner > .carousel-item {
  justify-content: flex-start;
}
/* a list item carried over from the page before: no second bullet */
.carousel-item li.continued {
  list-style: none;
}
.carousel-item li.continued::marker {
  content: none;
}

/* carousel arrows: small deep-green glass slabs (drawn by glass.js), a cream chevron etched on top */
.glass-on .arrow {
  background: transparent;
  border-color: transparent;
  border-radius: 14px;
  color: #f5f0e2;
}
.glass-on .arrow:hover {
  background: transparent;
  color: #fff;
}
.glass-on .arrow svg {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}
.glass-on .arrow:focus-visible {
  outline: 2px solid #edc767;
  outline-offset: 2px;
}

/* scrollbars as glass rods with a half-dome cross-section (a bead of glass lying on the page): the highlight runs
   down the middle, both rims darker where the curve bends the light, a glint on the top cap, a shade under the
   bottom one; green-tinted, mostly clear; no channel, so the beach or the card's glass shows round it. Chrome, Edge and Safari take the ::-webkit-scrollbar
   rules (only while no standard scrollbar-width/-color is set on the element, hence the reset); Firefox can
   only colour its own bar, so it gets a pale thumb on a clear track. */
.glass-on {
  --rod-shape: linear-gradient(90deg,
    rgba(10, 44, 36, 0.55) 0%, rgba(30, 90, 74, 0.26) 18%, rgba(214, 238, 228, 0.3) 36%,
    rgba(246, 252, 248, 0.55) 50%, rgba(214, 238, 228, 0.3) 64%, rgba(30, 90, 74, 0.26) 82%, rgba(10, 44, 36, 0.55) 100%);
  --rod-caps: radial-gradient(ellipse 42% 9px at 50% 6px, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    radial-gradient(ellipse 55% 9px at 50% calc(100% - 4px), rgba(10, 40, 32, 0.32), rgba(10, 40, 32, 0));
  --rod: var(--rod-caps), var(--rod-shape);
  --rod-hover: var(--rod-caps), linear-gradient(90deg,
    rgba(10, 44, 36, 0.6) 0%, rgba(30, 90, 74, 0.3) 16%, rgba(214, 238, 228, 0.36) 34%,
    rgba(250, 254, 252, 0.66) 50%, rgba(214, 238, 228, 0.36) 66%, rgba(30, 90, 74, 0.3) 84%, rgba(10, 44, 36, 0.6) 100%);
}
/* on the dark green contact glass the rod is cream (a green one would vanish there) */
.glass-on .contact-card {
  --rod-shape: linear-gradient(90deg,
    rgba(245, 240, 226, 0.22) 0%, rgba(245, 240, 226, 0.12) 18%, rgba(245, 240, 226, 0.3) 36%,
    rgba(255, 252, 240, 0.6) 50%, rgba(245, 240, 226, 0.3) 64%, rgba(245, 240, 226, 0.12) 82%, rgba(245, 240, 226, 0.22) 100%);
  --rod: var(--rod-caps), var(--rod-shape);
  --rod-hover: var(--rod-caps), var(--rod-shape);
}
@supports selector(::-webkit-scrollbar) {
  .glass-on .card-content {
    scrollbar-width: auto;
  }
  .glass-on .card-content::-webkit-scrollbar {
    width: 14px;
    background: transparent;
  }
  .glass-on .card-content::-webkit-scrollbar-track,
  .glass-on ::-webkit-scrollbar-corner {
    background: transparent;
  }
  /* green-tinted glass, darker at both edges so it reads on bright sand too, a soft highlight stripe */
  .glass-on .card-content::-webkit-scrollbar-thumb {
    min-height: 44px;
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--rod);
    background-clip: padding-box;
  }
  .glass-on .card-content::-webkit-scrollbar-thumb:hover {
    border-width: 2px;
    background: var(--rod-hover);
    background-clip: padding-box;
  }
}
@supports not selector(::-webkit-scrollbar) {
  .glass-on .card-content {
    scrollbar-color: rgba(30, 88, 72, 0.6) transparent;
  }
  .glass-on .contact-card .card-content {
    scrollbar-color: rgba(245, 240, 226, 0.45) transparent;
  }
}

/* the legend's markers: frosted inlays in their level's tint */
.glass-on .legend .s3,
.glass-on .legend .s2 {
  background: color-mix(in srgb, var(--lvl) var(--lvl-a), rgba(255, 255, 255, 0.45));
  border-color: color-mix(in srgb, var(--lvl) 50%, rgba(255, 255, 255, 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 1px rgba(40, 30, 20, 0.12);
}
.glass-on .legend .s1 {
  background: color-mix(in srgb, var(--lvl) var(--lvl-a), rgba(255, 255, 255, 0.2));
  border-color: color-mix(in srgb, var(--lvl) 60%, rgba(43, 49, 41, 0.3));
}

/* the picture viewer: real browser glass (it lies over the page, out of the canvas's reach). The page frosts
   behind it, the picture floats in a clear frame, the title bar is green glass floating above the bottom
   edge, its buttons and the close square are light glass tiles */
.glass-on dialog.modal::backdrop {
  background: rgba(0, 0, 0, 0.09);
}
.glass-on .modal.fullscreen-image-modal {
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  background: rgba(232, 225, 207, 0.12);
}
.glass-on .modal.fullscreen-image-modal .modal-content {
  background: transparent;
}
.glass-on .modal.fullscreen-image-modal .modal-body img {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 18px 50px rgba(15, 30, 25, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
@media (max-width: 760px) {
  /* phones keep the picture edge to edge (as on the live site) */
  .glass-on .modal.fullscreen-image-modal .modal-body img {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}
.glass-on .modal.fullscreen-image-modal .modal-header {
  margin: 0 max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  padding-bottom: 8px;
  /* no backdrop-filter here: it would make the bar the containing block of the close square inside it
     (the viewer itself already frosts the page) */
  background: linear-gradient(180deg, rgba(36, 92, 76, 0.82), rgba(16, 54, 44, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 6px rgba(0, 0, 0, 0.18), 0 10px 30px rgba(10, 25, 20, 0.35);
}
.glass-on .modal.fullscreen-image-modal .modal-title {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.glass-on .gallery-nav,
.glass-on .modal.fullscreen-image-modal .btn-close {
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(250, 246, 234, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(40, 30, 20, 0.12), 0 2px 8px rgba(10, 25, 20, 0.25);
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  backdrop-filter: blur(8px) saturate(1.3);
}
.glass-on .modal.fullscreen-image-modal .btn-close {
  /* keep the X drawn on top of the glass */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(250, 246, 234, 0.42));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px, 100%;
}
.glass-on .gallery-nav:hover,
.glass-on .modal.fullscreen-image-modal .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* the page's own scrollbar is hidden (its strip sits outside the canvas, so no beach could show round it); glass.js
   draws the same glass rod floating over the beach instead. Wheel, keys and touch scroll as before; on touch
   screens the rod stays hidden (their own overlay bars show) */
.glass-on.has-rod {
  scrollbar-width: none;
  scrollbar-gutter: auto;
}
.glass-on.has-rod::-webkit-scrollbar {
  display: none;
}
.rod {
  position: fixed;
  top: 0;
  right: 4px;
  z-index: 1030;
  width: 10px;
  min-height: 44px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(3px) saturate(1.2);
  backdrop-filter: blur(3px) saturate(1.2);
  background: var(--rod);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 1px 3px rgba(10, 25, 20, 0.15);
  cursor: grab;
  touch-action: none;
  transition: width 0.15s, opacity 0.2s;
}
.rod:hover,
.rod.dragging {
  width: 12px;
  background: var(--rod-hover);
}
.rod.dragging {
  cursor: grabbing;
}
.rod[hidden] {
  display: none;
}
@media (hover: none) {
  .rod { display: none; }
}

/* touch screens: the canvas scrolls with the page (glass.js), clipped to the page by its holder; the bar, fixed to
   the screen there, is CSS glass: the page frosted behind green glass, its tabs light glass tiles */
.glass-on.touch-glass body {
  position: relative;
}
.glass-holder {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glass-on.touch-glass #glass {
  position: absolute;
  inset: auto;
  top: 0;
  left: 0;
  will-change: transform;
}
.glass-on.touch-glass .bar {
  background: linear-gradient(180deg, rgba(40, 98, 81, 0.74), rgba(16, 54, 44, 0.86));
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 -6px 16px rgba(15, 30, 25, 0.25);
}
.glass-on.touch-glass .bar .tab {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 243, 230, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(40, 30, 20, 0.12), 0 2px 6px rgba(10, 25, 20, 0.22);
}
.glass-on.touch-glass .bar .tab.active {
  background: linear-gradient(180deg, rgba(255, 246, 222, 0.92), rgba(246, 222, 170, 0.72));
  box-shadow: inset 0 -3px 0 rgba(181, 101, 77, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 6px rgba(10, 25, 20, 0.22);
}

/* touch: the still beach is a 2D canvas fixed to the screen (glass.js .beach-2d, sized and placed there), not the
   video: Firefox on Android paints the clear parts of a see-through WebGL canvas black over a visible video. The
   videos stay invisible (they only feed frames); the sand veil is painted into the 2D beach */
.beach-2d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  z-index: -2;
  pointer-events: none;
}
.glass-on.touch-glass #myVideo,
.glass-on.touch-glass .video-twin {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100lvh;
  opacity: 0;
  filter: none !important;
}

/* ---------------------------------------------------------------- a phone on its side
   Little height, much width: the tab bar becomes a rail down the left edge (its five tiles stacked, clear of the
   notch); one card per row, nearly the whole screen high, a thin head and the page bar as a side strip (below),
   so the text gets full lines and nearly the full height (two cards side by side left 25 characters a line: 57 pages
   against 37). */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --head-h: 2.75rem;
  }
  body {
    padding-bottom: 0;
    padding-left: calc(84px + env(safe-area-inset-left));
  }
  .bar,
  .glass-on.touch-glass .bar {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: calc(76px + env(safe-area-inset-left));
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: max(6px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-width: 0 1px 0 0;
    border-radius: 0;
    box-shadow: 6px 0 16px rgba(15, 30, 25, 0.25);
  }
  .tabs {
    flex: 4;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }
  .bar > .tab {
    flex: 1 1 0;
  }
  .bar .tab {
    flex-direction: column;
    gap: 1px;
    min-height: 0;
    padding: 2px;
    font-size: 0.75rem;
  }
  .bar .tab img {
    width: 22px;
    height: 22px;
  }
  .tab-content > .tab-pane.active {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .card-head h3 {
    font-size: 1.125rem;
  }
  .card-foot {
    padding: 4px 12px 6px;
  }
  /* the skills card takes the whole row: its category panels sit side by side again, as on a desktop */
  .skills-card {
    grid-column: 1 / -1;
  }
  .skills-card .cluster {
    grid-template-columns: var(--cols, repeat(auto-fit, minmax(14rem, 1fr)));
  }
  /* and a little lower, so its legend fits under the panels */
  .skills-card .card-content {
    padding-top: 10px;
    padding-bottom: 8px;
  }
  /* its legend moves up into the thin head line, beside the short title */
  .skills-card {
    position: relative;
  }
  .skills-card .skills-foot {
    position: absolute;
    top: 0;
    left: 10rem;
    height: var(--head-h);
    margin: 0;
    padding: 0;
    z-index: 2;
  }
  .skills-card .k3 .skill {
    width: 5rem;
    height: 4.25rem;
  }
  .skills-card .k3 .ico {
    width: 28px;
    height: 28px;
  }
}

/* a phone on its side, inside each card: a thin head across the whole top, end to end (eyebrow and title on one
   line, the picture at its right as tall as the head, in the same corner as on a card without pages) and under it
   the page bar as a strip down the card's right edge (‹ count ›, stacked), so the text keeps almost the card's
   full height */
@media (max-height: 500px) and (orientation: landscape) {
  .card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .card > .card-head {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 2.75rem;
    padding: 4px 14px;
  }
  .card > .card-head > div:not(.etching) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
  }
  .card > .card-head .eyebrow {
    margin: 0;
  }
  .card > .card-content {
    grid-column: 1;
    grid-row: 2;
  }
  .card > .card-foot {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    padding: 8px 6px;
    border-top: 0;
    border-left: 2px solid var(--e);
  }
  .glass-on .card > .card-foot {
    border-top: 0;
    border-left: 1px solid rgba(30, 45, 35, 0.2);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.6);
  }
  .card-foot .count {
    min-width: 0;
    font-size: 0.75rem;
  }
}

/* a phone on its side: the resume's bar is a strip down the right too (print at the top, the PDF at the bottom,
   the page arrows between), its slabs with icons only (their names stay as aria-label) */
@media (max-height: 500px) and (orientation: landscape) {
  .card-foot.resume-foot {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .resume-foot > .pager {
    flex-direction: column;
  }
  .arrow.labelled {
    width: var(--ctl);
    padding: 0;
    justify-content: center;
  }
  .arrow.labelled span {
    display: none;
  }
}
