/* =========================================================================
   Fatimah — portfolio
   Typography & layout matched to phawita.me reference screenshots
   ========================================================================= */

@font-face {
  font-family: "Year of the Camel";
  src: url("../fonts/TheYearofTheCamel-Light.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Year of the Camel";
  src: url("../fonts/TheYearofTheCamel-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Year of the Camel";
  src: url("../fonts/TheYearofTheCamel-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Year of the Camel";
  src: url("../fonts/TheYearofTheCamel-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --black: #000000;
  --neutral-900: #171717;
  --neutral-700: #404040;
  --neutral-600: #525252;
  --neutral-500: #6b7280;
  --neutral-400: #a3a3a3;
  --mid: #d0d0d0;
  --cursor-color: #000000;
  --rail-w: clamp(240px, 25%, 320px);
  --pad-top: max(2rem, env(safe-area-inset-top, 0px));
  --pad-inline-rail: clamp(1.5rem, 2vw, 2rem);
  --pad-inline-panel: clamp(2rem, 3vw, 3rem);
  --band-gap: 2.75rem;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* phawita type scale — compact */
  --t-title: 0.9375rem;      /* 15px — WORKS, ABOUT ME, BEYOND WORK */
  --t-title-lg: 1rem;        /* 16px — lg breakpoint */
  --t-body: 0.875rem;       /* 14px — intro, body, work captions */
  --t-label: 0.6875rem;      /* 11px — SKILLS, FOCUS, section labels */
  --t-list: 0.875rem;        /* 14px — skills list */
  --t-nav: 0.625rem;         /* 10px — nav pills */
  --t-small: 0.75rem;        /* 12px — meta, milestones */
  --t-rail: 0.8125rem;       /* 13px — rail project list */
  --lh-relaxed: 1.625;
  --lh-tight: 1.25;
  --track-tight: -0.025em;
  --track-wide: 0.05em;
  --track-wider: 0.08em;

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ar: "Year of the Camel", "Geeza Pro", serif;
}

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

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

body {
  background: var(--white);
  color: var(--black);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
}

/* Default page font follows document language */
html[lang="en"],
html[lang="en"] body {
  font-family: var(--sans);
}

html[lang="ar"],
html[lang="ar"] body {
  font-family: var(--ar);
  font-feature-settings:
    "ccmp" 1, "rlig" 1, "calt" 1,
    "salt" 1, "ss01" 1, "ss02" 1, "ss03" 1, "swsh" 1;
  -webkit-font-feature-settings:
    "ccmp" 1, "rlig" 1, "calt" 1,
    "salt" 1, "ss01" 1, "ss02" 1, "ss03" 1, "swsh" 1;
}

/* Per-snippet language — English / Arabic fonts even when mixed on one page */
[lang="en"],
.ui-en {
  font-family: var(--sans);
  font-feature-settings: normal;
  -webkit-font-feature-settings: normal;
}

[lang="ar"],
.ui-ar {
  font-family: var(--ar);
  font-feature-settings:
    "ccmp" 1, "rlig" 1, "calt" 1,
    "salt" 1, "ss01" 1, "ss02" 1, "ss03" 1, "swsh" 1;
  -webkit-font-feature-settings:
    "ccmp" 1, "rlig" 1, "calt" 1,
    "salt" 1, "ss01" 1, "ss02" 1, "ss03" 1, "swsh" 1;
}

/* ---- Custom dot cursor ---------------------------------------------- */
html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none !important;
}

.cursor-dots {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0;
  height: 0;
  pointer-events: none;
  --fan: 0;
  will-change: transform, opacity;
}

.cursor-dots__item {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: var(--cursor-color, var(--black));
  transform: translate(calc(-50% + var(--offset)), -50%);
  transition: background 0.25s var(--ease);
}

.cursor-dots__item:not(.cursor-dots__item--center) {
  opacity: var(--fan);
}

.cursor-dots__item--center {
  width: 8px;
  height: 8px;
  --offset: 0px;
  opacity: 1;
  transition: none;
}

.cursor-dots__item--mid {
  width: 5px;
  height: 5px;
}

.cursor-dots__item--outer {
  width: 3.5px;
  height: 3.5px;
}

.cursor-dots__item--far-left {
  --offset: calc(-46px + var(--fan) * 24px);
}

.cursor-dots__item--near-left {
  --offset: calc(-28px + var(--fan) * 13px);
}

.cursor-dots__item--near-right {
  --offset: calc(28px - var(--fan) * 13px);
}

.cursor-dots__item--far-right {
  --offset: calc(46px - var(--fan) * 24px);
}

.cursor-explore {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  margin-top: -18px;
  margin-inline-start: 14px;
  pointer-events: none;
  --cx: 0px;
  --cy: 0px;
  transform: translate3d(var(--cx), var(--cy), 0);
  will-change: transform;
}

.cursor-explore:not(.is-active) {
  visibility: hidden;
}

.cursor-explore.is-active {
  visibility: visible;
}

.cursor-explore__inner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: scale(0.38);
  transform-origin: center center;
  transition:
    opacity 0.52s ease,
    transform 0.72s cubic-bezier(0.16, 1, 0.32, 1);
  will-change: transform, opacity;
}

.cursor-explore.is-entered .cursor-explore__inner {
  opacity: 1;
  transform: scale(1);
}

.cursor-explore.is-leaving .cursor-explore__inner {
  opacity: 0;
  transform: scale(0.38);
  transition:
    opacity 0.38s ease,
    transform 0.52s cubic-bezier(0.4, 0, 0.65, 1);
}

html[dir="rtl"] .cursor-explore {
  direction: rtl;
  margin-inline-start: -14px;
}

.cursor-explore__pill,
.cursor-explore__orb {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.cursor-explore__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.5rem 0.75rem;
  border-radius: 100px;
}

.cursor-explore__orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cursor-explore__label {
  display: grid;
  align-items: center;
  font-size: var(--t-nav);
  font-weight: 500;
  text-transform: lowercase;
  text-align: center;
  color: var(--black);
  white-space: nowrap;
  line-height: 1;
}

.cursor-explore__ghost,
.cursor-explore__typed {
  grid-area: 1 / 1;
}

.cursor-explore__ghost {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.cursor-explore__typed {
  display: inline-block;
}

.cursor-explore__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cursor-color, var(--black));
  flex-shrink: 0;
  transition: background 0.25s var(--ease);
}

html[dir="rtl"] .cursor-explore__label {
  text-transform: none;
  font-size: 0.6875rem;
  font-weight: 500;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

ul {
  list-style: none;
}

::selection {
  background: var(--black);
  color: var(--white);
}

/* ---- Shared type styles (phawita) ----------------------------------- */
.page__title {
  font-size: var(--t-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-tight);
  line-height: var(--lh-tight);
  color: var(--neutral-900);
}

@media (min-width: 1024px) {
  .page__title {
    font-size: var(--t-title-lg);
  }
}

html[dir="rtl"] .page__title {
  text-transform: none;
  font-weight: 700;
}

.section-label {
  font-size: var(--t-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--neutral-500);
  line-height: var(--lh-tight);
  margin-bottom: 0.625rem;
}

html[dir="rtl"] .section-label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.body-text {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--neutral-700);
}

html[dir="rtl"] .body-text {
}

.body-text--narrow {
  max-width: 28ch;
  margin-bottom: var(--band-gap);
}

.body-text--lead {
  font-size: var(--t-body);
  color: var(--black);
  line-height: var(--lh-relaxed);
}

/* ---- Top bar: language lens + logo ---------------------------------- */
.top-bar {
  position: fixed;
  z-index: 50;
  top: var(--pad-top);
  inset-inline-end: clamp(1.25rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  overflow: visible;
}

.brand {
  display: block;
  flex-shrink: 0;
  color: var(--black);
  transition: opacity 0.35s var(--ease);
}

.brand:hover {
  opacity: 0.7;
}

.brand__logo,
.brand img {
  display: block;
  width: 82px;
  height: auto;
}

/* Language lens — small label beside logo */
.lens-switch {
  position: relative;
  padding: 0;
  text-align: end;
  max-width: 11rem;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

.lens-switch__tip[hidden] {
  display: none !important;
}

.lens-switch__tip {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  z-index: 200;
  width: max-content;
  max-width: min(16rem, 72vw);
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  background: var(--black);
  color: #f4f4f4;
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.45;
  text-align: start;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
  pointer-events: none;
}

.lens-switch__tip.is-visible {
  opacity: 1;
  transform: none;
}

html[dir="rtl"] .lens-switch__tip {
  text-align: end;
}

.lens-switch__text {
  font-size: var(--t-nav);
  font-weight: 400;
  line-height: 1.45;
  color: var(--neutral-400);
  transition: color 0.2s var(--ease);
}

.lens-switch:hover .lens-switch__text {
  color: var(--neutral-600);
}

html[dir="rtl"] .lens-switch__text {
  font-size: 0.6875rem;
}

/* ---- Shell ---------------------------------------------------------- */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--white);
}

@media (min-width: 901px) {
  .shell {
    flex-direction: row;
    height: 100svh;
  }
}

/* ---- Left rail ------------------------------------------------------ */
.rail {
  display: none;
  flex-direction: column;
  width: var(--rail-w);
  background: var(--white);
  padding: var(--pad-top) var(--pad-inline-rail) 1.5rem;
  overflow: hidden;
  text-align: start;
}

@media (min-width: 901px) {
  .rail {
    display: flex;
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 110;
  }
}

.rail__top {
  flex: 0 0 auto;
}

.rail-band {
  flex: 0 0 auto;
}

.rail__spacer {
  flex: 1 1 auto;
  min-height: 2rem;
}

.rail-intro {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--neutral-700);
}

.rail-intro--compact {
  margin-top: 1.25rem;
  font-size: var(--t-small);
}

html[dir="rtl"] .rail-intro {
}

.rail-projects {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rail-band .rail-projects {
  margin-top: 0;
}

.rail__top > .rail-projects {
  margin-top: var(--band-gap);
}

.rail-project {
  font-size: var(--t-rail);
  font-weight: 400;
  line-height: 1.6;
  padding-block: 0.375rem;
  text-transform: uppercase;
  min-height: 1.5em;
  color: var(--neutral-400);
  transition: color 0.2s var(--ease);
}

.rail-project:hover {
  color: var(--neutral-600);
}

.rail-project.is-active {
  font-weight: 700;
  color: var(--black);
}

html[dir="rtl"] .rail-project {
  text-transform: none;
  font-size: var(--t-body);
}

.rail-previews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  margin-top: var(--band-gap);
}

.rail-previews__cell .ph::after {
  display: none;
}

/* Nav — single row, pills beside each other */
.rail__nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 0.5rem 0.5rem;
  border-radius: 100px;
  font-size: var(--t-nav);
  font-weight: 500;
  text-transform: lowercase;
  text-align: center;
  white-space: nowrap;
  color: var(--black);
  background: var(--white);
  border: none;
  outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}

.nav-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.nav-pill.is-active {
  background: #090909;
  color: var(--white);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

.nav-pill.is-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.nav-pill:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.18);
  outline-offset: 2px;
}

html[dir="rtl"] .nav-pill {
  font-size: 0.6875rem;
  text-transform: none;
  font-weight: 500;
}

/* Mobile nav bar */
.rail__nav--mobile {
  display: flex;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 120;
  justify-content: center;
  gap: 0.25rem;
  max-width: 18rem;
  margin-inline: auto;
  padding: 0.35rem 0.35rem max(0.5rem, env(safe-area-inset-bottom));
  pointer-events: none;
  border-radius: 100px;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    0 12px 32px rgba(0, 0, 0, 0.07);
}

.rail__nav--mobile .nav-pill {
  pointer-events: auto;
  flex: 1;
  min-height: 44px;
}

@media (min-width: 901px) {
  .rail__nav--mobile {
    display: none;
  }
}

/* ---- Main panel ----------------------------------------------------- */
.panel {
  flex: 1;
  background: var(--white);
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: var(--pad-top) var(--pad-inline-panel) 6rem;
}

@media (min-width: 901px) {
  .panel {
    margin-inline-start: var(--rail-w);
    min-height: 0;
    height: 100svh;
    padding: var(--pad-top) var(--pad-inline-panel) 3rem;
  }
}

/* Header band — title row aligned with rail intro / list (phawita) */
.page-band {
  margin-bottom: var(--band-gap);
}

.page-band--start {
  text-align: start;
}

.page-band--start .page__title {
  margin: 0;
}

.page-band--start .story-link {
  display: inline-block;
  margin-top: 0.375rem;
}

.shell-title-group {
  text-align: center;
}

.shell-title-group .page__title {
  margin: 0;
}

.shell-title-group .story-link {
  display: inline-block;
  margin-top: 0.375rem;
}

@media (min-width: 901px) {
  .shell-title-group {
    transform: translateX(calc(var(--rail-w) / -2));
  }

  html[dir="rtl"] .shell-title-group {
    transform: translateX(calc(var(--rail-w) / 2));
  }
}

@media (max-width: 900px) {
  .shell-title-group {
    transform: none;
  }
}

.page-header {
  margin-bottom: var(--band-gap);
}

.page-header--center {
  text-align: center;
  margin-bottom: var(--band-gap);
}

.story-link {
  font-size: var(--t-nav);
  font-weight: 400;
  text-transform: lowercase;
  color: var(--neutral-400);
  letter-spacing: 0;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}

.story-link:hover {
  color: var(--neutral-700);
}

html[dir="rtl"] .story-link {
  font-size: 0.6875rem;
  text-transform: none;
  white-space: normal;
}

.page__title--case {
  margin: 0 0 var(--band-gap);
}

.case-inner {
  max-width: 900px;
}

/* Transitions */
.panel .page {
  opacity: 0;
  transform: translateY(8px);
}

.panel.is-ready .page {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.panel.is-leaving .page {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

/* ---- Placeholders --------------------------------------------------- */
.ph {
  position: relative;
  background: var(--mid);
  width: 100%;
  overflow: hidden;
}

.ph::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-nav);
  font-weight: 400;
  letter-spacing: var(--track-wide);
  text-transform: lowercase;
  color: var(--neutral-400);
}

html[dir="rtl"] .ph::after {
  text-transform: none;
  font-size: 0.6875rem;
}

.ph--square { aspect-ratio: 1 / 1; }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--landscape { aspect-ratio: 4 / 3; }
.ph--portrait { aspect-ratio: 3 / 4; }

.glass {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #f5f5f5, #e8e8e8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.glass__note {
  font-size: var(--t-nav);
  font-weight: 400;
  letter-spacing: var(--track-wide);
  text-transform: lowercase;
  color: var(--neutral-400);
  padding: 0.5rem 1rem;
  text-align: center;
}

html[dir="rtl"] .glass__note {
  text-transform: none;
  font-size: 0.6875rem;
}

/* ---- WORKS GRID (phawita stagger) ------------------------------------ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1.5rem;
  row-gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .works-grid {
    column-gap: 2rem;
    row-gap: 3.5rem;
  }
}

.work {
  cursor: pointer;
}

.work__frame {
  background: var(--white);
  overflow: hidden;
}

.work__frame .ph {
  transition: transform 0.5s var(--ease);
}

.work__frame--photo,
.jitem__frame:has(.jitem__img),
.jitem__frame:has(.work__img),
.cs-hero--photo,
.cs-visual--photo {
  background: var(--white);
  width: 100%;
}

.jitem__frame:has(.jitem__img),
.jitem__frame:has(.work__img) {
  aspect-ratio: 16 / 9;
  background: var(--mid);
}

.work__frame--photo {
  aspect-ratio: 1;
}

.cs-hero--photo,
.cs-visual--photo {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: var(--mid);
}

.work__img,
.cs-photo__img,
.rail-previews__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work__img[src*=".svg"],
.cs-photo__img[src*=".svg"],
.rail-previews__img[src*=".svg"] {
  object-fit: contain;
  object-position: center;
}

.cs-hero--photo .cs-photo__img[src*=".png"],
.cs-hero--photo .cs-photo__img[src*=".jpg"],
.cs-hero--photo .cs-photo__img[src*=".webp"],
.cs-visual--photo .cs-photo__img[src*=".png"],
.cs-visual--photo .cs-photo__img[src*=".jpg"],
.cs-visual--photo .cs-photo__img[src*=".webp"] {
  object-fit: contain;
  object-position: center;
}

.work__frame--photo:has(.work__img[src*=".svg"]),
.jitem__frame:has(.jitem__img[src*="-nobg.svg"]),
.jitem__frame:has(.jitem__img[src*=".svg"]),
.jitem__frame:has(.work__img[src*="-nobg.svg"]),
.jitem__frame:has(.work__img[src*=".svg"]),
.cs-hero--photo:has(.cs-photo__img[src*=".svg"]),
.cs-visual--photo:has(.cs-photo__img[src*=".svg"]),
.rail-previews__cell:has(.rail-previews__img[src*=".svg"]) {
  background: #e2e2e2;
}

.rail-previews__cell:has(.rail-previews__img) {
  overflow: hidden;
  aspect-ratio: 1;
}

.jitem__frame .jitem__img,
.jitem__frame .work__img {
  aspect-ratio: auto;
}

.work:hover .work__frame .ph {
  transform: scale(1.015);
}

.work__name {
  text-align: center;
  margin-top: 2.25rem;
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--neutral-900);
  text-transform: lowercase;
}

html[dir="rtl"] .work__name {
  font-weight: 500;
  text-transform: none;
}

/* ---- Journey -------------------------------------------------------- */
.journey {
  position: relative;
  padding-inline-start: 1.5rem;
}

.journey__spine {
  position: absolute;
  inset-block: 0.5rem 1rem;
  inset-inline-start: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.journey__spine::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.5px;
  top: 0;
  width: 1px;
  height: var(--prog, 0%);
  background: var(--black);
  transition: height 0.15s linear;
}

.jitem {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  padding-block: 2.5rem;
  position: relative;
}

.jitem__dot {
  position: absolute;
  inset-inline-start: -1.5rem;
  top: 2.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--black);
  transform: translateX(-50%);
}

html[dir="rtl"] .jitem__dot {
  transform: translateX(50%);
}

.jitem.is-on .jitem__dot {
  background: var(--black);
}

.jitem__year {
  font-size: var(--t-title);
  font-weight: 300;
  letter-spacing: var(--track-tight);
}

html[dir="rtl"] .jitem__year {
  letter-spacing: 0;
}

.jitem__chapter {
  font-size: var(--t-nav);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--neutral-400);
  margin-top: 0.35rem;
}

html[dir="rtl"] .jitem__chapter {
  text-transform: none;
}

.jitem__milestone {
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--neutral-600);
  margin-top: 0.5rem;
  line-height: var(--lh-relaxed);
}

html[dir="rtl"] .jitem__milestone {
}

.jitem__name {
  font-size: var(--t-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-tight);
  margin-bottom: 0.75rem;
}

.jitem__frame {
  margin-bottom: 1.75rem;
}

.jitem__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

html[dir="rtl"] .jitem__name {
  text-transform: none;
}

.jitem__body {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--neutral-700);
  max-width: 54ch;
}

html[dir="rtl"] .jitem__body {
}

.jitem__learned {
  margin-top: 1.25rem;
  padding-inline-start: 0.875rem;
  border-inline-start: 2px solid var(--black);
}

.jitem__learned .l {
  display: block;
  font-size: var(--t-nav);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--neutral-400);
  margin-bottom: 0.35rem;
}

html[dir="rtl"] .jitem__learned .l {
  text-transform: none;
}

.jitem__learned .t {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--black);
}

html[dir="rtl"] .jitem__learned .t {
}

/* ---- Case study ----------------------------------------------------- */
.cs-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 1.875rem;
}

@media (min-width: 768px) {
  .cs-meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.cs-block {
  margin-bottom: 1.875rem;
}

.cs-hero,
.cs-visual {
  margin-bottom: 1.875rem;
}

.cs-block--closing {
  margin-top: 2.5rem;
}

/* ---- About (phawita: title band · content grid · figure) ----------- */
.about-layout {
  display: grid;
  gap: 2rem;
}

.about__stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 900px) {
  /* Match the rail's bottom padding so the figure's bottom edge lands on the
     same line as the nav pills. */
  .panel:has(.page--about) {
    padding-bottom: 1.5rem;
  }

  /* Let the page fill the panel so the figure row can stretch to the bottom. */
  .page--about {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .about-layout {
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 2.5rem;
    row-gap: 2rem;
    align-items: start;
  }

  .about__stack {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .about-layout > .about-block:nth-of-type(1) {
    grid-column: 2;
    grid-row: 1;
  }

  .about-layout > .about-block:nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
  }

  .about-layout > .about-block:nth-of-type(3) {
    grid-column: 2;
    grid-row: 2;
  }

  /* Figure occupies the stretched 3rd row but keeps its capped height,
     pinned to the bottom so it aligns with the side tags / nav pills line. */
  .about__figure {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: end;
    min-height: 0;
  }
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skills-list li {
  font-size: var(--t-list);
  font-weight: 400;
  line-height: 1.45;
  color: var(--black);
}

html[dir="rtl"] .skills-list li {
  font-weight: 400;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tools-list__item {
  font-size: var(--t-list);
  font-weight: 400;
  line-height: 1.45;
  color: var(--neutral-600);
}

html[dir="rtl"] .tools-list__item {
}

.about-block__title {
  font-size: var(--t-body);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--black);
  margin-bottom: 0.3rem;
}

html[dir="rtl"] .about-block__title {
  font-weight: 700;
}

.about__figure .glass {
  aspect-ratio: 16 / 10;
  min-height: 240px;
}

/* ---- Holographic color field — click to set the cursor color -------- */
.color-field {
  position: relative;
  width: 100%;
  height: clamp(200px, 30vh, 300px);
  border-radius: 0;
  overflow: hidden;
}

.color-field__canvas {
  position: absolute;
  left: 0;
  bottom: 0;
  top: auto;
  display: block;
  width: 100%;
  /* height set by JS; crop from the bottom so the flipped arc origin stays in frame */
}

.color-field__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Bloom at bottom-left (matches flipped arc origin) */
  background: radial-gradient(
    125% 105% at 0% 100%,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 252, 0.42) 12%,
    rgba(255, 255, 255, 0.14) 30%,
    rgba(255, 255, 255, 0) 58%
  );
  mix-blend-mode: screen;
}

.color-field__note {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  padding: 0;
  text-align: center;
  color: rgba(27, 27, 27, 0.5);
  pointer-events: none;
}

.color-field__sep {
  margin: 0 0.4em;
  color: rgba(27, 27, 27, 0.4);
}

.color-field__reset {
  font: inherit;
  color: rgba(27, 27, 27, 0.5);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s var(--ease);
}

.color-field__reset:hover {
  color: var(--black);
}

/* ---- Beyond Work — 3D desk embed (full-bleed) ----------------------- */
.page--hobbies {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--pad-top) - 5rem - env(safe-area-inset-bottom, 0px));
}

.page--hobbies.is-desk-modal-open {
  z-index: 30;
}

.page--hobbies .page-band {
  flex: 0 0 auto;
  margin-bottom: clamp(1rem, 2vh, 1.5rem);
}

.hobbies-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: calc(100% + 2 * var(--pad-inline-panel));
  max-width: 100vw;
  margin-inline: calc(-1 * var(--pad-inline-panel));
  overflow: hidden;
  background: var(--white);
  isolation: isolate;
}

.hobbies-stage--desk {
  overflow: hidden;
  min-height: clamp(480px, 68vh, 820px);
}

.hobbies-stage--desk .fatimah-desk-root {
  height: 100%;
  min-height: 100%;
}

/* Intro + category links — rail on desktop, inline on mobile */
.hobbies-mobile-meta {
  display: none;
}

.hobbies-mobile-meta--detail {
  padding-top: 0;
}

.hobbies-mobile-nav__back {
  display: inline-block;
}

.hobbies-stage__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color-scheme: light;
}

/* Screen preview — floats over the hobbies section, no dim overlay */
.desk-screen-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  pointer-events: none;
  background: transparent;
}

.desk-screen-modal[hidden] {
  display: none !important;
}

.desk-screen-modal__window {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  overflow: hidden;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.desk-screen-modal__titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #ececec;
}

/* macOS traffic lights — always physical top-left, red → yellow → green */
.desk-screen-modal__traffic {
  position: absolute;
  left: 0.75rem;
  right: auto;
  display: flex;
  flex-direction: row;
  direction: ltr;
  gap: 0.35rem;
}

html[dir="rtl"] .desk-screen-modal__traffic {
  left: 0.75rem;
  right: auto;
  direction: ltr;
}

.desk-screen-modal__traffic i,
.desk-screen-modal__close {
  display: block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  padding: 0;
  border: 0;
  flex-shrink: 0;
}

.desk-screen-modal__close {
  background: #ff5f57;
  cursor: none;
}

.desk-screen-modal__close:hover {
  filter: brightness(0.92);
}

.desk-screen-modal__traffic i {
  background: #d4d4d4;
}

.desk-screen-modal__traffic i:nth-child(2) {
  background: #febc2e;
}

.desk-screen-modal__traffic i:nth-child(3) {
  background: #28c840;
}

.desk-screen-modal__title {
  max-width: 70%;
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: var(--neutral-700);
}

.desk-screen-modal__img {
  display: block;
  width: 100%;
  background: var(--white);
  object-fit: contain;
}

.desk-screen-modal__img[hidden] {
  display: none;
}

@media (min-width: 901px) {
  .panel:has(.page--hobbies) {
    padding-bottom: 1.5rem;
    overflow: hidden;
  }

  .page--hobbies {
    min-height: calc(100svh - var(--pad-top) - 1.5rem);
    height: calc(100svh - var(--pad-top) - 1.5rem);
  }
}

@media (max-width: 900px) {
  .panel:has(.page--hobbies) {
    overflow-y: auto;
    height: 100svh;
    min-height: 100svh;
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .page--hobbies {
    min-height: auto;
  }

  .page--hobbies .page-band {
    margin-bottom: clamp(0.5rem, 1.5vh, 0.75rem);
  }

  .page--hobbies .hobbies-stage {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .page--hobbies .hobbies-stage--desk {
    flex: 0 0 auto;
    height: clamp(280px, 48svh, 420px);
    min-height: clamp(280px, 48svh, 420px);
  }

  .page--hobbies .desk-hud__lamp {
    top: 2.85rem;
    right: 1rem;
  }

  .hobbies-mobile-meta {
    display: block;
    flex: 0 0 auto;
    padding: clamp(1.25rem, 4vw, 1.75rem) 0 0.5rem;
  }

  .hobbies-mobile-meta--detail {
    padding: 0 0 1.25rem;
  }

  .hobbies-mobile-meta--detail .rail-projects {
    margin-top: 1rem;
  }

  .hobbies-mobile-meta .rail-projects {
    margin-top: var(--band-gap);
  }

  .page--gallery-ring .page-band,
  .page--gallery .page-band,
  .page--hobby-detail .page-band {
    padding-inline-end: 4.5rem;
  }

  .page--gallery-ring .gallery-lead--mobile,
  .page--gallery .gallery-lead--mobile {
    display: block;
    max-width: 100%;
    margin: 0 0 1.25rem;
    padding-inline-end: 0.5rem;
  }

  .page--gallery-ring .hobbies-mobile-meta--detail,
  .page--gallery .hobbies-mobile-meta--detail {
    padding-bottom: 1rem;
    margin-bottom: 0.25rem;
  }

  .page--gallery-ring .gallery-ring {
    margin-bottom: 1rem;
  }

  .page--gallery .works-grid {
    margin-bottom: 1rem;
  }

  /* Flat mobile carousel — one artwork + card at a time, no 3D gaps */
  .gallery-ring.is-flat .gallery-ring__wall {
    height: auto;
    min-height: 0;
    perspective: none;
    overflow: hidden;
    padding-bottom: 0;
  }

  .gallery-ring.is-flat .gallery-ring__stage {
    position: relative;
    inset: auto;
    transform: none !important;
  }

  .gallery-ring.is-flat .gallery-ring__slot {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }

  .gallery-ring.is-flat .gallery-ring__slot.is-front {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .gallery-ring.is-flat .gallery-ring__face {
    transform: none !important;
    opacity: 1 !important;
  }

  .gallery-ring.is-flat .gallery-ring__face .gallery-piece__frame img,
  .gallery-ring.is-flat .gallery-ring__face .gallery-piece__expand img {
    filter: none !important;
  }

  .gallery-ring.is-flat .gallery-ring__face .gallery-piece__expand::after,
  .gallery-ring.is-flat .gallery-ring__face .gallery-piece__frame::after {
    display: none;
  }

  .gallery-ring.is-flat .gallery-piece__exhibit {
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
    width: min(100%, 340px);
    margin-inline: auto;
    padding: 0;
  }

  .gallery-ring.is-flat .gallery-piece--wide .gallery-piece__expand,
  .gallery-ring.is-flat .gallery-piece--portrait .gallery-piece__expand,
  .gallery-ring.is-flat .gallery-piece--square .gallery-piece__expand {
    width: 100%;
    margin: 0;
  }

  .gallery-ring.is-flat .gallery-piece__expand {
    margin-bottom: 0;
  }

  .gallery-ring.is-flat .gallery-piece__hint {
    display: none !important;
  }

  .gallery-ring.is-flat .gallery-placard {
    width: 100%;
    min-height: auto;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    pointer-events: auto;
  }

  .gallery-ring.is-flat .gallery-placard__body {
    gap: 0.75rem;
  }

  .gallery-ring.is-flat .gallery-placard__title {
    font-size: var(--t-body);
    font-weight: 600;
    line-height: 1.35;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .gallery-ring.is-flat .gallery-placard__note {
    font-size: var(--t-small);
    line-height: 1.55;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .gallery-ring.is-flat .gallery-placard__ar .gallery-placard__title {
    font-size: var(--t-small);
  }

  .gallery-ring.is-flat .gallery-placard__ar .gallery-placard__note {
    font-size: 0.625rem;
  }

  .gallery-ring.is-flat .gallery-ring__hud {
    margin: 0.875rem auto 0;
    padding: 0.5rem 1rem;
    font-size: var(--t-small);
    white-space: normal;
    text-align: center;
    max-width: min(100%, 20rem);
    line-height: 1.45;
  }

  .gallery-ring__dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.875rem;
  }

  .gallery-ring__dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--mid);
    transition: background 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .gallery-ring__dot.is-active {
    background: var(--black);
    transform: scale(1.15);
  }
}

/* ---- Hobby carousel (phawita blur depth) ------------------------------ */
.page--hobby-detail {
  overflow: hidden;
}

.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--band-gap) 0 3rem;
  perspective: 1400px;
  min-height: 360px;
  overflow: visible;
}

.carousel__slide {
  flex: 0 0 clamp(130px, 14vw, 190px);
  margin-inline: clamp(-48px, -4vw, -32px);
  transform: rotateY(calc(var(--dist, 0) * -8deg)) scale(calc(1 - var(--dist, 0) * 0.08));
  filter: blur(calc(var(--dist, 0) * 3px));
  opacity: calc(1 - var(--dist, 0) * 0.22);
  transition:
    transform 0.55s var(--ease),
    filter 0.55s var(--ease),
    opacity 0.55s var(--ease),
    margin 0.55s var(--ease);
  cursor: pointer;
  z-index: calc(10 - var(--dist, 0));
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.carousel__slide:first-child {
  margin-inline-start: 0;
}

.carousel__slide.is-focus {
  --dist: 0 !important;
  z-index: 20;
}

.carousel__slide .ph {
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.45s var(--ease);
}

.carousel__slide.is-focus .ph {
  box-shadow: 0 28px 60px -16px rgba(0, 0, 0, 0.3);
}

/* ---- Playground gallery — museum inside works-grid layout (illustrations) */
.page--gallery {
  overflow: visible;
}

.page--gallery .work--illustration {
  cursor: default;
}

.page--gallery .work__frame--museum {
  aspect-ratio: 1;
  width: 100%;
  background: transparent;
  overflow: hidden;
}

.page--gallery .gallery-wall__mat {
  width: 100%;
  height: 100%;
  background: #f0f0ef;
  padding: clamp(0.85rem, 2vw, 1.2rem);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shrink-wrap the painting so the label anchors to its bottom-right */
.page--gallery .gallery-wall__composition {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
}

.page--gallery .gallery-wall__stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page--gallery .gallery-wall__frame {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: default;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
}

.page--gallery .gallery-wall__frame-inner {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px;
  background: #fff;
  border: 1px solid #4a4038;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}

/* Frame hugs the image; equal mat on all four sides (no inner letterboxing) */
.page--gallery .gallery-wall__frame-inner .gallery-wall__img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  margin: 0;
  vertical-align: top;
}

.page--gallery .gallery-wall__frame-inner--portrait .gallery-wall__img {
  max-height: clamp(148px, 17vw, 188px);
}

.page--gallery .gallery-wall__frame-inner--wide .gallery-wall__img {
  max-width: clamp(160px, 18vw, 200px);
}

.page--gallery .gallery-wall__frame-inner--square .gallery-wall__img {
  max-width: clamp(120px, 14vw, 150px);
  max-height: clamp(120px, 14vw, 150px);
}

.page--gallery .gallery-wall__frame--bloom {
  cursor: crosshair;
}

.page--gallery .gallery-wall__frame-inner--bloom {
  padding: 6px;
}

.page--gallery .hover-bloom {
  position: relative;
  display: block;
  background: #fff;
}

.page--gallery .gallery-wall__frame-inner--square .hover-bloom {
  width: clamp(120px, 14vw, 150px);
  height: clamp(120px, 14vw, 150px);
}

.page--gallery .hover-bloom__wrap {
  position: absolute;
  inset: 0;
}

.page--gallery .hover-bloom__tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #f5f5f5 0%, rgba(255, 255, 255, 0) 62%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.page--gallery .hover-bloom__display {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.page--gallery .hover-bloom--static {
  background: #fff;
}

.page--gallery .hover-bloom:not(.hover-bloom--active):not(.hover-bloom--static)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background: radial-gradient(circle at 50% 55%, rgba(0, 0, 0, 0.04), transparent 62%);
  transition: opacity 0.35s var(--ease);
}

.page--gallery .hover-bloom--hover::after,
.page--gallery .hover-bloom--active::after {
  opacity: 0;
}

.page--gallery .gallery-wall__ph {
  width: min(70%, 140px);
  height: min(55%, 120px);
  background: #e8e8e7;
}

/* Small museum label — bottom-right of the painting (inside grey mat) */
.page--gallery .gallery-wall__composition > .gallery-placard--museum {
  position: absolute;
  z-index: 12;
  right: 0;
  top: 100%;
  margin-top: clamp(0.08rem, 0.35vw, 0.18rem);
  width: clamp(1.75rem, 24%, 2.35rem);
  max-width: none;
  min-height: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 0.14rem 0.12rem 0.16rem;
  border: none;
  border-radius: 1px;
  background: #1a1a1a;
  color: #f4f4f4;
  font-family: var(--sans);
  direction: ltr;
  text-align: left;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.14),
    0 4px 10px rgba(0, 0, 0, 0.2),
    0 10px 22px rgba(0, 0, 0, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
  transition: opacity 0.2s var(--ease);
}

.page--gallery .gallery-wall__composition > .gallery-placard--museum:hover {
  opacity: 0.88;
  transform: none;
}

.page--gallery .gallery-placard--museum .gallery-placard__body {
  gap: 0.08rem;
}

.page--gallery .gallery-placard--museum .gallery-placard__en,
.page--gallery .gallery-placard--museum .gallery-placard__ar {
  gap: 0.05rem;
}

.page--gallery .gallery-placard--museum .gallery-placard__en {
  direction: ltr;
  text-align: left;
}

.page--gallery .gallery-placard--museum .gallery-placard__ar {
  direction: rtl;
  text-align: right;
}

.page--gallery .gallery-placard--museum .gallery-placard__title {
  font-size: 0.25rem;
  font-weight: 600;
  line-height: 1.22;
  color: #fff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.page--gallery .gallery-placard--museum .gallery-placard__note {
  font-size: 0.21875rem;
  font-weight: 400;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.72);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.page--gallery .gallery-placard--museum .gallery-placard__ar .gallery-placard__title,
.page--gallery .gallery-placard--museum .gallery-placard__ar .gallery-placard__note {
  font-size: 0.21875rem;
  font-weight: 500;
}

.page--gallery .gallery-placard--museum .gallery-piece__hint {
  left: auto;
  right: 0;
  bottom: calc(100% + 0.14rem);
  transform: none;
  justify-content: flex-end;
  white-space: nowrap;
}

.page--gallery .gallery-placard--museum .gallery-piece__hint-text,
.page--gallery .gallery-placard--museum .gallery-piece__hint-char {
  font-size: 0.5625rem;
  color: rgba(255, 255, 255, 0.5);
}

.page--gallery .gallery-placard--museum:hover .gallery-piece__hint-char,
.page--gallery .gallery-placard--museum:hover .gallery-piece__hint-dot {
  color: rgba(255, 255, 255, 0.9);
}

/* ---- Playground gallery — subtle 360° wall (legacy ring) ---------------- */
.page--gallery-ring {
  overflow: visible;
}

@media (min-width: 901px) {
  .panel.is-gallery-view {
    overflow-x: visible;
  }
}

.gallery-ring {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
  overflow: visible;
}

.gallery-ring__wall {
  position: relative;
  height: clamp(340px, 52vh, 500px);
  perspective: 1600px;
  perspective-origin: 50% 44%;
  background: var(--white);
  overflow: visible;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.gallery-ring__wall:active {
  cursor: grabbing;
}

.gallery-ring__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
}

.gallery-ring__slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(620px, 86vw);
  transform-style: preserve-3d;
  transform:
    translate(-50%, -50%)
    rotateY(calc(var(--i) * (360deg / var(--count, 3))))
    translateZ(var(--radius, 360px));
}

.gallery-ring__face {
  --focus: 1;
  transform-style: preserve-3d;
  transform-origin: center center;
  transform:
    rotateY(calc(-1 * (var(--i) * (360deg / var(--count, 3)) + var(--rot, 0deg))))
    scale(var(--focus-scale, 1));
  backface-visibility: hidden;
}

/* Compact placards inside the ring carousel */
.gallery-ring .gallery-piece__exhibit {
  gap: clamp(0.45rem, 1.2vw, 0.75rem);
  padding: clamp(0.5rem, 2vw, 1rem) 0;
}

.gallery-ring .gallery-placard {
  width: clamp(5rem, 9vw, 6.25rem);
  min-height: unset;
  padding: 0.45rem 0.42rem;
  border-radius: 11px;
  overflow: visible;
  pointer-events: none;
  cursor: default;
}

.gallery-ring .gallery-ring__slot.is-front .gallery-placard {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 4;
  transform: translateZ(2px);
}

.gallery-ring .gallery-ring__slot.is-front .gallery-piece__expand {
  pointer-events: auto;
  cursor: zoom-in;
}

.gallery-ring .gallery-piece--wide .gallery-piece__expand {
  width: min(100%, 400px);
}

.gallery-ring .gallery-piece--portrait .gallery-piece__expand {
  width: min(100%, 215px);
}

.gallery-ring .gallery-piece--square .gallery-piece__expand {
  width: min(100%, 250px);
}

.gallery-ring .gallery-piece__img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-ring .gallery-ring__slot.is-front .gallery-piece__expand:hover {
  transform: translateZ(2px) scale(1.015);
}

.gallery-ring .gallery-placard__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gallery-ring .gallery-placard__en,
.gallery-ring .gallery-placard__ar {
  gap: 0.18rem;
}

.gallery-ring .gallery-placard__en {
  text-align: start;
}

.gallery-ring .gallery-placard__ar {
  text-align: end;
}

.gallery-ring .gallery-placard__title {
  font-size: 7px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-ring .gallery-placard__note {
  font-size: 6px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-ring .gallery-placard__ar .gallery-placard__title {
  font-size: 6.5px;
}

.gallery-ring .gallery-placard__ar .gallery-placard__note {
  -webkit-line-clamp: 2;
}

.gallery-ring .gallery-piece__hint {
  opacity: 1;
}

.gallery-ring .gallery-piece__hint-text {
  font-size: 7px;
}

.gallery-ring .gallery-piece__hint-dot {
  width: 4px;
  height: 4px;
}

.gallery-ring .gallery-ring__slot.is-front .gallery-placard:hover {
  transform: translateZ(2px) translateY(-2px);
}

.gallery-ring .gallery-piece__side:hover .gallery-piece__hint {
  opacity: 1;
}

/* Side paintings — soft oval frost on artwork only (placard stays sharp) */
.gallery-ring__face .gallery-piece__frame,
.gallery-ring__face .gallery-piece__expand {
  position: relative;
  overflow: visible;
}

.gallery-ring__face .gallery-piece__expand .gallery-piece__img {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 6px;
}

.gallery-ring__face .gallery-piece__expand::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  border-radius: 6px;
  background: radial-gradient(
    ellipse 88% 92% at 50% 50%,
    rgba(255, 255, 255, calc(0.12 * (1 - var(--focus)))),
    rgba(255, 255, 255, calc(0.58 * (1 - var(--focus))))
  );
  pointer-events: none;
  z-index: 2;
}

.gallery-ring__face .gallery-piece__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 88% 92% at 50% 50%,
    rgba(255, 255, 255, calc(0.12 * (1 - var(--focus)))),
    rgba(255, 255, 255, calc(0.58 * (1 - var(--focus))))
  );
  pointer-events: none;
  z-index: 2;
}

.gallery-ring__face .gallery-piece__frame .ph,
.gallery-ring__face .gallery-piece__frame img,
.gallery-ring__face .gallery-piece__expand img {
  filter: blur(calc(9px * (1 - var(--focus))));
}

/* ---- Real framed painting on a gallery wall (Digital Illustrations) --- */
/* Frame molding + mat (passe-partout) + directional wall cast shadow.
   Scoped to the illustrations gallery; scroll/interactions untouched. */
.gallery-ring .gallery-piece__expand,
.gallery-ring.is-flat .gallery-piece__expand {
  padding: clamp(11px, 1.6vw, 18px);
  background: #fcfbf8;
  border: clamp(8px, 1.05vw, 13px) solid #efeae0;
  border-image: linear-gradient(
      135deg,
      #ffffff 0%,
      #efe9de 38%,
      #ded5c4 56%,
      #f5f1e9 100%
    )
    1;
  border-radius: 0;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 5px 9px -4px rgba(0, 0, 0, 0.20),
    0 20px 34px -14px rgba(0, 0, 0, 0.30),
    0 38px 70px -34px rgba(0, 0, 0, 0.40);
}

/* Artwork seated below the mat opening — square corners, faint recess line */
.gallery-ring .gallery-piece__expand .gallery-piece__img,
.gallery-ring.is-flat .gallery-piece__expand .gallery-piece__img,
.gallery-ring__face .gallery-piece__expand .gallery-piece__img {
  border-radius: 0;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.07),
    0 1px 3px rgba(0, 0, 0, 0.14) inset;
}

/* Soft glazing sheen across the front painting (under-glass reflection) */
.gallery-ring .gallery-ring__slot.is-front .gallery-piece__expand::before,
.gallery-ring.is-flat .gallery-piece__expand::before {
  content: "";
  position: absolute;
  inset: clamp(11px, 1.6vw, 18px);
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0) 24%,
    rgba(255, 255, 255, 0) 72%,
    rgba(255, 255, 255, 0.07) 100%
  );
}

/* Drop the floating oval shadow — paintings hang, not float */
.gallery-ring .gallery-piece__shadow,
.gallery-ring.is-flat .gallery-piece__shadow {
  display: none;
}

/* No hover movement — the painting stays mounted on the wall */
.gallery-ring .gallery-ring__slot.is-front .gallery-piece__expand:hover {
  transform: translateZ(2px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 5px 9px -4px rgba(0, 0, 0, 0.20),
    0 20px 34px -14px rgba(0, 0, 0, 0.30),
    0 38px 70px -34px rgba(0, 0, 0, 0.40);
}

.gallery-ring .gallery-piece__expand:hover .gallery-piece__img {
  transform: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.07),
    0 1px 3px rgba(0, 0, 0, 0.14) inset;
}

.gallery-ring__hud {
  position: relative;
  z-index: 2;
  display: block;
  width: fit-content;
  margin: 1.25rem auto 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: var(--t-nav);
  font-weight: 400;
  text-transform: lowercase;
  color: var(--neutral-700);
  white-space: nowrap;
  pointer-events: none;
}

html[dir="rtl"] .gallery-ring__hud {
  text-transform: none;
}

.gallery-lead {
  max-width: 36ch;
  margin-top: 0.625rem;
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  color: var(--neutral-700);
}

.gallery-lead--desktop {
  margin-top: var(--band-gap);
}

.gallery-lead--mobile {
  display: none;
}

@media (max-width: 900px) {
  .gallery-lead--desktop {
    display: none;
  }
}

html[dir="rtl"] .gallery-lead {
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vh, 6.5rem);
  padding-bottom: 4rem;
}

.gallery-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-piece__exhibit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  width: min(100%, 820px);
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.gallery-piece__frame {
  flex: 0 1 auto;
}

.gallery-piece__expand {
  position: relative;
  display: block;
  margin: 0 0 1.1rem;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 6px;
  overflow: visible;
  box-shadow: none;
  transition: transform 0.35s var(--ease);
}

.gallery-piece__shadow {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.gallery-ring .gallery-piece--wide .gallery-piece__shadow {
  width: 94%;
  height: 18px;
  bottom: -12px;
}

.gallery-piece__expand .gallery-piece__img {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.gallery-piece__expand:hover .gallery-piece__shadow {
  opacity: 0.92;
  filter: blur(20px);
  transform: translateX(-50%) scale(1.03);
}

.gallery-piece__expand:hover .gallery-piece__img {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.gallery-piece__side {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
}

.gallery-piece--wide .gallery-piece__frame {
  width: min(100%, 560px);
}

.gallery-piece--portrait .gallery-piece__frame {
  width: min(100%, 300px);
}

.gallery-piece--square .gallery-piece__frame {
  width: min(100%, 340px);
}

.gallery-piece__img,
.gallery-piece__ph {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-piece__ph.ph {
  min-height: unset;
}

.gallery-piece--wide .gallery-piece__ph {
  aspect-ratio: 16 / 10;
}

.gallery-piece--portrait .gallery-piece__ph {
  aspect-ratio: 3 / 4;
}

.gallery-piece--square .gallery-piece__ph {
  aspect-ratio: 1;
}

/* Gallery glass — same frosted style as explore cursor */
.gallery-glass {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.gallery-placard {
  display: flex;
  flex-direction: column;
  width: clamp(9rem, 19vw, 11.5rem);
  min-height: clamp(11rem, 24vw, 14rem);
  padding: 1rem 0.9rem;
  border-radius: 18px;
  text-align: start;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.gallery-placard:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.gallery-placard__body {
  display: flex;
  flex-direction: column;
  gap: clamp(0.55rem, 1.5vw, 0.85rem);
  flex: 1;
}

.gallery-placard__en,
.gallery-placard__ar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gallery-placard__ar {
  margin-top: 0;
  text-align: end;
}

.gallery-placard__title {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--black);
}

.gallery-placard__note {
  font-size: 0.5625rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--neutral-600);
}

.gallery-placard__ar .gallery-placard__title,
.gallery-placard__ar .gallery-placard__note {
}

.gallery-piece__hint {
  position: absolute;
  bottom: calc(100% + 0.3rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.32rem;
  pointer-events: none;
  white-space: nowrap;
}

.gallery-piece__hint-text {
  display: inline-flex;
  font-size: 0.5625rem;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.gallery-piece__hint-char,
.gallery-piece__hint-dot {
  color: var(--neutral-500);
  animation: gallery-hint-step calc(var(--hint-steps, 8) * 0.26s + 1.4s) ease-in-out infinite;
  animation-delay: calc(var(--char-i, 0) * 0.26s);
}

.gallery-piece__hint-char {
  display: inline-block;
}

@keyframes gallery-hint-step {
  0%,
  100% {
    color: var(--neutral-500);
  }

  18%,
  32% {
    color: var(--black);
  }
}

html[dir="rtl"] .gallery-piece__hint-text {
  text-transform: none;
}

html[dir="rtl"] .gallery-piece__hint {
  flex-direction: row-reverse;
}

.gallery-piece__hint-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.gallery-placard:hover .gallery-piece__hint-char,
.gallery-placard:hover .gallery-piece__hint-dot {
  animation-play-state: paused;
  color: var(--black);
}

.gallery-piece__floor {
  position: relative;
  width: min(100%, 720px);
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-visitors {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  min-height: 5rem;
  padding: 0.75rem 1rem 0;
}

.gallery-visitor {
  width: clamp(2rem, 5vw, 2.75rem);
  height: auto;
  flex-shrink: 0;
  animation: gallery-walk 4.5s var(--ease) infinite;
  animation-delay: var(--visitor-delay, 0s);
}

.gallery-visitor:nth-child(2) {
  width: clamp(1.75rem, 4.5vw, 2.5rem);
  opacity: 0.92;
}

.gallery-visitor:nth-child(3) {
  width: clamp(2.1rem, 5.2vw, 2.9rem);
}

@keyframes gallery-walk {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(6px) translateY(-2px);
  }
  50% {
    transform: translateX(12px) translateY(0);
  }
  75% {
    transform: translateX(6px) translateY(-1px);
  }
}

html[dir="rtl"] .gallery-visitor {
  animation-name: gallery-walk-rtl;
}

@keyframes gallery-walk-rtl {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-6px) translateY(-2px);
  }
  50% {
    transform: translateX(-12px) translateY(0);
  }
  75% {
    transform: translateX(-6px) translateY(-1px);
  }
}

/* Gallery popup */
body.gallery-modal-open,
body.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(235, 235, 235, 0.82);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  cursor: zoom-out;
}

.gallery-lightbox__img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 920px);
  max-height: 90svh;
  object-fit: contain;
  border-radius: 4px;
  cursor: zoom-out;
  box-shadow: 0 28px 60px -18px rgba(0, 0, 0, 0.22);
  animation: gallery-lightbox-in 0.4s var(--ease);
}

@keyframes gallery-lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  pointer-events: none;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(208, 208, 208, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  pointer-events: auto;
  cursor: default;
}

.gallery-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 26.25rem);
  max-height: min(88svh, 560px);
  overflow-y: auto;
  pointer-events: auto;
  animation: gallery-modal-in 0.4s var(--ease);
}

/* Expanded museum wall label — same language as grid placards */
.gallery-modal__panel--museum {
  padding: clamp(1.35rem, 4vw, 1.75rem);
  border: none;
  border-radius: 2px;
  background: #1a1a1a;
  color: #f4f4f4;
  font-family: var(--sans);
  direction: ltr;
  text-align: left;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.14),
    0 4px 10px rgba(0, 0, 0, 0.2),
    0 10px 22px rgba(0, 0, 0, 0.1);
}

.gallery-modal__panel--museum .gallery-placard__body {
  gap: clamp(1.25rem, 4vh, 2rem);
  margin-bottom: 0;
}

.gallery-modal__panel--museum .gallery-placard__en,
.gallery-modal__panel--museum .gallery-placard__ar {
  gap: 0.5rem;
}

.gallery-modal__panel--museum .gallery-placard__en {
  direction: ltr;
  text-align: left;
}

.gallery-modal__panel--museum .gallery-placard__ar {
  direction: rtl;
  text-align: right;
}

.gallery-modal__panel--museum .gallery-placard__title {
  font-size: var(--t-title);
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  margin: 0;
}

.gallery-modal__panel--museum .gallery-placard__note {
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.gallery-modal__panel--museum .gallery-placard__ar .gallery-placard__title,
.gallery-modal__panel--museum .gallery-placard__ar .gallery-placard__note {
}

@keyframes gallery-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gallery-modal__panel--museum .gallery-modal__close {
  align-self: flex-end;
  margin-top: clamp(1rem, 3vh, 1.35rem);
  padding: 0;
  font-size: var(--t-body);
  font-weight: 500;
  font-family: inherit;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.gallery-modal__panel--museum .gallery-modal__close[lang="ar"] {
  font-family: var(--ar);
  font-feature-settings:
    "ccmp" 1, "rlig" 1, "calt" 1,
    "salt" 1, "ss01" 1, "ss02" 1, "ss03" 1, "swsh" 1;
  -webkit-font-feature-settings:
    "ccmp" 1, "rlig" 1, "calt" 1,
    "salt" 1, "ss01" 1, "ss02" 1, "ss03" 1, "swsh" 1;
  direction: rtl;
}

html[dir="rtl"] .gallery-modal__panel--museum .gallery-modal__close[lang="ar"] {
  align-self: flex-start;
}

.gallery-modal__panel--museum .gallery-modal__close:hover {
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 720px) {
  .gallery-piece__exhibit {
    flex-direction: column;
    align-items: center;
  }

  .gallery-piece--wide .gallery-piece__frame,
  .gallery-piece--portrait .gallery-piece__frame,
  .gallery-piece--square .gallery-piece__frame {
    width: min(100%, 420px);
  }

  .gallery-placard {
    width: min(100%, 300px);
    min-height: 12rem;
    padding: 1.1rem 1rem;
  }

  .gallery-placard__title {
    font-size: 0.75rem;
  }

  .gallery-placard__note {
    font-size: 0.625rem;
  }

  .gallery-piece__hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-visitor {
    animation: none;
  }

  .gallery-modal__panel {
    animation: none;
  }
}

/* ---- Responsive ----------------------------------------------------- */
@media (max-width: 900px) {
  .works-grid {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  .work {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .jitem {
    grid-template-columns: 1fr;
  }

  .top-bar {
    inset-inline-end: 1.25rem;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.6rem;
  }

  .lens-switch {
    max-width: 8.5rem;
    margin-bottom: 0.35rem;
  }

  .page-band--start .page__title {
    max-width: calc(100% - 4.25rem);
  }

  .brand__logo,
  .brand img {
    width: 54px;
  }

  .carousel__slide {
    flex: 0 0 140px;
    margin-inline: -28px;
  }
}

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

  .panel .page {
    opacity: 1 !important;
    transform: none !important;
  }

  .carousel__slide {
    filter: none !important;
    transform: none !important;
  }
}
