/* The photographic direction stays intact; these palettes describe the paper,
   frames and light surrounding it. Keep this stylesheet after the scene styles. */
:root,
:root[data-theme="warm"] {
  color-scheme: dark;
  --noir: #17120f;
  --panel: #231c17;
  --cream: #f7efe2;
  --ivory: #f7efe2;
  --dim: #c1b4a3;
  --gold: #d1b180;
  --line: rgba(209,177,128,.27);
  --theme-rgb: 23,18,15;
  --theme-elevated: #201914;
  --theme-media: #151412;
  --theme-faint: #ad9f8d;
  --theme-control: rgba(38,30,24,.88);
  --theme-control-selected: rgba(209,177,128,.14);
  --theme-control-hover: rgba(209,177,128,.09);
  --theme-soft-shadow: 0 18px 48px rgba(0,0,0,.22);
  --theme-dialog-shadow: 0 30px 100px rgba(0,0,0,.48);
  --theme-backdrop: rgba(12,9,7,.91);
  --theme-frame: #493a2b;
  --theme-frame-umber: #594735;
  --theme-frame-brass: #7d6443;
  --theme-print-shadow: 0 10px 26px rgba(0,0,0,.38);
}

:root[data-theme="light"] {
  color-scheme: light;
  --noir: #f5f2eb;
  --panel: #fdfaf4;
  --cream: #302b25;
  --ivory: #302b25;
  --dim: #6b6258;
  --gold: #80613b;
  --line: rgba(128,97,59,.25);
  --theme-rgb: 245,242,235;
  --theme-elevated: #fffcf7;
  --theme-media: #e5dfd5;
  --theme-faint: #71675b;
  --theme-control: rgba(255,252,247,.92);
  --theme-control-selected: rgba(128,97,59,.11);
  --theme-control-hover: rgba(128,97,59,.06);
  --theme-soft-shadow: 0 18px 48px rgba(66,48,30,.08);
  --theme-dialog-shadow: 0 30px 100px rgba(53,40,27,.20);
  --theme-backdrop: rgba(236,230,219,.95);
  --theme-frame: #b8a78e;
  --theme-frame-umber: #9c8770;
  --theme-frame-brass: #b49a72;
  --theme-print-shadow: 0 10px 26px rgba(71,52,31,.16);
}

html[data-theme] {
  background: var(--noir);
  scrollbar-color: var(--gold) var(--noir);
}
html[data-theme] body { background: var(--noir); color: var(--cream); }
html[data-theme] .scene-inner { scrollbar-color: var(--gold) transparent; }
html[data-theme] .cover-description,
html[data-theme] .story-facts dd,
html[data-theme] .photo-caption-note,
html[data-theme] .portrait-panel figcaption,
html[data-theme] .portrait-total,
html[data-theme] .zoom-hint,
html[data-theme] .chapter-divider,
html[data-theme] .scene-next small,
html[data-theme] .scene-previous,
html[data-theme] .project-selectors button,
html[data-theme] .deck-arrows > [data-deck-counter],
html[data-theme] .contact-agency > span,
html[data-theme] .contact-legal,
html[data-theme] .menu-footnote { color: var(--theme-faint); }
html[data-theme] .timeline li > p { color: var(--cream); }
html[data-theme] .track-copy > p:not(.overline) { color: var(--dim); }
html[data-theme] .project-selectors button[aria-pressed="true"] { color: var(--cream); }
html[data-theme] .project-selectors button > span,
html[data-theme] .menu-layout nav a > span { color: var(--gold); }

/* A fixed frame with fully reserved space: preference changes never alter
   the height used by the scroll choreography. */
html[data-theme] .site-header {
  gap: 24px;
  background: linear-gradient(rgba(var(--theme-rgb),.84),rgba(var(--theme-rgb),.36) 70%,rgba(var(--theme-rgb),0));
}
html[data-theme].continuous:not([data-active-scene="cover"]) .site-header {
  background: linear-gradient(rgba(var(--theme-rgb),.98) 20%,rgba(var(--theme-rgb),.93) 65%,rgba(var(--theme-rgb),0));
}
html[data-theme] .top-nav { gap: clamp(20px,1.6vw,32px); margin-right: 12px; }
/* The capsule is 32px tall; transparent button space keeps touch targets
   comfortable without making the controls look like large blocks. */
.site-preferences {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
  font-family: Manrope,Arial,sans-serif;
}
.preference-group {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0;
  padding: 0 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  isolation: isolate;
}
.preference-group::before {
  content: '';
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: var(--theme-control);
  opacity: .78;
  pointer-events: none;
}
.preference-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  background: transparent;
  transition: color 220ms ease;
}
.preference-button::before {
  content: '';
  position: absolute;
  inset: 7px 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--theme-control-selected);
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.preference-button svg { display: block; width: 14px; height: 14px; flex: none; }
.preference-button[aria-pressed="true"] { color: var(--gold); }
.preference-button[aria-pressed="true"]::before { opacity: 1; }
.preference-button:focus-visible { outline: none; }
.preference-button:focus-visible::before { opacity: 1; outline: 1px solid var(--gold); outline-offset: 2px; }
.language-preferences .preference-button { min-width: 34px; padding-inline: 8px; font-size: 10px; letter-spacing: .02em; }
@media(hover:hover) {
  .preference-button:hover { color: var(--cream); }
  .preference-button:hover::before { opacity: .55; }
  .preference-button[aria-pressed="true"]:hover { color: var(--gold); }
  .preference-button[aria-pressed="true"]:hover::before { opacity: 1; }
}

/* Only light and shade change. No theme changes the position, filter,
   object-fit or animation of any photograph. */
html[data-theme] .cover-shade {
  background: linear-gradient(90deg,rgba(var(--theme-rgb),1) 0%,rgba(var(--theme-rgb),.98) 25%,rgba(var(--theme-rgb),.55) 46%,rgba(var(--theme-rgb),0) 67%),linear-gradient(0deg,rgba(var(--theme-rgb),1) 0%,rgba(var(--theme-rgb),.20) 24%,rgba(var(--theme-rgb),0) 60%);
}
html[data-theme] .cover-image,
html[data-theme] .story-photo,
html[data-theme] .portrait-frame,
html[data-theme] .project-art,
html[data-theme] .release-visual,
html[data-theme] .collage-image { background: var(--theme-media); }
html[data-theme] .cover-video .play-icon { border-color: var(--gold); }
html[data-theme] .cover-vertical-line { background: linear-gradient(transparent,var(--line),transparent); }
html[data-theme] .cover-side-note { color: #e6d9c4; text-shadow: 0 1px 8px rgba(10,8,5,.68); }
html[data-theme] .story-photo figcaption {
  color: #f7efe2;
  border-color: rgba(247,239,226,.4);
  text-shadow: 0 1px 8px rgba(0,0,0,.75);
}
html[data-theme].continuous .collage-photo { --frame-color: var(--theme-frame); }
html[data-theme].continuous .collage-photo[data-frame="umber"] { --frame-color: var(--theme-frame-umber); }
html[data-theme].continuous .collage-photo[data-frame="brass"] { --frame-color: var(--theme-frame-brass); }
html[data-theme].continuous .collage-image { box-shadow: var(--theme-print-shadow); }
html[data-theme].continuous:not(.motion-ready) .collage-image { outline-color: var(--theme-frame); }
html[data-theme].continuous .collage-photo::after { outline-color: var(--line); }
html[data-theme].continuous .collage-backdrop::after {
  background: linear-gradient(0deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),.61) 22%,rgba(var(--theme-rgb),.22) 44%,rgba(var(--theme-rgb),0) 60%,rgba(var(--theme-rgb),0) 72%,rgba(var(--theme-rgb),.90)),linear-gradient(90deg,rgba(var(--theme-rgb),.44),rgba(var(--theme-rgb),0) 32%,rgba(var(--theme-rgb),0) 78%,rgba(var(--theme-rgb),.56));
}
html[data-theme="light"].continuous .collage-backdrop::after {
  background: linear-gradient(0deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),.82) 20%,rgba(var(--theme-rgb),.55) 44%,rgba(var(--theme-rgb),.48) 65%,rgba(var(--theme-rgb),.88)),linear-gradient(90deg,rgba(var(--theme-rgb),.75),rgba(var(--theme-rgb),.18) 34%,rgba(var(--theme-rgb),.18) 76%,rgba(var(--theme-rgb),.75));
}
html[data-theme] .match-shade { background: var(--noir); }
html[data-theme].continuous.scroll-experience .project-panel {
  background: var(--panel);
  border-color: var(--line);
}
html[data-theme] .project-art::after,
html[data-theme] .project-art .frame-line { border-color: var(--line); }
html[data-theme] .filmography-poster img { border-color: var(--line); box-shadow: var(--theme-soft-shadow); }

/* Photo-backed music uses a translucent theme-coloured wash for readable type;
   compact covers keep the colour treatment requested for the original site. */
html[data-theme].continuous .track-shade {
  background: linear-gradient(90deg,rgba(var(--theme-rgb),.85) 3%,rgba(var(--theme-rgb),.25) 60%),linear-gradient(0deg,rgba(var(--theme-rgb),1) 0%,rgba(var(--theme-rgb),0) 30%,rgba(var(--theme-rgb),0) 75%,rgba(var(--theme-rgb),1) 100%);
}
html[data-theme="light"].continuous .track-shade {
  background: linear-gradient(90deg,rgba(var(--theme-rgb),.96) 3%,rgba(var(--theme-rgb),.87) 32%,rgba(var(--theme-rgb),.26) 73%),linear-gradient(0deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),.04) 40%,rgba(var(--theme-rgb),.02) 70%,rgba(var(--theme-rgb),1));
}
html[data-theme] .release-card { background: var(--panel); border-color: var(--line); box-shadow: var(--theme-soft-shadow); }
html[data-theme] .release-visual::after { border-color: var(--line); }
html[data-theme] .music-strip { color: var(--cream); border-color: var(--line); }
html[data-theme] .music-strip-number,
html[data-theme] .music-strip a.music-strip-source { color: var(--gold); }
html[data-theme] .music-strip-artist,
html[data-theme] .music-strip-note,
html[data-theme] .music-strip-time,
html[data-theme] .music-strip-status { color: var(--dim); }
html[data-theme] .music-strip-toggle { background: var(--theme-control); border-color: var(--gold); color: var(--gold); }
html[data-theme] .music-strip-toggle:hover { background: var(--theme-control-selected); }
html[data-theme] .music-strip-progress::before { background: var(--line); }
html[data-theme] .music-strip-progress-fill { background: var(--gold); }
html[data-theme] .music-strip-seek { accent-color: var(--gold); }
html[data-theme] .music-strip-seek::-webkit-slider-thumb { background: var(--gold); }
html[data-theme] .music-strip-seek::-moz-range-thumb { background: var(--gold); }
html[data-theme] .music-strip-source:hover { color: var(--cream); }

html[data-theme] .finale-atmosphere { background: var(--noir); }
html[data-theme].continuous .contact-shade { background: linear-gradient(0deg,rgba(var(--theme-rgb),1) 6%,rgba(var(--theme-rgb),.55) 65%,rgba(var(--theme-rgb),0)); }
html[data-theme="light"].continuous .contact-shade { background: linear-gradient(0deg,rgba(var(--theme-rgb),1) 6%,rgba(var(--theme-rgb),.91) 65%,rgba(var(--theme-rgb),.72)); }
html[data-theme] .contact-orbit { border-color: var(--line); box-shadow: 0 0 0 7vw rgba(var(--theme-rgb),.10),0 0 0 14vw rgba(var(--theme-rgb),.06); }
html[data-theme] .scene-rail,
html[data-theme].continuous .scene-rail { background: linear-gradient(rgba(var(--theme-rgb),0),rgba(var(--theme-rgb),.92) 95%); }
html[data-theme].continuous[data-active-scene="portraits"] .scene-rail { background: linear-gradient(rgba(var(--theme-rgb),0),rgba(var(--theme-rgb),.96) 45%,rgba(var(--theme-rgb),1) 75%); }

/* Menus, media and boot screen belong to the chosen palette as well. */
html[data-theme] .scene-menu { background: var(--noir); color: var(--cream); }
html[data-theme] .scene-menu::backdrop,
html[data-theme] .story-dialog::backdrop,
html[data-theme] .media-dialog::backdrop { background: var(--theme-backdrop); }
html[data-theme] .story-dialog,
html[data-theme] .media-dialog { background: var(--theme-elevated); color: var(--cream); border-color: var(--line); box-shadow: var(--theme-dialog-shadow); }
html[data-theme] .story-dialog { scrollbar-color: var(--gold) var(--theme-elevated); }
html[data-theme] .dialog-nav:hover,
html[data-theme] .dialog-close:hover { background: var(--theme-control-selected); }
html[data-theme] .portrait-zoom { color: #f7efe2; background: rgba(20,16,12,.58); border-color: rgba(247,239,226,.5); }
html[data-theme] .project-art > .project-video-status { color: var(--cream); background: var(--theme-elevated); border-color: var(--line); }
html[data-theme] .site-intro { background: radial-gradient(ellipse at 50% 43%,var(--panel) 0%,var(--noir) 57%); color: var(--cream); }
html[data-theme] .site-intro__name em,
html[data-theme] .site-intro__mark { color: var(--gold); }
html[data-theme] .site-intro__caption,
html[data-theme] .site-intro__skip { color: var(--dim); }
html[data-theme] .site-intro__line { background: var(--gold); }
html[data-theme="light"] .site-intro__mark #intro-gold stop:first-child { stop-color: #aa8954; }
html[data-theme="light"] .site-intro__mark #intro-gold stop:nth-child(2) { stop-color: #80613b; }
html[data-theme="light"] .site-intro__mark #intro-gold stop:last-child { stop-color: #664b2b; }
html[data-theme="light"] .film-grain { opacity: .021; }
html[data-theme="light"] .cover-copy h1 { text-shadow: none; }
html[data-theme="light"] .name-line::after { background-image: radial-gradient(ellipse 150px 100px at calc(50% + var(--name-x,0)*45%) calc(50% + var(--name-y,0)*45%),#987244 0%,#80613b 36%,transparent 82%); }

/* The game's colourful canvas is a separate world. Only its surrounding frame
   follows the portfolio palette; night-stage prompts retain their contrast. */
html[data-theme] .secret-game { background: var(--theme-elevated); color: var(--cream); border-color: var(--line); box-shadow: var(--theme-dialog-shadow); }
html[data-theme] .secret-game::backdrop { background: var(--theme-backdrop); }
html[data-theme] .secret-game__eyebrow,
html[data-theme] .secret-game h2 em,
html[data-theme] .secret-game__hud button,
html[data-theme] .secret-game__jump { color: var(--gold); }
html[data-theme] .secret-game__back,
html[data-theme] .secret-game__hud,
html[data-theme] .secret-game__footer { color: var(--dim); }
html[data-theme] .secret-game__hud strong { color: var(--cream); }
html[data-theme] .secret-game__jump { border-color: var(--line); }
html[data-theme] .secret-game__jump:hover { background: var(--theme-control-selected); border-color: var(--gold); }
html[data-theme] .secret-game__back:hover,
html[data-theme] .secret-game__hud button:hover { color: var(--cream); }

@media(max-width:1480px) {
  html[data-theme] .site-header { gap: 28px; }
  html[data-theme] .site-header > .top-nav { display: none; }
}
@media(max-width:1100px) and (min-width:761px) {
  html[data-theme] .site-header { gap: 22px; }
}
@media(max-width:1100px) and (min-width:761px) {
  html[data-theme] .cover-shade { background: linear-gradient(90deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),.90) 25%,rgba(var(--theme-rgb),.40) 55%,rgba(var(--theme-rgb),0) 80%),linear-gradient(0deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),0) 65%); }
}
@media(max-width:760px) {
  :root[data-theme] { --header: 132px; }
  html[data-theme] .site-header {
    height: var(--header);
    display: grid;
    grid-template-columns: minmax(0,1fr) 44px;
    grid-template-rows: 44px 48px;
    align-items: center;
    gap: 10px 18px;
    padding: 12px 24px 18px;
    background: linear-gradient(rgba(var(--theme-rgb),.96),rgba(var(--theme-rgb),.90) 84%,rgba(var(--theme-rgb),0));
  }
  html[data-theme] .site-header > .wordmark { grid-column: 1; grid-row: 1; font-size: 24px; }
  html[data-theme] .site-header > .wordmark > span { font-size: 7px; margin-top: 6px; }
  html[data-theme] .site-header > .menu-toggle { grid-column: 2; grid-row: 1; }
  .site-preferences { grid-column: 1/-1; grid-row: 2; justify-self: center; margin-left: 0; gap: 8px; }
  .preference-group { padding-inline: 3px; }
  .preference-group::before { inset-block: 6px; }
  .preference-button { min-height: 44px; min-width: 40px; padding: 8px 9px; gap: 5px; font-size: 9px; }
  .preference-button::before { inset-block: 9px; }
  .preference-button svg { width: 13px; height: 13px; }
  .language-preferences .preference-button { min-width: 40px; padding-inline: 7px; font-size: 9px; }
  html[data-theme] .cover-shade { background: linear-gradient(0deg,rgba(var(--theme-rgb),1) 3%,rgba(var(--theme-rgb),.90) 16%,rgba(var(--theme-rgb),.42) 48%,rgba(var(--theme-rgb),0) 77%),linear-gradient(90deg,rgba(var(--theme-rgb),.30),rgba(var(--theme-rgb),0) 90%); }
  html[data-theme="light"] .cover-shade { background: linear-gradient(0deg,rgba(var(--theme-rgb),1) 3%,rgba(var(--theme-rgb),.96) 20%,rgba(var(--theme-rgb),.72) 43%,rgba(var(--theme-rgb),.04) 77%),linear-gradient(90deg,rgba(var(--theme-rgb),.25),rgba(var(--theme-rgb),0) 90%); }
  html[data-theme].continuous .track-shade { background: linear-gradient(0deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),.74) 30%,rgba(var(--theme-rgb),.07) 68%,rgba(var(--theme-rgb),1) 100%); }
  html[data-theme="light"].continuous .track-shade { background: linear-gradient(0deg,rgba(var(--theme-rgb),1),rgba(var(--theme-rgb),.98) 23%,rgba(var(--theme-rgb),.77) 48%,rgba(var(--theme-rgb),.18) 73%,rgba(var(--theme-rgb),1) 100%); }
  html[data-theme] .portrait-editorial .deck-arrows button { background: var(--theme-control); border-color: var(--line); }
}
@media(max-width:370px) {
  html[data-theme] .site-header { padding-inline: 20px; gap-inline: 12px; }
  html[data-theme] .site-header > .wordmark { font-size: 22px; }
  .site-preferences { gap: 7px; }
  .preference-button { padding-inline: 8px; gap: 5px; font-size: 9px; }
  .language-preferences .preference-button { min-width: 40px; padding-inline: 6px; font-size: 9px; }
}
@media(orientation:landscape) and (max-height:500px) and (max-width:760px) {
  :root[data-theme] { --header: 84px; }
  html[data-theme] .site-header { display: flex; gap: 16px; padding: 12px 20px; }
  html[data-theme] .site-header > .wordmark { font-size: 21px; }
  html[data-theme] .site-header > .wordmark > span { display: none; }
  html[data-theme] .site-header > .menu-toggle { order: 3; }
  .site-preferences { margin-left: auto; gap: 8px; }
  .preference-button { padding-inline: 8px; }
  .preference-button svg { width: 13px; height: 13px; }
}
@media(orientation:landscape) and (max-height:500px) and (max-width:570px) {
  html[data-theme] .site-header { gap: 10px; }
  html[data-theme] .site-header > .wordmark { font-size: 19px; }
  .preference-button[data-theme-choice] > span { display: none; }
  .preference-button { min-width: 38px; }
}
@media(prefers-reduced-motion:reduce) {
  .preference-button,.preference-button::before { transition: none; }
  html[data-theme].continuous .collage-image { outline-color: var(--theme-frame); }
}
