@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #33373c;
  --muted: #747b83;
  --line: rgba(112, 120, 129, 0.52);
  --glass: rgba(238, 240, 242, 0.48);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --room-position-x: 50%;
  --room-position-y: 100%;
  --room-about-position-x: 50%;
  --room-about-position-y: 100%;
  --room-projects-position-x: 50%;
  --room-projects-position-y: 50%;
  --room-contacts-position-x: 50%;
  --room-contacts-position-y: 100%;
  --room-fade-duration: 900ms;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--ink);
  background: #d9dde1;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  isolation: isolate;
  background: #d9dde1;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

button,
a {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

button,
a {
  cursor: pointer;
}

body::before,
body::after,
.room-background::before,
.room-background::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  transition: opacity var(--room-fade-duration) var(--ease);
  will-change: opacity;
}

body::before {
  z-index: 0;
  background-image: url("../assets/room-bg.webp");
  background-position: var(--room-position-x) var(--room-position-y);
  opacity: 1;
}

body::after {
  z-index: 0;
  background-image: none;
  background-position: var(--room-contacts-position-x) var(--room-contacts-position-y);
  opacity: 0;
}

body.bg-load-contacts::after {
  background-image: url("../assets/room-bg-contacts.webp");
}

body.view-about::before,
body.view-projects::before,
body.view-contacts::before {
  opacity: 0;
}

body.view-contacts::after {
  opacity: 1;
}

.room-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.room-background::before {
  background-image: none;
  background-position: var(--room-about-position-x) var(--room-about-position-y);
  opacity: 0;
}

body.bg-load-about .room-background::before {
  background-image: url("../assets/room-bg-about.webp");
}

.room-background::after {
  background-image: none;
  background-position: var(--room-projects-position-x) var(--room-projects-position-y);
  filter: blur(0) brightness(1);
  opacity: 0;
  transition:
    opacity var(--room-fade-duration) var(--ease),
    filter 700ms ease;
  will-change: opacity, filter;
}

body.bg-load-projects .room-background::after {
  background-image: url("../assets/room-bg-projects.webp");
}

body.view-about .room-background::before {
  opacity: 1;
}

body.view-projects .room-background::after {
  filter: blur(3px) brightness(0.8);
  opacity: 1;
}

.room-scrim {
  position: fixed;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 36%,
    rgba(20, 24, 28, 0.5) 62%,
    rgba(20, 24, 28, 0.6) 100%
  );
  opacity: 0;
  transition: opacity var(--room-fade-duration) var(--ease);
  will-change: opacity;
}

body.view-about .room-scrim,
body.view-contacts .room-scrim {
  opacity: 1;
}

#particle-stage {
  position: fixed;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  filter: none;
  transition: filter 700ms ease;
}

body.view-projects #particle-stage {
  filter: blur(3px);
}

#particle-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
}

/* The model is only interactive on home (mouse splat / touch drag). On the other
   views the full-screen canvas must not intercept clicks on UI (e.g. back). */
body:not(.view-home) #particle-stage canvas {
  pointer-events: none;
}

.site-shell,
.view {
  position: fixed;
  z-index: 3;
  inset: 0;
}

.site-shell {
  pointer-events: none;
}

.view {
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease, transform 1050ms var(--ease);
  will-change: opacity, transform;
}

.view.is-active {
  opacity: 1;
}

.view:not(.is-active) .project-card,
.view:not(.is-active) .link-button {
  animation-play-state: paused;
}

.view-contacts.is-active,
.view-about.is-active,
.view-projects.is-active,
.view-home.is-active .projects-rail,
.view-home.is-active .side-nav {
  pointer-events: auto;
}

.view.is-leaving-right {
  opacity: 0;
  transform: translateX(9vw);
}

.view.is-leaving-left {
  opacity: 0;
  transform: translateX(-9vw);
}

.view.from-right {
  transform: translateX(9vw);
}

.view.from-left {
  transform: translateX(-9vw);
}

.link-button,
.side-nav button {
  position: relative;
  padding: 7px 0;
  background: none;
}

.link-button::after,
.side-nav button::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms ease;
}

.link-button:hover::after,
.side-nav button:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.projects-rail {
  position: absolute;
  top: 17vh;
  left: clamp(24px, 5vw, 82px);
  width: clamp(150px, 15.5vw, 228px);
}

.rail-label {
  width: 100%;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 9px;
  text-align: left;
}

.project-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 88px;
  margin: 0 0 21px;
  padding: 15px 16px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  overflow: hidden;
  color: var(--muted);
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 8px 1px no-repeat,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 1px 8px no-repeat,
    linear-gradient(270deg, var(--line) 1px, transparent 1px) 100% 100% / 8px 1px no-repeat,
    linear-gradient(0deg, var(--line) 1px, transparent 1px) 100% 100% / 1px 8px no-repeat,
    rgba(242, 244, 246, 0.28);
  backdrop-filter: blur(5px);
  box-shadow: 0 12px 28px rgba(81, 88, 96, 0.05);
  animation: card-float 5.2s ease-in-out infinite;
  transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.project-card:nth-of-type(2) {
  animation-delay: -2.1s;
  animation-duration: 5.85s;
}

.project-card:nth-of-type(3) {
  animation-delay: -4.4s;
  animation-duration: 4.75s;
}

.project-card:hover {
  color: var(--ink);
  background-color: rgba(247, 248, 249, 0.56);
  box-shadow: 0 16px 34px rgba(81, 88, 96, 0.11);
}

.project-card strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.project-card span {
  font-size: 8px;
}

.project-card.is-selected {
  animation: card-sway 420ms ease;
}

@keyframes card-float {
  0%,
  100% { transform: translate3d(0, 0, 0) rotate(-0.33deg); }
  50% { transform: translate3d(4px, -9px, 0) rotate(0.65deg); }
}

@keyframes card-sway {
  0% { transform: rotate(0); }
  35% { transform: rotate(-2deg) translateX(-3px); }
  70% { transform: rotate(1.5deg) translateX(2px); }
  100% { transform: rotate(0); }
}

.side-nav {
  position: absolute;
  right: clamp(28px, 5vw, 82px);
  /* Anchor the last item above the glow line; the larger menu grows upward. */
  bottom: calc(64vh - 71px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.side-nav .link-button {
  min-width: 112px;
  min-height: 38px;
  padding: 12px 15px;
  overflow: hidden;
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 7px 1px no-repeat,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 1px 7px no-repeat,
    linear-gradient(270deg, var(--line) 1px, transparent 1px) 100% 100% / 7px 1px no-repeat,
    linear-gradient(0deg, var(--line) 1px, transparent 1px) 100% 100% / 1px 7px no-repeat,
    rgba(242, 244, 246, 0.28);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 20px rgba(81, 88, 96, 0.045);
  animation: card-float-link 5.2s ease-in-out infinite;
  transition: color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.side-nav .link-button:nth-child(2) {
  animation-delay: -1.35s;
  animation-duration: 5.85s;
}

.side-nav .link-button:nth-child(3) {
  animation-delay: -2.8s;
  animation-duration: 4.75s;
}

.side-nav .link-button:nth-child(4) {
  animation-delay: -4.15s;
  animation-duration: 5.45s;
}

.side-nav .link-button::after {
  right: 15px;
  bottom: 6px;
  left: 15px;
}

.side-nav .link-button:hover {
  color: var(--ink);
  background-color: rgba(247, 248, 249, 0.5);
  box-shadow: 0 11px 24px rgba(81, 88, 96, 0.09);
}

.side-nav .side-nav-cta {
  padding: 12px 15px;
  background:
    linear-gradient(90deg, rgba(69, 75, 82, 0.68) 1px, transparent 1px) 0 0 / 7px 1px no-repeat,
    linear-gradient(rgba(69, 75, 82, 0.68) 1px, transparent 1px) 0 0 / 1px 7px no-repeat,
    linear-gradient(270deg, rgba(69, 75, 82, 0.68) 1px, transparent 1px) 100% 100% / 7px 1px no-repeat,
    linear-gradient(0deg, rgba(69, 75, 82, 0.68) 1px, transparent 1px) 100% 100% / 1px 7px no-repeat,
    rgba(205, 209, 213, 0.38);
}

.side-nav .side-nav-cta::after {
  right: 15px;
  bottom: 6px;
  left: 15px;
}

.side-nav .side-nav-cta:hover {
  background-color: rgba(196, 201, 205, 0.48);
}

@keyframes card-float-link {
  0%,
  100% { transform: translate3d(0, 0, 0) rotate(-0.16deg); }
  50% { transform: translate3d(2px, -4.5px, 0) rotate(0.32deg); }
}

.portrait-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.identity-label {
  position: absolute;
  bottom: clamp(38px, 7vh, 72px);
  left: 50%;
  display: flex;
  min-width: 345px;
  padding: 14px 21px;
  align-items: center;
  justify-content: space-between;
  color: #555c63;
  font-size: 9px;
  background: rgba(238, 241, 243, 0.18);
  transform: translateX(-50%);
}

.identity-label::before,
.identity-label::after,
.identity-label i::before,
.identity-label i::after {
  position: absolute;
  width: 11px;
  height: 8px;
  content: "";
  border-color: var(--line);
}

.identity-label::before { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.identity-label::after { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.identity-label i:first-child::before { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.identity-label i:last-child::after { right: 0; bottom: 0; border-right: 1px solid; border-bottom: 1px solid; }

.status-readout {
  position: absolute;
  right: clamp(24px, 5vw, 82px);
  bottom: 76px;
  left: clamp(24px, 5vw, 82px);
  display: flex;
  justify-content: space-between;
  color: #91979e;
  font-size: 8px;
}

.view-contacts {
  display: grid;
  grid-template-columns: 49% 51%;
}

.order-modal .panel-kicker {
  color: #aeb5bb;
}

.order-modal h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 3.7vw, 56px);
  font-weight: 300;
  letter-spacing: 0.08em;
}

.order-intro {
  max-width: 62ch;
  margin: 0 0 28px;
  color: #bdc3c8;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-transform: none;
}

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.order-form .order-field {
  display: grid;
  gap: 8px;
  color: #aeb5bb;
  font-size: 8px;
}

.order-directions,
.order-description,
.order-consent {
  grid-column: 1 / -1;
}

.order-directions {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.order-directions legend {
  margin-bottom: 8px;
  color: #aeb5bb;
  font-size: 8px;
}

.order-direction-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-direction-options input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.order-direction-options label {
  display: flex;
  min-height: 31px;
  padding: 7px 11px;
  align-items: center;
  color: #aeb5bb;
  border: 1px solid rgba(232, 235, 237, 0.24);
  border-radius: 999px;
  background: rgba(232, 235, 237, 0.06);
  font-size: 8px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.order-direction-options input[type="radio"]:checked + label {
  color: #2b3035;
  border-color: #e8ebed;
  background: #e8ebed;
}

.order-direction-options input[type="radio"]:focus-visible + label {
  outline: 2px solid #e8ebed;
  outline-offset: 2px;
}

.order-form input[type="text"],
.order-form textarea {
  width: 100%;
  padding: 12px 13px;
  color: #f2f4f5;
  border: 1px solid rgba(232, 235, 237, 0.24);
  border-radius: 0;
  outline: none;
  background: rgba(232, 235, 237, 0.06);
  font: 11px/1.5 "IBM Plex Mono", ui-monospace, monospace;
  resize: vertical;
  transition: border-color 180ms ease, background 180ms ease;
}

.order-form input[type="text"]:focus,
.order-form textarea:focus {
  border-color: rgba(232, 235, 237, 0.72);
  background: rgba(232, 235, 237, 0.1);
}

.order-consent {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 9px;
  align-items: start;
}

.order-consent input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  border: 1.5px solid #c4cace;
  border-radius: 3px;
  background: rgba(18, 22, 26, 0.72);
  cursor: pointer;
}

.order-consent input[type="checkbox"]::before {
  width: 8px;
  height: 8px;
  content: "";
  background: #eef1f3;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform 120ms ease;
}

.order-consent input[type="checkbox"]:checked {
  background: rgba(28, 34, 40, 0.92);
  border-color: #eef1f3;
}

.order-consent input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.order-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid #e8ebed;
  outline-offset: 2px;
}

.order-consent label {
  display: block;
  color: #aeb5bb;
  font-size: 8px;
  line-height: 1.6;
}

.order-consent a {
  color: #e8ebed;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.order-submit {
  justify-self: start;
  min-height: 43px;
  padding: 11px 18px;
  color: #2b3035;
  background: #e8ebed;
}

.contact-panel {
  position: relative;
  z-index: 2;
  grid-column: 2;
  align-self: center;
  width: min(550px, 42vw);
  padding: 42px 0;
  color: #edf0f2;
}

.panel-kicker {
  margin-bottom: 25px;
  color: #838a91;
  font-size: 8px;
}

.contact-panel .panel-kicker,
.contact-list span {
  color: #c4cbd0;
}

.contact-panel h1 {
  margin: 0 0 42px;
  color: #f5f7f8;
  font-size: clamp(32px, 4.4vw, 68px);
  font-weight: 300;
  letter-spacing: 0.12em;
}

.contact-list {
  border-top: 1px solid rgba(237, 240, 242, 0.3);
}

.contact-list a {
  position: relative;
  display: grid;
  padding: 18px 4px;
  grid-template-columns: 28% 1fr auto;
  align-items: center;
  color: #edf0f2;
  border-bottom: 1px solid rgba(237, 240, 242, 0.3);
}

.contact-list a::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  background: #edf0f2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms ease;
}

.contact-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-list span {
  font-size: 8px;
}

.contact-list strong {
  font-size: 10px;
  font-weight: 400;
}

.contact-list em {
  font-style: normal;
}

.back-link {
  position: relative;
  z-index: 2;
  margin-top: 38px;
  padding: 10px 18px 10px 0;
  color: var(--ink);
  background: transparent;
}

.contact-panel .contacts-back {
  position: relative;
  z-index: 2;
  margin-top: 30px;
  min-height: 44px;
  padding: 10px 18px 10px 0;
  pointer-events: auto;
  color: #edf0f2;
  background: transparent;
}

.debug-readout {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  max-width: calc(100vw - 24px);
  padding: 8px 10px;
  pointer-events: none;
  color: #f4f6f7;
  background: rgba(10, 12, 14, 0.82);
  font: 10px/1.55 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: pre;
}

.debug-readout[hidden] {
  display: none;
}

.focus-marker {
  position: fixed;
  z-index: 2147483646;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.focus-marker::before,
.focus-marker::after {
  position: absolute;
  content: "";
  background: #ff4f78;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.85);
}

.focus-marker::before {
  top: 8px;
  left: 0;
  width: 18px;
  height: 2px;
}

.focus-marker::after {
  top: 0;
  left: 8px;
  width: 2px;
  height: 18px;
}

.focus-marker[hidden] {
  display: none;
}

.view-projects {
  display: flex;
  padding: clamp(18px, 3vh, 32px) clamp(24px, 5vw, 82px)
    clamp(14px, 2vh, 24px);
  align-items: stretch;
}

.view-about {
  display: grid;
  padding: clamp(24px, 5vw, 82px);
  padding-bottom: clamp(18px, 2.5vh, 28px);
  grid-template-columns: minmax(36%, 1fr) minmax(0, 680px);
  align-items: stretch;
}

#view-contacts > * {
  position: relative;
  z-index: 1;
}

#view-contacts > .contact-panel {
  z-index: 2;
}

.about-copy {
  position: relative;
  z-index: 1;
  grid-column: 2;
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  color: #edf0f2;
}

.about-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 12%,
    #000 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 12%,
    #000 86%,
    transparent 100%
  );
}

.about-scroll::-webkit-scrollbar {
  display: none;
}

.about-scroll-content {
  padding: clamp(28px, 5vh, 52px) clamp(10px, 2vw, 30px)
    clamp(52px, 9vh, 96px);
}

.about-copy .panel-kicker {
  color: #b8bec3;
}

.about-copy h1 {
  margin: 0 0 clamp(18px, 3vh, 32px);
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 300;
  letter-spacing: 0.1em;
}

.about-copy > .back-link {
  position: relative;
  z-index: 200;
  align-self: end;
  width: max-content;
  min-height: 44px;
  margin: 4px 0 0 clamp(10px, 2vw, 30px);
  color: #edf0f2;
}

.view-about.is-active .about-copy > .back-link {
  pointer-events: auto;
}

.projects-wall {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.projects-header {
  display: flex;
  padding: 0 8px;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.projects-header .panel-kicker {
  margin-bottom: clamp(8px, 1.4vh, 14px);
}

.projects-header h1 {
  margin: 0;
  font-size: clamp(28px, 3.25vw, 50px);
  font-weight: 300;
  letter-spacing: 0.1em;
}

.about-points {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(237, 240, 242, 0.78);
  font-size: clamp(9px, 0.76vw, 11px);
  line-height: 1.75;
  letter-spacing: 0.08em;
  text-transform: none;
}

.about-points li {
  position: relative;
  padding: 0 0 0 28px;
}

.about-points li + li {
  margin-top: clamp(42px, 7vh, 78px);
}

.about-points li::before {
  position: absolute;
  top: 0;
  left: 3px;
  color: #edf0f2;
  content: "—";
}

@media (min-width: 821px) {
  .about-points {
    line-height: 1.5;
  }

  .about-points li + li {
    margin-top: clamp(14px, 2.3vh, 26px);
  }

  /* Enlarge the right-side page-link buttons by 20% (desktop only; the
     language switch is a separate element and stays untouched). Origin is the
     bottom-right corner so the block grows inward, never past the screen edge. */
  .side-nav {
    transform: scale(1.2);
    transform-origin: bottom right;
  }
}

.projects-grid {
  display: grid;
  min-height: 0;
  padding: clamp(24px, 4vh, 42px) 8px clamp(32px, 5vh, 54px);
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(clamp(112px, 19vh, 240px), auto);
  align-content: start;
  gap: clamp(24px, 3.2vh, 34px) clamp(18px, 2vw, 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 10%,
    #000 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 10%,
    #000 88%,
    transparent 100%
  );
}

.projects-grid::-webkit-scrollbar {
  display: none;
}

.projects-grid .project-card {
  width: 100%;
  min-width: 0;
  min-height: 98px;
  margin: 0;
  animation: card-float-wall 4.333s ease-in-out infinite;
}

.projects-grid .project-card:nth-child(3n + 2) {
  animation-delay: -1.75s;
  animation-duration: 4.875s;
}

.projects-grid .project-card:nth-child(3n) {
  animation-delay: -3.667s;
  animation-duration: 3.958s;
}

.projects-grid .project-card.is-selected {
  animation: card-sway 420ms ease;
}

body.perf-idle .project-card,
body.perf-idle .link-button,
body.perf-idle .project-card.is-selected,
body.perf-idle .projects-grid .project-card {
  animation-play-state: paused;
}

.projects-grid .project-card strong {
  font-size: clamp(12px, 1.1vw, 15px);
}

.projects-grid .project-card span {
  font-size: 8px;
}

.projects-wall > .back-link {
  position: relative;
  z-index: 200;
  align-self: flex-start;
  min-height: 44px;
  margin: 6px 0 0 8px;
}

.view-projects.is-active .projects-wall > .back-link {
  pointer-events: auto;
}

@keyframes card-float-wall {
  0%,
  100% { transform: translate3d(0, 0, 0) rotate(-0.396deg); }
  50% { transform: translate3d(4.8px, -10.8px, 0) rotate(0.78deg); }
}

.lang-switch {
  position: fixed;
  z-index: 15;
  left: clamp(24px, 5vw, 82px);
  bottom: 30px;
  display: none;
  min-width: 96px;
  height: 34px;
  padding: 3px 7px;
  align-items: center;
  justify-content: space-between;
  color: #858c93;
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 7px 1px no-repeat,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 1px 7px no-repeat,
    linear-gradient(270deg, var(--line) 1px, transparent 1px) 100% 100% / 7px 1px no-repeat,
    linear-gradient(0deg, var(--line) 1px, transparent 1px) 100% 100% / 1px 7px no-repeat,
    rgba(242, 244, 246, 0.28);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 20px rgba(81, 88, 96, 0.045);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8px;
  pointer-events: auto;
}

body.view-home:not(.modal-open) .lang-switch {
  display: flex;
}

.legal-links {
  position: fixed;
  z-index: 15;
  right: clamp(24px, 5vw, 82px);
  bottom: 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  color: #91979e;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8px;
  line-height: 1.3;
}

body.view-home:not(.modal-open) .legal-links {
  display: flex;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: #aeb4ba;
  text-decoration: underline;
}

.lang-switch button {
  min-width: 31px;
  min-height: 26px;
  padding: 0 4px;
  color: inherit;
  background: transparent;
  transition: color 180ms ease, background 180ms ease;
}

.lang-switch button.is-active {
  color: var(--ink);
  background: rgba(247, 248, 249, 0.64);
}

.modal-shell {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 320ms, opacity 300ms ease;
}

.modal-shell.is-open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(192, 198, 204, 0.32);
  backdrop-filter: blur(7px);
  transition: backdrop-filter 240ms ease, background 240ms ease;
}

.project-modal {
  position: relative;
  width: min(780px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  padding: 0;
  overflow: auto;
  background: rgba(235, 238, 240, 0.9);
  border: 1px solid rgba(128, 136, 144, 0.56);
  box-shadow: 0 28px 90px rgba(73, 82, 91, 0.18);
  opacity: 0;
  transform: scale(0.9) translateY(12px);
  transition: opacity 300ms ease, transform 320ms var(--ease);
}

.modal-inner {
  position: relative;
  padding: clamp(25px, 4vw, 52px);
}

.modal-inner::before,
.modal-inner::after {
  position: absolute;
  width: 28px;
  height: 28px;
  content: "";
}

.modal-inner::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.modal-inner::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.is-open .project-modal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.order-modal-shell .modal-backdrop {
  background: rgba(122, 130, 138, 0.25);
  backdrop-filter: blur(0);
}

.order-modal-shell.is-open .modal-backdrop {
  backdrop-filter: blur(8px);
}

.order-modal {
  width: min(680px, calc(100vw - 44px));
  color: #e8ebed;
  border-color: rgba(232, 235, 237, 0.28);
  background: rgba(43, 48, 53, 0.96);
  box-shadow: 0 24px 70px rgba(47, 54, 61, 0.28);
}

.order-modal .modal-inner::before {
  border-color: #e8ebed;
}

.order-modal .modal-inner::after {
  border-color: #e8ebed;
}

.order-modal-close {
  color: #e8ebed;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 21px;
  right: 22px;
  padding: 8px;
  background: transparent;
}

.project-modal header > span {
  color: #7e858c;
  font-size: 8px;
}

.project-modal h2 {
  margin: 13px 0 32px;
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 300;
}

.modal-grid {
  display: grid;
  margin-bottom: 30px;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.modal-grid h3 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  font-weight: 500;
}

.modal-grid ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: #666d74;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: none;
}

.modal-grid li {
  margin-bottom: 8px;
  padding-left: 14px;
}

.modal-grid li::before {
  margin-left: -14px;
  margin-right: 8px;
  content: "—";
}

.gallery-strip {
  display: flex;
  padding: 0 0 8px;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(93, 116, 132, 0.48) transparent;
  scroll-snap-type: x mandatory;
}

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

.gallery-slot {
  position: relative;
  min-width: min(72%, 420px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  color: #7c838a;
  border: 1px solid rgba(128, 136, 144, 0.45);
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 0 / 1px 12px no-repeat,
    linear-gradient(270deg, var(--ink), var(--ink)) 100% 100% / 12px 1px no-repeat,
    linear-gradient(0deg, var(--ink), var(--ink)) 100% 100% / 1px 12px no-repeat,
    linear-gradient(135deg, transparent 49.85%, rgba(112, 120, 128, 0.13) 50%, transparent 50.15%),
    linear-gradient(45deg, transparent 49.85%, rgba(112, 120, 128, 0.13) 50%, transparent 50.15%),
    rgba(210, 215, 219, 0.42);
  scroll-snap-align: start;
}

.gallery-slot--shot {
  min-width: min(46%, 200px);
  padding: 0;
  aspect-ratio: 1080 / 2342;
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.gallery-slot::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: rgba(48, 111, 154, 0.2);
  content: "";
  mix-blend-mode: color;
}

.gallery-slot > span {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 9px;
  font-size: 8px;
}

.gallery-slot img,
.gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.lightbox {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(8, 12, 16, 0.92);
  opacity: 0;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox-image {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  place-items: center;
}

.lightbox-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(238, 241, 244, 0.9);
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  place-items: center;
}

.lightbox-nav:hover {
  color: #fff;
}

.lightbox-prev {
  left: max(8px, env(safe-area-inset-left));
}

.lightbox-next {
  right: max(8px, env(safe-area-inset-right));
}

.modal-close:hover,
.lightbox-close:hover {
  color: var(--muted);
}

.modal-close:focus-visible,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 820px) {
  :root {
    --room-position-x: 52%;
    --room-position-y: 100%;
    --room-about-position-x: 52%;
    --room-about-position-y: 100%;
    --room-projects-position-x: 52%;
    --room-projects-position-y: 100%;
    --room-contacts-position-x: 42%;
    --room-contacts-position-y: 100%;
  }

  body {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .projects-rail {
    top: auto;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 0;
    display: flex;
    width: 100%;
    padding: 5px 14px;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .projects-rail::-webkit-scrollbar {
    display: none;
  }

  .rail-label {
    width: 116px;
    min-width: 116px;
    min-height: 72px;
    margin: 0;
    padding: 10px 11px;
    scroll-snap-align: start;
    background: rgba(242, 244, 246, 0.28);
  }

  .project-card {
    width: clamp(142px, 42vw, 184px);
    min-width: clamp(142px, 42vw, 184px);
    min-height: 72px;
    margin: 0;
    padding: 10px 11px;
    scroll-snap-align: start;
  }

  .project-card > span:last-child {
    display: none;
  }

  .side-nav {
    top: calc(max(6px, env(safe-area-inset-top)) + 48px);
    right: 12px;
    bottom: auto;
    flex-direction: row;
    gap: 5px;
  }

  .side-nav .link-button {
    display: inline-grid;
    min-width: 66px;
    min-height: 40px;
    padding: 5px 8px;
    place-items: center;
  }

  .side-nav .side-nav-cta {
    max-width: 150px;
    padding: 5px 8px;
  }

  .identity-label {
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 140px);
    width: min(88vw, 345px);
    min-width: 0;
    padding: 11px 13px;
    font-size: clamp(7px, 2vw, 8px);
  }

  .status-readout {
    display: none;
  }

  .view-contacts {
    grid-template: minmax(34vh, 42%) minmax(0, 1fr) / 1fr;
    padding: max(12px, env(safe-area-inset-top)) 16px
      max(12px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .order-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    overscroll-behavior: contain;
  }

  .order-modal .modal-inner {
    padding: clamp(24px, 6vw, 38px) clamp(18px, 5vw, 34px);
  }

  .contact-panel {
    grid-row: 2;
    grid-column: 1;
    align-self: start;
    width: min(100%, 600px);
    margin: 0 auto;
    padding: 10px 0 24px;
  }

  .panel-kicker {
    margin-bottom: clamp(12px, 2.5vh, 20px);
  }

  .contact-panel h1 {
    margin-bottom: clamp(16px, 3vh, 28px);
    font-size: clamp(27px, 8vw, 48px);
  }

  .contact-list a {
    min-height: 48px;
    padding: 12px 4px;
  }

  .back-link {
    min-height: 44px;
    margin-top: 18px;
  }

  .view-contacts > .contacts-back {
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 16px;
  }

  .view-projects {
    padding: max(70px, env(safe-area-inset-top)) 16px
      calc(max(16px, env(safe-area-inset-bottom)) + 54px);
    overflow: hidden;
  }

  .view-about {
    padding: 0 16px max(12px, env(safe-area-inset-bottom));
    grid-template: minmax(34vh, 40%) minmax(0, 1fr) / 1fr;
  }

  .room-scrim {
    background: linear-gradient(
      180deg,
      transparent 0%,
      transparent 31%,
      rgba(20, 24, 28, 0.5) 52%,
      rgba(20, 24, 28, 0.64) 100%
    );
  }

  .about-copy {
    grid-row: 2;
    grid-column: 1;
    width: min(100%, 600px);
    min-height: 0;
    margin: 0 auto;
  }

  .about-scroll-content {
    padding: 10vh 8px 22vh;
  }

  .about-copy h1 {
    margin-bottom: clamp(42px, 7vh, 72px);
    font-size: clamp(30px, 9vw, 48px);
  }

  .about-copy > .back-link {
    margin-left: 8px;
  }

  .projects-wall {
    width: min(100%, 600px);
    margin: 0 auto;
  }

  .about-points {
    font-size: 9px;
  }

  .projects-grid {
    padding: clamp(28px, 5vh, 44px) 6px clamp(38px, 7vh, 62px);
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(82px, auto);
    gap: clamp(18px, 3vh, 26px) 14px;
  }

  .projects-grid .project-card {
    width: 100%;
    min-width: 0;
    min-height: 82px;
    margin: 0;
    padding: 11px 10px;
  }

  .projects-grid .project-card > span:last-child {
    display: inline;
  }

  .lang-switch {
    left: 14px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .legal-links {
    right: 14px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .project-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    overscroll-behavior: contain;
  }

  .project-modal .modal-inner {
    padding: clamp(24px, 6vw, 38px) clamp(18px, 5vw, 34px);
  }

  .modal-close {
    top: 12px;
    right: 12px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-slot {
    min-width: min(86%, 420px);
  }

  .gallery-slot--shot {
    min-width: min(58%, 170px);
  }
}

@media (max-width: 520px) {
  .side-nav {
    right: 8px;
    left: 8px;
    justify-content: flex-end;
    font-size: 8px;
  }

  .side-nav .link-button {
    min-width: 0;
    padding-inline: 5px;
  }

  .side-nav .side-nav-cta {
    max-width: 116px;
  }

  .identity-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .contact-list a {
    grid-template-columns: 29% minmax(0, 1fr) auto;
    gap: 7px;
  }

  .contact-list strong {
    overflow-wrap: anywhere;
  }

  .order-form {
    grid-template-columns: 1fr;
  }

  .order-directions,
  .order-description,
  .order-consent {
    grid-column: 1;
  }
}

@media (max-width: 820px) and (orientation: landscape) {
  .side-nav {
    top: max(52px, calc(env(safe-area-inset-top) + 44px));
  }

  .projects-rail {
    justify-content: center;
  }

  .project-card {
    width: min(25vw, 175px);
    min-width: 132px;
    min-height: 60px;
  }

  .identity-label {
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 122px);
  }

  .view-contacts {
    grid-template: 1fr / 42% 58%;
    overflow: hidden;
  }

  body.view-contacts .room-scrim {
    background: linear-gradient(
      90deg,
      transparent 0%,
      transparent 36%,
      rgba(20, 24, 28, 0.5) 62%,
      rgba(20, 24, 28, 0.6) 100%
    );
  }

  .order-modal {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .order-modal .modal-inner {
    padding: 18px 22px;
  }

  .order-modal h1 {
    margin-bottom: 12px;
    font-size: clamp(24px, 4.5vw, 38px);
  }

  .order-intro {
    margin-bottom: 14px;
  }

  .order-form {
    gap: 10px;
  }

  .legal-links {
    right: 14px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .contact-panel {
    grid-row: 1;
    grid-column: 2;
    align-self: center;
    max-height: calc(100dvh - 24px);
    padding: 12px 14px;
    overflow-y: auto;
  }

  .contact-panel h1 {
    margin-bottom: 14px;
    font-size: clamp(26px, 5vw, 42px);
  }

  .contact-list a {
    min-height: 42px;
    padding: 8px 4px;
  }

  .back-link {
    margin-top: 10px;
  }
}

@media (max-height: 700px) {
  .projects-rail { top: 14vh; }
  .project-card { min-height: 68px; margin-bottom: 12px; }
  .identity-label { bottom: 26px; }
}

@media (max-width: 820px) and (max-height: 700px) {
  .projects-rail {
    top: auto;
  }

  .project-card {
    min-height: 60px;
    margin: 0;
  }

  .identity-label {
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 122px);
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  body::before {
    background-image: url("../assets/room-bg-mobile.webp");
    background-position: center bottom;
    background-size: cover;
  }

  .side-nav {
    top: calc(max(10px, env(safe-area-inset-top)) + 28px);
    right: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr));
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    font-size: clamp(9px, 2.7vw, 10.5px);
    line-height: 1.25;
  }

  .side-nav .link-button,
  .side-nav .side-nav-cta {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 44px;
    padding: 5px 3px;
    overflow: visible;
    white-space: normal;
  }

  .side-nav .link-button,
  .projects-rail .project-card {
    background-color: rgba(242, 244, 246, 0.364);
  }

  .side-nav .side-nav-cta {
    background-color: rgba(205, 209, 213, 0.494);
  }

  .side-nav .link-button:hover {
    background-color: rgba(247, 248, 249, 0.65);
  }

  .side-nav .side-nav-cta:hover {
    background-color: rgba(196, 201, 205, 0.624);
  }

  .projects-rail .project-card:hover {
    background-color: rgba(247, 248, 249, 0.728);
  }

  .side-nav .link-button::after {
    right: 4px;
    left: 4px;
  }

  .projects-rail {
    top: auto;
    right: 0;
    bottom: calc(
      max(10px, env(safe-area-inset-bottom)) + clamp(8px, 6vh, 48px)
    );
    left: 0;
    display: grid;
    width: 100%;
    padding: 5px 10px 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    overflow: clip;
    overscroll-behavior-x: auto;
    scroll-snap-type: none;
  }

  .projects-rail .rail-label {
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 0 1px 2px;
    grid-column: 1 / -1;
    scroll-snap-align: none;
    background: transparent;
    font-size: 10.1px;
  }

  .projects-rail .project-card {
    width: 100%;
    min-width: 0;
    min-height: 68px;
    padding: 9px 7px;
    scroll-snap-align: none;
  }

  .projects-rail .project-card strong {
    font-size: clamp(12px, 3.75vw, 15px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .projects-rail .project-card span {
    font-size: clamp(9px, 2.7vw, 10.5px);
    line-height: 1.25;
  }

  .identity-label {
    bottom: calc(
      max(10px, env(safe-area-inset-bottom)) + clamp(152px, 24vh, 192px)
    );
    width: calc(100% - 20px);
    min-width: 0;
    padding: 10px 12px;
    font-size: clamp(7.2px, 2.28vw, 9.6px);
  }

  .identity-label span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .lang-switch {
    left: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: 34px;
    font-size: 12px;
  }

  .legal-links {
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .card-index {
    font-size: 12px;
  }

  .view-projects {
    padding: max(68px, env(safe-area-inset-top)) 12px
      calc(max(12px, env(safe-area-inset-bottom)) + 52px);
  }

  .projects-wall {
    width: 100%;
  }

  .projects-grid {
    width: 100%;
    padding: clamp(24px, 4vh, 36px) 10px clamp(34px, 6vh, 52px);
    gap: clamp(16px, 2.5vh, 22px);
  }

  .projects-grid .project-card {
    border: 1px solid rgba(118, 126, 134, 0.34);
    background-color: rgba(249, 250, 251, 0.62);
    box-shadow: 0 12px 28px rgba(70, 78, 86, 0.09);
  }

  .modal-shell {
    padding: 10px;
  }

  .project-modal,
  .order-modal {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    font-size: 15px;
  }

  .project-modal .modal-inner,
  .order-modal .modal-inner {
    padding: 24px 16px 20px;
  }

  .project-modal h2 {
    padding-right: 42px;
  }

  #modal-index {
    font-size: 12px;
  }

  .project-modal h3,
  .project-modal li {
    font-size: 13.5px;
  }

  .order-intro {
    font-size: 15px;
  }

  .order-form .order-field,
  .order-directions legend,
  .order-direction-options label,
  .order-consent label {
    font-size: 12px;
  }

  .order-form input[type="text"],
  .order-form textarea {
    font-size: 16.5px;
  }

  .order-submit {
    font-size: 15px;
  }

  .modal-grid {
    min-width: 0;
  }

  .gallery-strip {
    max-width: 100%;
    overflow-x: auto;
  }

  .gallery-slot {
    min-width: min(88%, 420px);
  }

  .gallery-slot--shot {
    min-width: min(58%, 170px);
  }

  .view-contacts {
    display: block;
    padding: 20dvh 14px max(12px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  body.view-contacts .room-scrim {
    background: linear-gradient(
      180deg,
      transparent 0%,
      transparent 30%,
      rgba(20, 24, 28, 0.48) 48%,
      rgba(20, 24, 28, 0.66) 100%
    );
  }

  .view-contacts::-webkit-scrollbar {
    display: none;
  }

  .contact-panel {
    display: flex;
    width: 100%;
    min-height: 64dvh;
    margin: 0;
    padding: 0;
    flex-direction: column;
    overflow: visible;
  }

  .contact-panel h1 {
    font-size: clamp(27px, 10vw, 42px);
  }

  .panel-kicker {
    font-size: 12px;
  }

  .contact-list a > span {
    font-size: 12px;
  }

  .contact-list a > strong {
    font-size: 15px;
  }

  .view-contacts .contacts-back {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 0;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 20px;
    font-size: 15px;
  }

  .view-about {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  body.view-about .room-scrim {
    background: linear-gradient(
      180deg,
      transparent 0%,
      transparent 32%,
      rgba(20, 24, 28, 0.55) 50%,
      rgba(20, 24, 28, 0.72) 100%
    );
  }

  .about-copy {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    flex-direction: column;
  }

  .about-scroll {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    background: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .about-scroll::-webkit-scrollbar {
    display: none;
  }

  .about-scroll-content {
    padding: 31dvh 18px max(72px, 12vh);
  }

  .about-copy h1 {
    margin-bottom: clamp(30px, 6vh, 54px);
    font-size: clamp(28px, 10vw, 42px);
  }

  .about-points {
    font-size: 13.5px;
    line-height: 1.75;
  }

  .about-points li {
    padding-left: 22px;
    overflow-wrap: anywhere;
  }

  .about-points li + li {
    margin-top: clamp(17px, 3vh, 29px);
  }

  .about-copy > .back-link {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: auto 18px 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .side-nav .link-button {
    animation: none;
  }

  .lightbox {
    transition: none;
  }
}

/* Fine-pointer targeting cursor */
.site-cursor {
  --cursor-scale: 1;
  --cursor-rotation: 0deg;
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  contain: strict;
}

.site-cursor.is-enabled {
  display: block;
}

.site-cursor.is-visible {
  opacity: 1;
}

@media (pointer: fine) and (hover: hover) {
  html.custom-cursor-active,
  html.custom-cursor-active * {
    cursor: none !important;
  }
}

.cursor-core,
.cursor-pulse,
.cursor-reticle,
.cursor-trail__ghost {
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
}

.cursor-core {
  width: 5px;
  height: 5px;
  border: 1px solid rgba(42, 48, 54, 0.92);
  background: rgba(235, 242, 246, 0.8);
  box-shadow:
    -1px 0 2px rgba(237, 72, 113, 0.32),
    1px 0 2px rgba(62, 205, 220, 0.34);
}

.cursor-reticle {
  width: 44px;
  height: 44px;
}

.cursor-rotor {
  position: absolute;
  inset: 0;
  transform: rotate(var(--cursor-rotation)) scale(var(--cursor-scale));
  transition: transform 180ms cubic-bezier(0.22, 0.8, 0.24, 1);
  will-change: transform;
}

.cursor-frame {
  position: absolute;
  inset: 0;
}

.cursor-frame i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: currentColor;
  border-style: solid;
  border-width: 0;
}

.cursor-frame i:nth-child(1) {
  top: 0;
  left: 0;
  border-top-width: 1px;
  border-left-width: 1px;
}

.cursor-frame i:nth-child(2) {
  top: 0;
  right: 0;
  border-top-width: 1px;
  border-right-width: 1px;
}

.cursor-frame i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.cursor-frame i:nth-child(4) {
  bottom: 0;
  left: 0;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.cursor-frame--main {
  color: rgba(61, 68, 75, 0.78);
  filter: drop-shadow(0 0 3px rgba(136, 205, 220, 0.2));
}

.cursor-frame--red,
.cursor-frame--cyan {
  opacity: 0.18;
  filter: blur(0.2px);
}

.cursor-frame--red {
  color: #ff6689;
  transform: translate3d(-1px, 0, 0);
}

.cursor-frame--cyan {
  color: #4ee5ed;
  transform: translate3d(1px, 0, 0);
}

.site-cursor.is-hovering {
  --cursor-scale: 0.84;
}

.site-cursor.is-hovering .cursor-frame--red,
.site-cursor.is-hovering .cursor-frame--cyan {
  opacity: 0.72;
}

.site-cursor.is-hovering .cursor-frame--red {
  transform: translate3d(-3px, -1px, 0);
}

.site-cursor.is-hovering .cursor-frame--cyan {
  transform: translate3d(3px, 1px, 0);
}

.site-cursor.is-hovering .cursor-frame--main {
  color: rgba(39, 47, 54, 0.92);
  filter:
    drop-shadow(-2px 0 5px rgba(255, 74, 121, 0.48))
    drop-shadow(2px 0 5px rgba(64, 226, 239, 0.52));
}

@media (pointer: fine) and (hover: hover) {
  .site-cursor.is-hovering .cursor-core {
    animation: cursor-jitter 192ms steps(1, end) infinite;
    box-shadow:
      -4px 0 8px rgba(255, 68, 116, 0.72),
      4px 0 8px rgba(55, 225, 239, 0.76),
      0 0 6px rgba(242, 248, 250, 0.86);
  }
}

@keyframes cursor-jitter {
  0% { translate: -1px 1px; }
  20% { translate: 2px -1px; }
  40% { translate: -2px 0; }
  60% { translate: 1px 2px; }
  80% { translate: 0 -2px; }
  100% { translate: 1px 0; }
}

.cursor-trail__ghost {
  width: 18px;
  height: 18px;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(93, 107, 117, 0.24) 5px, transparent 5px) 0 0 / 100% 1px no-repeat,
    linear-gradient(rgba(93, 107, 117, 0.24) 5px, transparent 5px) 0 0 / 1px 100% no-repeat,
    linear-gradient(270deg, rgba(78, 197, 213, 0.18) 5px, transparent 5px) 100% 100% / 100% 1px no-repeat,
    linear-gradient(0deg, rgba(224, 91, 139, 0.14) 5px, transparent 5px) 100% 100% / 1px 100% no-repeat;
  transition: opacity 180ms ease;
}

.site-cursor.is-moving .cursor-trail__ghost:nth-child(1) { opacity: 0.28; }
.site-cursor.is-moving .cursor-trail__ghost:nth-child(2) { opacity: 0.18; }
.site-cursor.is-moving .cursor-trail__ghost:nth-child(3) { opacity: 0.1; }

.cursor-pulse {
  width: 12px;
  height: 12px;
  opacity: 0;
  border: 1px solid rgba(74, 124, 139, 0.42);
}

.cursor-pulse.is-active {
  animation: cursor-pulse 360ms ease-out;
}

@keyframes cursor-pulse {
  0% {
    opacity: 0.65;
    transform: translate3d(var(--pulse-x), var(--pulse-y), 0) scale(0.35) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--pulse-x), var(--pulse-y), 0) scale(2.4) rotate(45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-trail {
    display: none;
  }

  .site-cursor.is-hovering .cursor-core {
    animation: none;
  }

  .cursor-rotor {
    transition-duration: 0ms;
  }
}
