:root {
  --spacing-base: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --color-text: #ffffff;
  --color-text-dim: 0.6;
  --transition-medium: 0.3s ease;
  --font-size-base: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: "noka", sans-serif;
  overflow: hidden;
  height: 100vh;
  cursor: grab;
  font-weight: 300;
}

body.dragging {
  cursor: grabbing;
}

body.zoom-mode {
  cursor: default;
}

.preloader-overlay {
  background: #000;
}

/* Header and Footer */
.header,
.footer {
  position: fixed;
  left: 0;
  width: 100vw;
  padding: 1.5rem;
  z-index: 10000;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--spacing-base);
  pointer-events: none;
  opacity: 0;
}

.header > *,
.footer > * {
  pointer-events: auto;
}

.header {
  top: 0;
}

.footer {
  bottom: 0;
}

/* Grid column assignments */
.nav-section {
  grid-column: 1 / span 3;
}

.values-section {
  grid-column: 5 / span 2;
}

.location-section {
  grid-column: 7 / span 2;
}

.contact-section {
  grid-column: 9 / span 2;
}

.social-section {
  grid-column: 11 / span 2;
  text-align: right;
}

/* Bottom bar */
.coordinates-section {
  grid-column: 1 / span 3;
  font-family: "noka", monospace;
  font-weight: 300;
}

.info-section {
  grid-column: 9 / span 4;
  text-align: right;
}

/* ===== LOGO COMPONENT ===== */
.logo-container {
  margin-bottom: var(--spacing-md);
  display: block;
  width: 3rem;
  height: 1.5rem;
  position: relative;
  cursor: pointer;
}

.logo-circles {
  position: relative;
  width: 100%;
  height: 100%;
}

.circle {
  position: absolute;
  border-radius: 50%;
  transition: transform var(--transition-medium);
  width: 1.4rem;
  height: 1.4rem;
  background-color: var(--color-text);
  top: 50%;
}

.circle-1 {
  left: 0;
  transform: translate(0, -50%);
}

.circle-2 {
  left: 0.8rem;
  transform: translate(0, -50%);
  mix-blend-mode: exclusion;
}

.logo-container:hover .circle-1 {
  transform: translate(-0.5rem, -50%);
}

.logo-container:hover .circle-2 {
  transform: translate(0.5rem, -50%);
}

/* Key hint styling */
.key-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 1px solid var(--color-text);
  border-radius: 3px;
  font-size: 12px;
  margin: 0 3px;
  min-width: 20px;
  height: 20px;
}

/* Footer text styling */
.footer p {
  font-family: "noka", monospace;
  font-weight: 300;
}

p {
  display: block;
  text-decoration: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01rem;
  -webkit-font-smoothing: antialiased;
}

ul {
  list-style: none;
}

h3 {
  font-size: 14px;
  margin-bottom: var(--spacing-base);
  font-weight: 600;
  color: #fff;
}

.viewport {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
}

.canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  isolation: isolate;
}

.grid-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.grid-item {
  position: absolute;
  width: 320px;
  height: 320px;
  cursor: pointer;
  will-change: transform, opacity;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.grid-item.out-of-view {
  opacity: 0.1;
}

.grid-item.selected {
  z-index: 2 !important;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Split Screen Layout */
.split-screen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.split-screen-container.active {
  opacity: 1;
  pointer-events: all;
}

.split-left {
  position: relative;
  width: 50vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  cursor: pointer;
}

.split-right {
  position: relative;
  width: 50vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  cursor: pointer;
}

/* Image target - BEHIND the scaling image */
.zoom-target {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Image title overlay - positioned at bottom left */
.image-title-overlay {
  position: absolute;
  bottom: 40px;
  left: 40px;
  transform: none;
  color: white;
  z-index: 4;
  opacity: 0;
}

.image-title-overlay.active {
  opacity: 0;
}

.image-slide-number {
  position: relative;
  width: 400px;
  height: 20px;
  margin-bottom: 0.5em;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
}

.image-slide-number span {
  position: absolute;
  top: 0;
  left: 0;
  color: white;
  font-family: "noka", monospace;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  transform: translateY(0px);
  will-change: transform;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.image-slide-title {
  position: relative;
  width: 400px;
  height: 60px;
  margin-bottom: 1em;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
}

.image-slide-title h1 {
  position: absolute;
  top: 0;
  left: 0;
  color: white;
  font-family: "noka", sans-serif;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transform: translateY(0px);
  will-change: transform;
  margin: 0;
  padding: 0;
}

.image-slide-description {
  position: relative;
  width: 400px;
  min-height: 80px;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
}

.description-line {
  position: relative;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-family: "noka", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4;
  transform: translateY(0px);
  will-change: transform;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .image-title-overlay {
    bottom: 20px;
    left: 20px;
  }

  .image-slide-number {
    width: 300px;
    height: 18px;
  }

  .image-slide-number span {
    font-size: 10px;
  }

  .image-slide-title {
    width: 300px;
    height: 50px;
  }

  .image-slide-title h1 {
    font-size: 36px;
  }

  .image-slide-description {
    width: 300px;
    min-height: 70px;
  }

  .description-line {
    font-size: 14px;
  }
}

/* Hide placeholder when active */
.split-screen-container.active .zoom-target::before {
  display: none;
}

.zoom-target::before {
  content: "IMAGE TARGET";
  color: rgba(255, 255, 255, 0.5);
  font-family: "noka", monospace;
  font-size: 0.75em;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.controls-container {
  position: fixed;
  bottom: 1.25em;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 6;
  opacity: 0;
  transition: left 1.2s cubic-bezier(0.87, 0, 0.13, 1);
}

.controls-container.visible {
  opacity: 1;
}

.controls-container.split-mode {
  left: 75%;
}

.percentage-indicator {
  background-color: #f0f0f0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 0);
  background-size: 0.44em 0.44em;
  background-position: -0.06em -0.06em;
  padding: 0.625em 1.25em;
  border-radius: 0.25em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "noka", monospace;
  font-size: 0.75em;
  font-weight: 300;
  text-transform: uppercase;
  color: #333;
  min-width: 5em;
  white-space: nowrap;
}

.switch {
  display: flex;
  gap: 1.25em;
  background-color: #222;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.015) 1px,
    transparent 0
  );
  background-size: 0.44em 0.44em;
  background-position: -0.06em -0.06em;
  padding: 0.625em 1.25em;
  border-radius: 0.25em;
  transition: padding 0.3s ease-in-out;
}

.switch-button {
  background: none;
  border: none;
  border-color: transparent;
  color: #666;
  cursor: pointer;
  font-family: "noka", monospace;
  font-size: 0.75em;
  font-weight: 300;
  text-transform: uppercase;
  padding: 5px 10px;
  position: relative;
  transition: all 0.3s ease-in-out;
  white-space: nowrap;
}

.switch-button-current {
  color: #f0f0f0;
}

.indicator-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: #f0f0f0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  top: 50%;
  transform: translateY(-50%);
  left: -8px;
}

.switch-button:hover .indicator-dot {
  opacity: 1;
}

/* Simple 64px white arrow button */
.close-button {
  position: fixed;
  top: 50%;
  width: 64px;
  height: 64px;
  background: none;
  border: none;
  border-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translate(40px, -50%);
}

.close-button.active {
  pointer-events: all;
}

.close-button:hover {
  opacity: 0.7;
}

.close-button svg {
  width: 64px;
  height: 64px;
  transform: rotate(180deg);
}

/* Scaling image overlay */
.scaling-image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
  will-change: transform;
  opacity: 1 !important;
}

.scaling-image-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Page vignette effect */
.page-vignette-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

.page-vignette-extreme {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: overlay;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 20%,
    transparent 40%
  );
}

/* Vacq visual identity; reference geometry and animation are preserved. */
:root {
  --color-text: #181818;
}
body {
  color: #181818;
}
.preloader-overlay {
  background: #fff !important;
}
.image-title-overlay,
.image-slide-number,
.image-slide-title,
.image-slide-description {
  color: #fff;
}
.page-vignette-extreme {
  mix-blend-mode: normal;
}
.wordmark {
  font-family: noka, sans-serif;
  font-size: 30px;
  letter-spacing: -2px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}
.controls-container {
  border-radius: 40px;
  background: linear-gradient(135deg, #ffffffc9, #ffffff80);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 2px white,
    0 3px 15px #0001;
  padding: 8px 16px;
}
.switch-button-current {
  color: #0048ff;
}
.indicator-dot {
  background: #0048ff;
}
.percentage-indicator {
  color: #191919;
}
.header a {
  color: inherit;
  text-decoration: none;
}
.image-title-overlay {
  pointer-events: none;
  text-shadow: 0 2px 20px #0008;
}
.header,
.footer {
  font-family: noka, sans-serif;
  font-weight: 300;
}
.values-section h3,
.location-section h3,
.contact-section h3,
.social-section h3 {
  font-family: noka, sans-serif;
  font-weight: 500;
}
.zoom-target::before {
  display: none;
}

@media (max-width: 700px) {
  .header {
    grid-template-columns: repeat(4, 1fr);
  }
  .nav-section {
    grid-column: 1/3;
  }
  .values-section {
    grid-column: 3/5;
    text-align: right;
  }
  .location-section,
  .contact-section,
  .social-section {
    display: none;
  }
  .controls-container {
    width: max-content;
    max-width: 96vw;
    padding: 8px;
  }
  .switch-button {
    font-size: 9px !important;
  }
  .image-slide-title h1 {
    font-size: 32px;
  }
  .image-title-overlay {
    left: 18px;
    bottom: 25px;
    width: 42vw;
  }
  .close-button {
    right: 10px;
  }
  .footer {
    font-size: 9px;
  }
}

/* Black gallery with the portfolio navigation and sphere return control. */
:root {
  --color-text: #fff;
}
body {
  background: #000;
  color: #fff;
}
.preloader-overlay {
  background: #000 !important;
}
.grid-item {
  background: #000;
}
.split-left,
.split-right {
  background: rgba(0, 0, 0, 0.6);
}
.page-vignette-extreme {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.5) 20%,
    transparent 40%
  );
}
.close-button svg path {
  fill: #fff;
}
.image-title-overlay,
.header,
.footer {
  display: none !important;
}
#ui-wrapper {
  z-index: 10001;
  top: 20px;
  bottom: auto;
}
#ui a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-family: noka, sans-serif;
  font-weight: 300;
}
#ui a:hover {
  color: #7da0ff;
}
.photo-return {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10001;
  color: rgba(255, 255, 255, 0.9);
  font:
    300 10px noka,
    sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.controls-container {
  background: linear-gradient(135deg, #202020b8, #10101080);
  box-shadow:
    inset 0 1px 1px #ffffff30,
    0 3px 15px #0003;
}
.percentage-indicator,
.switch-button {
  color: #aaa;
}
.switch-button-current {
  color: #fff;
}
.indicator-dot {
  background: #fff;
}
@media (max-width: 700px) {
  #ui-wrapper {
    top: 16px;
  }
  #ui {
    gap: 12px;
    padding: 5px 13px;
    font-size: 10px;
  }
  .photo-return {
    top: 90px;
    right: 18px;
  }
}

/* Share the site's existing glass rules without the demo's link effects. */
#ui a {
  font-size: inherit;
  font-weight: 400;
  line-height: normal;
  color: rgb(30 30 30 / 0.88);
  mix-blend-mode: normal;
}
#ui a::after {
  content: none;
}
#ui a:hover {
  color: #0048ff;
  mix-blend-mode: normal;
}
#ui-wrapper {
  animation: none;
}
.photo-return {
  color: rgb(30 30 30 / 0.88);
  font-weight: 400;
  line-height: normal;
  mix-blend-mode: normal;
}
.photo-return:hover {
  color: #0048ff;
  mix-blend-mode: normal;
}
.photo-return::after {
  inset: -0.5px;
  width: auto;
  height: auto;
}
.controls-container.sphere-exit {
  display: flex;
  isolation: isolate;
  gap: 12px;
  border: 0;
  padding: 8px 16px;
  font-size: 12px;
  cursor: default;
  background: linear-gradient(
    -75deg,
    rgb(255 255 255 / 0.05),
    rgb(255 255 255 / 0.2),
    rgb(255 255 255 / 0.05)
  );
  box-shadow:
    inset 0 2px 2px rgb(0 0 0 / 0.065),
    inset 0 -2px 2px rgb(255 255 255 / 0.65),
    0 4px 2px -2px rgb(0 0 0 / 0.2),
    0 7px 16px -8px rgb(0 0 0 / 0.18),
    inset 0 0 2px 4px rgb(255 255 255 / 0.2);
  backdrop-filter: none;
}
.controls-container > * {
  position: relative;
  z-index: 2;
}
.controls-container .percentage-indicator,
.controls-container .switch,
.controls-container .sound-toggle {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 999px;
}
.controls-container .percentage-indicator {
  padding: 8px 4px;
  min-width: 42px;
}
.controls-container .switch {
  padding: 6px 4px;
  gap: 8px;
}

.controls-container .switch-button {
  font-family: noka, sans-serif;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #aaa;
}
.controls-container .switch-button-current {
  color: #fff;
}
.controls-container .switch-button:hover {
  color: #fff;
}
.controls-container .indicator-dot {
  background: #fff;
}
@media (max-width: 700px) {
  .controls-container.sphere-exit {
    gap: 5px;
    padding: 7px 10px;
  }
  .controls-container .switch {
    gap: 2px;
  }
  .controls-container .switch-button {
    padding: 5px;
  }
}

/* Keep the original portfolio loader above the page navigation. */
#loader {
  z-index: 100000;
}
#progress-bar {
  z-index: 100001;
}

/* White gallery surface. */
body {
  background: #fff;
  color: #191919;
}
.grid-item {
  background: #f0f0ed;
}
.split-left,
.split-right {
  background: rgba(255, 255, 255, 0.8);
}
.page-vignette-extreme {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.4) 20%,
    transparent 40%
  );
}
.close-button svg path {
  fill: #191919;
}
.controls-container .percentage-indicator,
.controls-container .switch-button {
  color: #666;
}
.controls-container .switch-button-current,
.controls-container .switch-button:hover {
  color: #191919;
}
.controls-container .indicator-dot {
  background: #191919;
}

/* Softer white fade while exploring. */
.page-vignette-extreme {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.14) 20%,
    transparent 40%
  );
}
.grid-item.out-of-view {
  opacity: 0.45;
}

/* Compact zoom controls. */
.controls-container .percentage-indicator,
.controls-container .sound-toggle {
  display: none !important;
}
.controls-container.sphere-exit {
  padding: 5px 10px;
  gap: 0;
}
.controls-container .switch {
  padding: 0;
  gap: 2px;
}
.controls-container .switch-button {
  font-size: 12px !important;
  padding: 10px 14px;
  min-width: 38px;
  text-transform: none;
  letter-spacing: 0;
}
.controls-container .indicator-dot {
  display: none;
}

.controls-container .switch-button:hover,
.controls-container .switch-button:focus-visible {
  color: #0048ff;
}
.controls-container .switch-button:hover .indicator-dot {
  background: #0048ff;
}

/* Keep the selected photograph free of the exploration vignette. */
.page-vignette-container {
  transition: opacity 0.35s ease;
}
body.zoom-mode .page-vignette-container {
  opacity: 0;
  visibility: hidden;
}

/* Match the navigation glass rim on the Back control. */
.photo-return::after {
  transition: --nav-rim-angle 0.5s ease;
}
@media (hover: hover) {
  .photo-return:hover::after {
    --nav-rim-angle: -125deg;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-return::after {
    transition: none;
  }
}

/* Dedicated square crops in the fresco; original composition in the focus view. */
.split-screen-container .split-left {
  width: 100vw;
  height: 100svh;
  box-sizing: border-box;
  padding: 88px 40px 62px;
  align-items: center;
  justify-content: center;
}
.split-screen-container .split-right {
  display: none;
}
.scaling-image-overlay {
  overflow: hidden;
}
.scaling-image-overlay .crop-photo,
.scaling-image-overlay .full-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scaling-image-overlay .crop-photo {
  object-fit: cover;
}
.scaling-image-overlay .full-photo {
  object-fit: contain;
  opacity: 0;
}
.close-button {
  top: 92px;
  right: 20px;
  width: 44px;
  height: 44px;
  transform: none;
}
.close-button svg {
  width: 30px;
  height: 30px;
}
.grid-item:focus-visible {
  outline: 3px solid #0048ff;
  outline-offset: 6px;
}
@media (max-width: 700px) {
  .split-screen-container .split-left {
    padding: 96px 16px 84px;
  }
  .close-button {
    top: calc(74px + env(safe-area-inset-top));
    right: 14px;
  }
}
