:root {
  color-scheme: dark;
  background: #0e0c0a;
  color: #f2ece1;
  font: 15px/1.5 "Space Grotesk", system-ui, sans-serif;
  scrollbar-width: none;
  --reveal: 165svh;
  --hold: 52svh;
  --crossing: 218svh;
  --practice-end: calc(var(--reveal) + var(--hold) + var(--crossing));
  --practice-hold: 46svh;
  --portrait-move: 172svh;
  --about-end: calc(var(--practice-end) + var(--practice-hold) + var(--portrait-move));
  --about-hold: 48svh;
  --corner-move: 194svh;
  --distance: calc(var(--about-end) + var(--about-hold) + var(--corner-move));
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body, h1, h2, h3, p, ol, figure { margin: 0 }
html::-webkit-scrollbar { display: none }
html:has(dialog[open]) { overflow: hidden }
a { color: inherit; text-underline-offset: .28em }
a:focus-visible, button:focus-visible { outline: 2px solid #f0cfa0; outline-offset: 4px }
button { font: inherit; color: inherit; cursor: pointer }
.skip {
  position: fixed;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  background: #f1eade;
  color: #17100b;
  padding: .6rem 1rem;
  transform: translateY(-180%);
}
.skip:focus { transform: none }
.journey { position: relative; height: calc(100svh + var(--distance)) }
.stage { position: sticky; top: 0; width: 100%; height: 100svh; overflow: hidden }

/* Full-viewport HUD stage */
.screen {
  container-type: inline-size;
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: #130f0c;
  isolation: isolate;
}

/* Aspect-locked 16:9 optical camera layer keeps 3D spine hitboxes pixel-exact on any screen shape */
.camera-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, calc(100svh * 16 / 9));
  height: max(100svh, calc(100vw * 9 / 16));
}
.camera-frame > .poster,
.camera-frame > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#collection, #practice-move, #practice, #about-move, #about, #contact-move, #contact { position: absolute; left: 0 }
#collection { top: var(--reveal) }
#practice-move { top: calc(var(--reveal) + var(--hold)) }
#practice { top: var(--practice-end) }
#about-move { top: calc(var(--practice-end) + var(--practice-hold)) }
#about { top: var(--about-end) }
#contact-move { top: calc(var(--about-end) + var(--about-hold)) }
#contact { top: var(--distance) }

/* Calibrated Spine Hitboxes inside .camera-frame */
.spines { position: absolute; inset: 0; z-index: 2; pointer-events: none }
.spine {
  position: absolute;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  pointer-events: auto;
  transition: border-color .22s cubic-bezier(0.42, 0, 0.58, 1), background-color .22s cubic-bezier(0.42, 0, 0.58, 1), box-shadow .22s cubic-bezier(0.42, 0, 0.58, 1);
}
.spine:hover, .spine:focus-visible {
  border-color: color-mix(in srgb, var(--spine-accent, #f0cfa0) 78%, #f4efe6);
  background: linear-gradient(180deg, rgba(242, 236, 225, 0.14), rgba(244, 239, 230, 0.03) 45%, color-mix(in srgb, var(--spine-accent, #ddb27b) 14%, transparent));
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(240, 207, 160, 0.14);
}
.spine > span {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .62em;
  row-gap: 1px;
  align-items: center;
  padding: .48em .88em .5em;
  background: rgba(14, 12, 10, 0.96);
  border: 1px solid rgba(242, 236, 225, 0.24);
  border-top: 2px solid var(--spine-accent, #e0462b);
  border-radius: 2px;
  color: #f4efe6;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity .2s cubic-bezier(0.22, 1, 0.36, 1), transform .2s cubic-bezier(0.22, 1, 0.36, 1);
}
.spine > span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 11px;
  background: linear-gradient(180deg, var(--spine-accent, #e0462b), transparent);
}
.spine .spine-idx {
  grid-row: 1 / span 2;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: clamp(9.5px, .74cqw, 11px);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--spine-accent, #ff5e40);
  font-variant-numeric: tabular-nums;
}
.spine .spine-name {
  font-family: var(--font-sans, "Space Grotesk", sans-serif);
  font-size: clamp(11px, .88cqw, 13.5px);
  font-weight: 700;
  letter-spacing: -.015em;
  color: #f2ece1;
  line-height: 1.15;
}
.spine .spine-cat {
  font-style: normal;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: clamp(8.5px, .65cqw, 10px);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(242, 236, 225, 0.62);
  line-height: 1.15;
}
.spine:hover > span, .spine:focus-visible > span {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Practice Display Monitor Hotzone synchronized to calibrated studio display bezel */
.practice-control {
  position: absolute;
  z-index: 2;
  left: 41.0059%;
  top: 29.9380%;
  width: 19.5716%;
  height: 19.4417%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color .22s cubic-bezier(0.42, 0, 0.58, 1), box-shadow .22s cubic-bezier(0.42, 0, 0.58, 1);
}
.practice-control span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -2.7em;
  padding: .42em .98em;
  background: rgba(19, 15, 11, 0.92);
  border: 1px solid rgba(221, 178, 123, 0.42);
  border-radius: 999px;
  color: #f4efe6;
  font-size: clamp(10.5px, .9cqw, 13.5px);
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.52);
  transition: opacity .22s cubic-bezier(0.42, 0, 0.58, 1), border-color .22s cubic-bezier(0.42, 0, 0.58, 1), background-color .22s cubic-bezier(0.42, 0, 0.58, 1);
}
html[data-notes="on"] .practice-control:not(:hover):not(:focus-visible) span {
  opacity: 0;
  pointer-events: none;
}
.practice-control:hover, .practice-control:focus-visible {
  border-color: rgba(240, 207, 160, 0.85);
  box-shadow: 0 0 26px rgba(221, 178, 123, 0.24);
}
.practice-control:hover span, .practice-control:focus-visible span {
  border-color: #f0cfa0;
  background: rgba(34, 26, 20, 0.96);
}

.progress { position: absolute; inset: auto 0 0; z-index: 5; height: 2px; background: rgba(221, 178, 123, 0.14) }
.progress span { display: block; height: 100%; transform: scaleX(0); transform-origin: left; background: #ddb27b; box-shadow: 0 0 10px rgba(221, 178, 123, 0.45) }

/* Case Cover Reveal Modal Dialog */
dialog {
  width: min(1020px, 91vw);
  max-height: 88svh;
  padding: clamp(20px, 4vw, 44px);
  background: #211914;
  color: #f1eade;
  border: 1px solid #ac896058;
  box-shadow: 0 24px 120px #0009;
}
dialog::backdrop { background: #0c0807bc }
.project-header { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1.6rem }
.project-category { color: #dfb48d; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem }
.project-header button { background: transparent; border: 1px solid #d0af8971; padding: .55em .9em; border-radius: 999px }
.project-header button span { margin-left: .6em }
.project-body { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(20px, 4vw, 55px); align-items: start }
.project-copy h2 { font: 400 clamp(27px, 4.3vw, 65px)/1.03 "Instrument Serif", Georgia, serif; text-transform: uppercase; margin-bottom: .45em }
.project-description { color: #d9cbbd; max-width: 35ch }
.project-case-link {
  display: inline-block;
  margin-top: 1.4rem;
  padding: .55em 1.05em;
  border: 1px solid #d0af8971;
  border-radius: 999px;
  text-decoration: none;
}
.project-case-link:hover { background: #a7794f29 }
.project-case-link span { margin-left: .45em }
.project-body img { display: block; width: 100%; height: auto; max-height: 58svh; object-fit: contain; object-position: top left }
.project-body figcaption { padding-top: .55em; color: #c5b2a1; font-size: .8rem }
.noscript { padding: 1rem }

@media (max-width: 650px) {
  .project-body { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --reveal: 0px; --hold: 0px; --crossing: 0px; --practice-hold: 0px;
    --portrait-move: 0px; --about-hold: 0px; --corner-move: 0px;
  }
  .progress { display: none !important }
}

html[data-renderer="cycles-v268"], html[data-renderer="cycles-v268"] * { overflow-anchor: none; }
