/* Two material palettes. The frame stays still while its selected artwork changes. */
body.light-theme {
  --bg: var(--site-paper);
  --surface: var(--site-raised);
  --surface-hover: var(--site-hover);
  --text: var(--site-ink);
  --muted: var(--site-muted);
  --line: var(--site-rule);
  --accent: var(--site-accent);
}
body { transition: background-color 420ms ease, color 300ms ease; }
img.theme-artwork,
.theme-artwork img[data-dark-src] {
  object-position: var(--art-position-dark, center);
  transition: opacity 380ms ease;
}
.light-theme img.theme-artwork,
.light-theme .theme-artwork img[data-light-src] {
  object-position: var(--art-position-light, center);
}
.story-enhanced img.hero-image.theme-artwork { transition: opacity 380ms ease; }
.card-art img.theme-artwork { transition: opacity 380ms ease, scale 900ms cubic-bezier(.16,1,.3,1), filter 600ms ease; }
.light-theme .wordmark-point { color: #95653d; }

/* Appearance is a small, tactile control; its reserved dimensions never change. */
#site-header .theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 86px;
  padding-inline: 12px;
  border: 1px solid #c6b99b45;
  border-radius: 24px;
  background: #d6bd9507;
}
#site-header .theme-button:hover { background: #d6bd951a; border-color: #d6bd9599; }
#site-header .theme-button svg { width: 17px; height: 17px; flex: 0 0 17px; transition: transform 420ms cubic-bezier(.16,1,.3,1); }
#site-header .theme-label {
  display: inline-block;
  width: 29px;
  flex: 0 0 29px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
}
#site-header .theme-button[aria-pressed="true"] svg { transform: rotate(90deg); }
.light-theme #site-header.site-header {
  color: var(--site-ink);
  background-color: color-mix(in srgb, var(--site-paper) 72%, transparent);
  border-bottom-color: #64766712;
}
.light-theme #site-header.site-header.has-backdrop {
  background-color: color-mix(in srgb, var(--site-paper) 94%, transparent);
  border-bottom-color: #64766730;
}
.light-theme #site-header .wordmark-point { color: #95653d; }
.light-theme #site-header .theme-button { border-color: #63705e50; background: #fffaf02e; }
.light-theme #site-header .theme-button:hover { background: #d9d4c399; border-color: #8b603c; }
.light-theme #site-header .index-button { border-left-color: #63705e40; }
.light-theme #site-header .index-button:hover { color: #865530; }
.light-theme #site-header .index-button kbd { color: var(--muted); }
.light-theme #site-header .desktop-nav a::after { background: #8b603c; }
.light-theme #site-header :is(a, button):focus-visible { outline-color: #8b603c; }

/* In daylight the sculptural space opens onto ivory and warm mineral colour. */
.light-theme .opening-sequence,
.light-theme .hero,
.light-theme .hero-world,
.light-theme .photo-section { background-color: #f2eee5; }
.light-theme .hero { color: var(--site-ink); }
.light-theme .hero-shade {
  background:
    linear-gradient(90deg, #f2eee5f7 0%, #f2eee5df 25%, #f2eee58a 45%, #f2eee500 74%),
    linear-gradient(0deg, #f2eee573 0%, #f2eee500 34%);
}
.light-theme .hero-eyebrow { color: #596b60; }
.light-theme .hero-description { color: #42564b; }
.light-theme .accent-stop { color: #9a6841; }
.light-theme .hero-seam { background: linear-gradient(transparent, #8b603c59, transparent); }
.light-theme .explore-arrow { border-color: #62776470; background: #f9f5e82e; }
.light-theme .hero-explore:hover .explore-arrow { background: #22392f; border-color: #22392f; color: #f3eee3; }
.light-theme .hero-links a { color: #455b4d; border-bottom-color: #6b7d6252; }
.light-theme .hero-links a:hover { color: #172c21; }
.light-theme .hero-links a span { color: #8b603c; }
.light-theme .scroll-cue { color: #4d6355; }
.light-theme .photo-section { color: var(--site-ink); }
.light-theme .photo-shade {
  background:
    linear-gradient(90deg, #f2eee5fa 0%, #f2eee5e8 24%, #f2eee5ad 44%, #f2eee51a 75%),
    linear-gradient(0deg, #f2eee555 0%, #f2eee500 50%);
}
.light-theme .photo-copy .eyebrow { color: #835b38; }
.light-theme .photo-copy > p:not(.eyebrow) { color: #43584b; }
.light-theme .scene-link { color: #243c2d; border-color: #8b603c80; }
.light-theme .scene-link:hover { border-color: #243c2d; }
.light-theme .after-scenes { background: var(--bg); }
.light-theme .after-scenes.has-landscape .flow-landscape {
  background-image: linear-gradient(180deg, #e7e0d244, #f2eee5);
  opacity: .55;
}
.light-theme .after-scenes .collection { background: linear-gradient(180deg, #f2eee5f5, #f2eee5db 70%, #f2eee500); }
.light-theme .flow-thread { stroke: #9b764f; }
.light-theme .flow-thread.faint { stroke: #6d8272; opacity: .38; }
.light-theme [data-flow-section]::before { background: radial-gradient(ellipse at 78% 40%, #b38c4f12, transparent 64%); }
.card-art { background-color: var(--surface); }
.card-art .theme-artwork { width: 100%; height: 100%; object-fit: cover; }
.card-art[data-artwork="study"] .plate-art { width: 100%; height: 100%; object-fit: cover; padding: 0; background: var(--surface); }
.card-art[data-artwork="drawing"] .plate-art { background-color: #e7e0cf; }
.light-theme .collection-card:hover,
.light-theme .collection-card:focus-within { border-color: #928267; box-shadow: 0 18px 60px #4f49310d; }

/* A generous image passage gives the wider body of work its own visual pause. */
.art-passage { position: relative; margin: 0; padding-block: 18px clamp(80px, 8vw, 132px); }
.art-passage > .container { max-width: 1512px; }
.art-passage__image {
  position: relative;
  display: block;
  margin: 0;
  width: 100%;
  aspect-ratio: 2.05;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  border-radius: 4px;
}
.art-passage__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.025);
  transition: transform 1400ms cubic-bezier(.16,1,.3,1), opacity 380ms ease;
}
.art-passage__image::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px #d5c1a51c;
}
.art-passage__caption {
  display: grid;
  grid-template-columns: minmax(110px, .34fr) minmax(0, 1fr) auto;
  gap: 22px 48px;
  align-items: start;
  padding: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.art-passage__caption :is(.eyebrow, small, .art-passage__label) {
  display: block;
  padding-top: 3px;
  color: var(--accent);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.art-passage__caption h2,
.art-passage__caption h3 { color: var(--text); font-size: clamp(26px, 3.2vw, 42px); }
.art-passage__caption p { max-width: 610px; }
.art-passage__caption h2 + p,
.art-passage__caption h3 + p { margin-top: 14px; }
.art-passage__switch {
  display: inline-flex;
  align-items: center;
  align-self: start;
  justify-self: end;
  gap: 20px;
  min-height: 44px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  transition: color 220ms ease, border-color 220ms ease;
}
.art-passage__switch > span { font-size: 18px; font-weight: 400; transition: transform 260ms cubic-bezier(.16,1,.3,1); }
.art-passage__switch:is(:hover, :focus-visible) { color: var(--accent); border-color: var(--accent); }
.art-passage__switch:is(:hover, :focus-visible) > span { transform: translate(2px, -2px); }
.js-reveal .art-passage.reveal:not(.is-visible) .art-passage__image img,
.js-reveal .art-passage__image.reveal:not(.is-visible) img { transform: scale(1.1) translateY(2%); }

/* The route sits inside a field. Solid veils protect the words and controls. */
.connections { background: #101a18; }
.connections-artwork {
  position: absolute;
  inset: 0 0 auto;
  height: min(82%, 710px);
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.connections-artwork img { width: 100%; height: 100%; object-fit: cover; }
.connections-atmosphere {
  inset: 0;
  background:
    linear-gradient(180deg, #101a1857 0%, #101a18c4 40%, #101a18f5 76%, #101a18 100%),
    linear-gradient(90deg, #101a18ce 0%, #101a1810 84%);
}
.connections .connections-inner { z-index: 1; }
.light-theme .connections {
  --connection-ink: #1b2a27;
  --connection-muted: #53635b;
  --connection-copper: #8b603c;
  --connection-line: #70846b35;
  color: var(--connection-ink);
  background: #eeeade;
  border-block-color: #70846b29;
}
.light-theme .connections-atmosphere {
  background:
    linear-gradient(180deg, #eeeade70 0%, #eeeadecc 39%, #eeeadef5 76%, #eeeade 100%),
    linear-gradient(90deg, #eeeadee5 0%, #eeeade52 76%, #eeeade15 100%);
}
.light-theme .connections-path > span,
.light-theme .connections-map-footer > p,
.light-theme .connections-work-note { color: #5b6d5f; }
.light-theme .connections-work-description { color: #465b4d; }
.light-theme .connections-idea > p { color: #223b2c; }
.light-theme .connections-node-dot {
  border-color: #6d84697a;
  background: #eeeade;
  color: #4d654f;
  box-shadow: 0 0 0 7px #eeeadee8;
}
.light-theme .connections-node[aria-pressed="true"] .connections-node-dot {
  color: #f7f2e7;
  background: #76563a;
  border-color: #76563a;
  box-shadow: 0 0 0 7px #eeeadee8, 0 0 28px #967c4b20;
}
.light-theme .connections-node-dot::after { border-color: #8b603c; }
.light-theme .connections-node:hover .connections-node-dot { border-color: #76563a; }
.light-theme .connections-node:focus-visible .connections-node-dot { outline-color: #8b603c; }
.light-theme .connections-controls button { border-color: #6d846957; }
.light-theme .connections-controls button:hover:not(:disabled) { background: #ad926618; }
.light-theme .connections-contours { stroke: #587255; opacity: .18; }
.light-theme .connections-track { stroke: #67825e69; }
.light-theme .connections-trace { stroke: #97724b; }
.light-theme .connections-tracer { fill: #7b5234; }
.light-theme .connections-tracer-halo { fill: #a3835320; stroke: #8b603c60; }
.light-theme .connections-journey li::before { color: #866340; }

/* The personal passage changes from an illuminated field to a page of studies. */
.feature-panel { background: linear-gradient(125deg, #15211e, #101918 75%); }
.light-theme .feature-panel { background: linear-gradient(125deg, #ebe6da, #f2eee5 78%); }
.material-study {
  padding: 0 0 50px;
  border-radius: 4px;
  background: #111c19;
  border-color: #68806c3b;
}
.material-study img.theme-artwork { height: clamp(300px, 32vw, 470px); object-fit: cover; }
.material-caption { bottom: 19px; color: #b8b69b; font-size: 9px; letter-spacing: .16em; }
.light-theme .material-study { background: #eee8d9; border-color: #89917c55; }
.light-theme .material-caption { color: #68715b; }
.light-theme .material-study::after { background-image: linear-gradient(115deg, transparent 20%, #fffcf326 48%, transparent 76%); }
.light-theme .experience-stage { box-shadow: 0 26px 80px #665a3d0a; }
.light-theme .experience-stage::after { border-color: #8b603c35; }
.light-theme .detail-glyph { background-color: #e4ddcc; }
.light-theme dialog { box-shadow: 0 30px 130px #17251f29; }
.light-theme dialog::backdrop { background: #19362c55; }
.collection-dialog .detail-visual:has(img.theme-artwork) { height: clamp(150px, 24vw, 240px); background: var(--surface); }
.collection-dialog .detail-visual img.theme-artwork { object-position: var(--art-position-dark, center); }
.light-theme .collection-dialog .detail-visual img.theme-artwork { object-position: var(--art-position-light, center); }

/* The last image resolves into the page's own light, in either appearance. */
.closing {
  color: #eee9df;
  background: #101918;
  padding-block: clamp(100px, 11vw, 164px) clamp(112px, 12vw, 180px);
}
.contact-artwork { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.contact-artwork img { width: 100%; height: 100%; object-fit: cover; }
.closing::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  transform: none;
  background:
    linear-gradient(90deg, #101918f7 0%, #101918e0 31%, #1019186b 66%, #10191800 100%),
    linear-gradient(0deg, #101918d6 0%, #10191800 55%);
}
.closing > .container { position: relative; z-index: 1; }
.closing .eyebrow { color: #c8af8e; }
.closing p:not(.eyebrow) { color: #b7c4b7; }
.closing .pill-button { color: #eee9df; border-color: #a6b49a7a; background: #d2ad8808; }
.closing .pill-button:hover { color: #17231c; background: #e5d9bc; border-color: #e5d9bc; }
.closing-seam { opacity: .4; background: #b79c6a55; }
.light-theme .closing { color: var(--site-ink); background: #f2eee5; }
.light-theme .closing::before {
  background:
    linear-gradient(90deg, #f2eee5f7 0%, #f2eee5e3 31%, #f2eee566 66%, #f2eee500 100%),
    linear-gradient(0deg, #f2eee5c7 0%, #f2eee500 55%);
}
.light-theme .closing .eyebrow { color: #7e6245; }
.light-theme .closing p:not(.eyebrow) { color: #4b6051; }
.light-theme .closing .pill-button { color: #20382a; border-color: #6e7d637a; background: #fffaf02e; }
.light-theme .closing .pill-button:hover { color: #f3eee3; background: #243d2c; border-color: #243d2c; }
.light-theme .closing-seam { opacity: .32; }
.site-footer { position: relative; background-color: var(--bg); }

@media (max-width: 1100px) {
  .art-passage__image { aspect-ratio: 1.8; }
  .art-passage__caption { gap: 20px 36px; }
  .material-study img.theme-artwork { height: 365px; }
}
@media (max-width: 760px) {
  #site-header .theme-button { width: 82px; gap: 7px; padding-inline: 10px; }
  img.theme-artwork,
  .theme-artwork img[data-dark-src] { object-position: var(--art-position-dark-mobile, var(--art-position-dark, center)); }
  .light-theme img.theme-artwork,
  .light-theme .theme-artwork img[data-light-src] { object-position: var(--art-position-light-mobile, var(--art-position-light, center)); }
  .light-theme .hero-shade {
    background:
      linear-gradient(0deg, #f2eee5fc 0%, #f2eee5ed 30%, #f2eee566 65%, #f2eee500 92%),
      linear-gradient(90deg, #f2eee54d 0%, #f2eee500 85%);
  }
  .light-theme .photo-shade {
    background:
      linear-gradient(90deg, #f2eee5ed 0%, #f2eee5b8 48%, #f2eee536 100%),
      linear-gradient(0deg, #f2eee5b8 0%, #f2eee52e 80%);
  }
  .art-passage { padding-block: 6px 78px; }
  .art-passage__image { aspect-ratio: 1.18; border-radius: 3px; }
  .art-passage__caption { grid-template-columns: 1fr; gap: 13px; padding-top: 22px; font-size: 13px; }
  .art-passage__caption :is(.eyebrow, small, .art-passage__label) { font-size: 9px; }
  .art-passage__caption h2,
  .art-passage__caption h3 { font-size: 31px; }
  .art-passage__switch { justify-self: start; margin-top: 6px; }
  .connections-artwork { height: 510px; }
  .connections-atmosphere { background: linear-gradient(180deg, #101a187a, #101a18e8 57%, #101a18 100%); }
  .light-theme .connections-atmosphere { background: linear-gradient(180deg, #eeeade9c, #eeeadeeb 57%, #eeeade 100%); }
  .material-study { padding-bottom: 45px; }
  .material-study img.theme-artwork { height: auto; aspect-ratio: 1.35; }
  .material-caption { bottom: 17px; font-size: 8px; letter-spacing: .13em; }
  .closing { padding-block: 88px 116px; }
  .closing::before { background: linear-gradient(90deg, #101918ed, #10191885), linear-gradient(0deg, #101918d9, transparent 80%); }
  .light-theme .closing::before { background: linear-gradient(90deg, #f2eee5eb, #f2eee585), linear-gradient(0deg, #f2eee5d9, transparent 80%); }
}
@media (max-width: 380px) {
  #site-header .theme-button { width: 76px; gap: 6px; padding-inline: 8px; }
}

.motion-paused,
.motion-paused img.theme-artwork,
.motion-paused .theme-artwork img,
.motion-paused #site-header .theme-button svg,
.motion-paused .art-passage__image img,
.motion-paused .art-passage__switch,
.motion-paused .art-passage__switch > span { transition: none !important; }
.motion-paused .art-passage__image img { transform: none !important; }
.motion-paused .art-passage__switch > span { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  body,
  img.theme-artwork,
  .theme-artwork img,
  #site-header .theme-button svg,
  .art-passage__image img,
  .art-passage__switch,
  .art-passage__switch > span { transition: none !important; }
  .art-passage__image img { transform: none !important; }
  .art-passage__switch > span { transform: none !important; }
}

/* The archive and its local artwork preview share the portfolio's quiet chrome. */
.art-archive-link { display: inline-flex; align-items: center; gap: 18px; min-height: 44px; margin-top: 14px; font-size: 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.art-archive-link:hover { color: var(--accent); border-color: var(--accent); }
.flow-landscape, .after-scenes.has-landscape .flow-landscape, .light-theme .after-scenes.has-landscape .flow-landscape { background: none; overflow: hidden; }
.flow-landscape > img { width: 100%; height: 100%; object-fit: cover; }
.flow-landscape::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,transparent,var(--bg)); }
.art-preview-notice { position: fixed; z-index: 80; bottom: 18px; left: 24px; right: auto; display: flex; align-items: center; gap: 20px; max-width: calc(100vw - 48px); padding: 13px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: 0 5px 35px #0003; font-size: 12px; line-height: 1.4; }
.art-preview-notice a { min-height: 30px; display: inline-flex; align-items: center; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.art-preview-status { color: var(--muted); }
@media (max-width: 600px) {
  .art-preview-notice { left: 12px; right: 12px; bottom: 12px; max-width: none; gap: 10px 20px; padding: 10px 14px; flex-wrap: wrap; }
  .art-preview-status { flex-basis: 100%; }
  .art-preview-notice a { min-height: 36px; }
}
