*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { -webkit-user-drag: none; pointer-events: none; user-select: none; }
.plb-gallery img { pointer-events: auto; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  color: #ccc;
  font-family: 'Inter', system-ui, sans-serif;
  user-select: none;
}

/* ─────────────────────────────────────────────
   Boot intro
   ───────────────────────────────────────────── */
#intro-overlay {
  position: fixed; inset: 0;
  background: #0a0a0a;
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
}
#intro-overlay.intro-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#intro-canvas {
  width: clamp(220px, 46vw, 380px);
  height: clamp(220px, 46vw, 380px);
}

/* Global scrollbar theme: subtle grey pill, no white track */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(170,170,170,0.45) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

*::-webkit-scrollbar-thumb {
  background: rgba(170,170,170,0.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(180,180,180,0.62);
}

/* Header runs wordmark (left) — spinning mark (centre) — controls (right). */
#top-left-stack {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}

#site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px 6px 8px;
  background: rgba(10,10,10,0.92);
  border: 1px solid rgba(255,255,255,0.09);
}

#site-header-logo {
  display: block;
  width: 210px;
  max-width: 42vw;
  height: auto;
  opacity: 0.52;
  filter: invert(1);
}

#site-header-intro {
  max-width: 360px;
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.45;
  color: rgba(255,255,255,0.52);
  text-align: left;
}

/* Below this the wordmark plus its tagline reaches the centred mark, and the
   tagline also starts wrapping to a second line — which would push the header
   past the 56px strip the list scrolls under. Drop the tagline; it is the
   most expendable part of the header. Once it is gone the wordmark is only
   ~230px, which clears the mark all the way down to the 600px mobile
   breakpoint, so no further steps are needed. */
@media (max-width: 1150px) {
  #site-header-intro { display: none; }
}

/* ─────────────────────────────────────────────
   View switch — the node canvas is the default view; adding `list-view` to
   <body> crossfades it into the project index (see the index block below).
   ───────────────────────────────────────────── */

/* Top right: the view toggle, plus the "about" link that opens the bio in
   the project lightbox (the bio has no canvas node and no list row).
   Both share the node/name-banner chrome — square corners, 1px hairline
   border, near-opaque dark fill — rather than a pill shape. */
#top-bar {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 41;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.is-mobile #top-bar { display: none; }

#about-link {
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(10,10,10,0.92);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
#about-link:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.22);
}

/* Small segmented toggle. */
#view-toggle {
  position: relative;
  display: flex;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(10,10,10,0.92);
}
#view-toggle button {
  position: relative;
  z-index: 1;
  padding: 5px 16px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  cursor: pointer;
  transition: color 0.25s ease;
}
#view-toggle button.active { color: rgba(10,10,10,0.92); }
#view-toggle button:hover:not(.active) { color: rgba(255,255,255,0.75); }

/* Sliding indicator behind the labels — a plain rectangle, matching the
   node cards' square chrome. Both buttons are the same width (their labels
   are both 5 characters), so a flat 50% split is exact. */
#view-toggle-pill {
  position: absolute;
  top: 3px; bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: rgba(255,255,255,0.9);
  transition: transform 0.35s cubic-bezier(.65,0,.35,1);
}
#view-toggle.on-list #view-toggle-pill { transform: translateX(100%); }

/* ── Project index (desktop list view) ───────────────────────────────────────
   A left-bound index grouped by year; the selected project opens in the pane
   on the right (see js/list.js). Switching with the canvas is a crossfade:
   the list is always laid out and just faded/hidden, and the canvas does the
   reverse. `visibility` is delayed by the fade length on the way out so it
   hides only once the opacity has finished, and drops out of hit-testing and
   painting entirely afterwards. */
#desktop-list-view {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: #0a0a0a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
body.list-view #desktop-list-view {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}
#canvas-root { transition: opacity 0.35s ease, visibility 0s; }
body.list-view #canvas-root {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

/* The detail pane scrolls up through the top 56px; this masks the strip so
   it never shows above the site header and toggle (z 40/41). */
body.list-view::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #0a0a0a;
  z-index: 13;
  pointer-events: none;
}

/* ── Index: year headings over uppercase titles ─────────────────────────── */
.idx {
  overflow-y: auto;
  /* Clears the floating site header, which ends ~60px down. */
  padding: 92px 16px 64px 20px;
}
.idx-group + .idx-group { margin-top: 22px; }
.idx-year {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e6e6e6;
}
.idx-item {
  display: block;
  width: 100%;
  padding: 2px 0 2px 14px;
  /* Hanging indent: a wrapped title tucks in under its first line. */
  text-indent: -14px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.idx-item:hover { color: rgba(255,255,255,0.9); }
.idx-item.active { color: #fff; font-weight: 600; }

/* ── Detail pane ─────────────────────────────────────────────────────────── */
.idx-detail {
  overflow-y: auto;
  min-width: 0;
  padding: 72px 20px 72px 8px;
}
.idx-project { animation: idx-in 0.35s ease both; }
@keyframes idx-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.idx-title {
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}
.idx-content {
  color: rgba(255,255,255,0.56);
  font-size: 12.5px;
  line-height: 1.75;
}

/* The pane reuses the project lightbox's layout builder so a project reads
   the same wherever it opens. Undo the parts that only make sense in a modal:
   the 82vh cap and the two inner scrollers. Inline, content just flows and
   the pane itself scrolls. */
.idx-content .plb-split { padding: 16px 24px 34px; }
.idx-content .plb-col-images,
.idx-content .plb-col-text {
  max-height: none;
  display: block;
}
.idx-content .plb-left-panel,
.idx-content .plb-model-panel,
.idx-content .plb-right-panels {
  overflow: visible;
  direction: ltr;
  padding-left: 0;
  padding-right: 0;
}

/* About project: profile image at half size */
#desktop-list-view-content-about .plb-gallery img,
#mobile-view-content-about .plb-gallery img,
#project-lightbox[data-project="about"] .plb-gallery img {
  max-width: 50%;
  margin: 0 auto;
}

/* Corner brand mark — decorative only. pointer-events:none so it can never
   swallow a wheel gesture or click meant for the view underneath it. */
/* Centred via `left` arithmetic, NOT translateX(-50%): the spin animation
   below animates `transform`, and an animated transform replaces the
   element's own outright — the mark would sit half its width off-centre.
   The width is fixed, so subtracting half of it is exact. */
#logo-mark {
  position: fixed;
  top: 16px; left: calc(50% - 20px);
  width: 40px; height: 40px;
  z-index: 40;
  fill: rgba(255,255,255,0.55);
  pointer-events: none;
  animation: logo-mark-spin 10s linear infinite;
}
@keyframes logo-mark-spin {
  to { transform: rotate(360deg); }
}
body.is-mobile #logo-mark { display: none; }

/*
  NO will-change, NO translateZ, NO GPU promotion on the canvas.
  This lets the browser re-rasterize text at native resolution
  on every zoom level instead of upscaling a cached bitmap.
*/
#canvas-root {
  position: absolute;
  top: 0; left: 0;
  width: 8000px; height: 4000px;
  transform-origin: 0 0;
  cursor: grab;
}
#canvas-root.dragging { cursor: grabbing; }

/* Theme connection lines — see js/theme-lines.js. Sits between the
   dot-grid background and the node cards (DOM order), so lines pass
   visually under the cards they connect. */
#theme-line-overlay {
  opacity: 0;
  transition: opacity 200ms ease-out;
}
#theme-line-overlay.visible { opacity: 1; }
.theme-line {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-opacity: 0.45;
  stroke-linecap: round;
}
.theme-line-label {
  fill: rgba(255,255,255,0.72);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: #0a0a0a;
  stroke-width: 4px;
}

.node {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(10,10,10,0.92);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* Top bar — drag handle for individual node */
.node-bar {
  flex-shrink: 0;
  height: 20px;
  padding: 0 8px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: grab;
  user-select: none;
}
.node-bar:active { cursor: grabbing; }
.node-bar-label {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
  pointer-events: none;
}

/* Resize handle — bottom-right grip */
.node-resize {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.18);
  cursor: nwse-resize;
  z-index: 10;
  transition: background 0.15s;
}
.node-resize:hover { background: rgba(255,255,255,0.45); }

.node-image {
  cursor: pointer;
  transition: border-color 0.2s;
}
.node-image .node-content { overflow: visible; flex: 1; position: relative; }
.node-image:hover { border-color: rgba(255,255,255,0.22); }
.node-project { width: 230px; height: 190px; }
.image-stack { position: absolute; inset: 0; }
.image-stack img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}

/* Hover video preview — fades in over the hero image once frames are playing */
.image-stack .node-preview-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.image-stack .node-preview-video.is-playing { opacity: 1; }

/* Stack layers — ghost nodes behind the main card, offset down-right */
.node-stack-layer {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(10,10,10,0.92);
  overflow: hidden;
  pointer-events: none;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.node-stack-layer img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.node-stack-layer-1 { transform: translate(8px,  8px);  opacity: 0.55; z-index: -1; }
.node-stack-layer-2 { transform: translate(16px, 16px); opacity: 0.30; z-index: -2; }
.image-count {
  position: absolute; bottom: 6px; right: 8px; z-index: 2;
  font-size: 9px; color: rgba(255,255,255,0.35); letter-spacing: 0.05em;
}
.node-download-badge {
  position: absolute;
  top: -22px;
  right: -22px;
  z-index: 10;
  width: 64px;
  height: 64px;
  transform: rotate(18deg);
  pointer-events: none;
}
.node-download-badge img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
}

/* Project lightbox (tabbed project unfold) */
@keyframes plb-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes plb-inner-in {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes plb-img-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
#project-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.94); z-index: 110;
  align-items: center; justify-content: center;
}
#project-lightbox.open {
  display: flex;
  animation: plb-backdrop-in 0.22s ease both;
}
#project-lightbox.open #plb-inner {
  animation: plb-inner-in 0.28s cubic-bezier(0.22,1,0.36,1) both;
}
#project-lightbox.open .plb-gallery img {
  animation: plb-img-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
#plb-inner {
  max-width: 1300px; width: 96vw; max-height: 94vh; overflow-y: auto;
  padding: 28px 30px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(12,12,12,0.99);
  position: relative;
}
#plb-title {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}
#plb-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.plb-tab {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.42);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 10px;
  cursor: pointer;
}
.plb-tab.active {
  color: rgba(255,255,255,0.86);
  border-color: rgba(255,255,255,0.3);
}
#plb-body {
  color: rgba(255,255,255,0.56);
  font-size: 12px;
  line-height: 1.75;
}
.plb-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 20px;
}
.plb-col-images {
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.plb-col-images .plb-left-tabs {
  flex-shrink: 0;
}
/* The two columns scroll independently, and each puts its scrollbar on the
   lightbox's OUTER edge rather than both meeting in the middle: the text
   column scrolls ltr (bar on the right, its natural side), and the image
   column is flipped to rtl so its bar lands on the left. `direction` is
   inherited, so the panel's children are flipped back to ltr — otherwise the
   gallery grid would lay its columns out right-to-left too. */
.plb-col-images .plb-left-panel,
.plb-col-images .plb-model-panel {
  overflow-y: auto;
  flex: 1;
  direction: rtl;
  padding-left: 8px; /* gutter between the (now left-hand) scrollbar and content */
}
.plb-col-images .plb-left-panel > *,
.plb-col-images .plb-model-panel > * {
  direction: ltr;
}
.plb-left-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.plb-left-tab {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.plb-left-tab.active {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.35);
}
.plb-left-tab:hover { color: rgba(255,255,255,0.6); }
.plb-left-tab-pdf { cursor: pointer; }
.plb-tab-ext {
  width: 9px; height: 9px;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.6;
  flex-shrink: 0;
}
.plb-left-panel { width: 100%; }
.plb-model-panel {
  width: 100%;
  aspect-ratio: 1;
}
.plb-model-panel canvas { width: 100% !important; height: 100% !important; display: block; }
.plb-col-text {
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.plb-col-text .plb-left-tabs {
  flex-shrink: 0;
}
.plb-col-text .plb-right-panels {
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
  margin-bottom: 0;
}
.plb-col-text .plb-text-block,
.plb-col-text > .plb-detail-row,
.plb-col-text .plb-detail-row {
  flex-shrink: 0;
}
.plb-video-wrap {
  position: relative;
  margin-bottom: 10px;
}
.plb-video {
  width: 100%;
  display: block;
  cursor: pointer;
}
.plb-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}
.plb-video-play:hover {
  background: rgba(10, 10, 10, 0.82);
  border-color: rgba(255, 255, 255, 0.3);
}
.plb-video-play svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}
.plb-video-sound {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ccc;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.plb-video-sound:hover {
  background: rgba(10, 10, 10, 0.9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.plb-video-sound svg {
  width: 16px;
  height: 16px;
}
.plb-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.plb-gallery-single,
#project-lightbox[data-project="greyhound"] .plb-gallery,
#desktop-list-view-content-greyhound .plb-gallery {
  grid-template-columns: 1fr;
}
.plb-gallery-item {
  overflow: hidden;
}
.plb-gallery-item.img-landscape {
  aspect-ratio: 4 / 3;
}
.plb-gallery-item.img-portrait {
  aspect-ratio: 2 / 3;
}
.plb-gallery-item.img-full-row {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}
.plb-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
}
.plb-right-panels { margin-bottom: 20px; }
.plb-right-pane { }
.plb-text-block + .plb-text-block { margin-top: 18px; }
.plb-text-title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 7px;
}
.plb-text-body { white-space: pre-wrap; }
.plb-text-body + .plb-detail-row { margin-top: 32px; }
.plb-detail-row + .plb-detail-row { margin-top: 8px; }
.plb-detail-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.24);
  margin-bottom: 2px;
}
.plb-detail-value { color: rgba(255,255,255,0.58); }
.plb-link {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}
.plb-link:hover { color: rgba(255,255,255,0.8); }
@media (max-width: 860px) {
  .plb-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .plb-col-images,
  .plb-col-text {
    max-height: none;
    display: block;
    overflow: visible;
    padding-right: 0;
  }
  /* Stacked single column — no inner scrollers left to place a bar for. */
  .plb-col-images .plb-left-panel,
  .plb-col-images .plb-model-panel,
  .plb-col-text .plb-right-panels {
    overflow-y: visible;
    direction: ltr;
    padding-right: 0;
    padding-left: 0;
  }
}
#plb-close {
  position: sticky; top: 0; float: right;
  margin: -4px -6px 0 0;
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 20px; cursor: pointer; transition: color 0.15s; z-index: 111;
}
#plb-close:hover { color: rgba(255,255,255,0.9); }

/* Image lightbox */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.93); z-index: 120;
  align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 88vw; max-height: 88vh; object-fit: contain; display: block; }
#lb-prev, #lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 26px; cursor: pointer; padding: 20px; transition: color 0.15s;
}
#lb-prev:hover, #lb-next:hover { color: rgba(255,255,255,0.9); }
#lb-prev { left: 10px; } #lb-next { right: 10px; }
#lb-close {
  position: fixed; top: 16px; right: 20px;
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 20px; cursor: pointer; transition: color 0.15s;
}
#lb-close:hover { color: rgba(255,255,255,0.9); }
#lb-counter {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: rgba(255,255,255,0.25); letter-spacing: 0.1em;
}

/* ─────────────────────────────────────────────
   Mobile (#mobile-view, see js/list.js): a big wordmark with a menu button.
   The menu is a full-screen year-grouped index; a chosen project replaces the
   page below the wordmark.

   The .is-mobile class is set once at load rather than by a media query, so
   an orientation change can't flip the layout mid-session.
   ───────────────────────────────────────────── */
#mobile-view { display: none; }

body.is-mobile { overflow: auto; }
body.is-mobile #canvas-root,
body.is-mobile #desktop-list-view,
body.is-mobile #project-lightbox,
body.is-mobile #top-left-stack { display: none !important; }

body.is-mobile #mobile-view {
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  background: #0a0a0a;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 64px;
}
body.is-mobile #mobile-view.menu-open { overflow: hidden; }
/* The menu's z-index only counts inside #mobile-view's own stacking context,
   so it can't rise above the (body-level) footer — hide the footer instead. */
#mobile-view.menu-open ~ #site-footer { display: none; }

.m-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 0;
}
.m-mark {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: clamp(36px, 11.5vw, 52px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-align: left;
  text-transform: uppercase;
  color: #ececec;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Three bars that cross into an ×. */
.m-burger {
  position: relative;
  flex-shrink: 0;
  width: 44px; height: 44px;
  margin: -4px -10px 0 0;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-burger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: #ddd;
  transition: top 0.25s ease, transform 0.25s ease, opacity 0.2s ease;
}
.m-burger span:nth-child(1) { top: 14px; }
.m-burger span:nth-child(2) { top: 21px; }
.m-burger span:nth-child(3) { top: 28px; }
.m-burger.is-close span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.m-burger.is-close span:nth-child(2) { opacity: 0; }
.m-burger.is-close span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.m-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 60;
  overflow-y: auto;
  background: #0a0a0a;
}
.m-menu[hidden] { display: none; }
.m-menu .idx { padding: 28px 20px 64px; overflow: visible; }
.m-menu .idx-year { margin-bottom: 6px; font-size: 18px; }
.m-menu .idx-item {
  padding: 3px 0 3px 18px;
  text-indent: -18px;
  font-size: 18px;
  line-height: 1.3;
  color: rgba(255,255,255,0.82);
}
.m-menu .idx-item.active { color: #fff; font-weight: 600; }
.m-menu .idx-group + .idx-group { margin-top: 26px; }
.m-menu .idx-extras .idx-item { text-transform: none; }

.m-main { padding: 28px 20px 0; }

.m-home-link {
  display: block;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 20px;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
  color: #ddd;
  cursor: pointer;
}
.m-home-intro {
  margin-top: 56px;
  font-size: 20px;
  line-height: 1.4;
  color: #e6e6e6;
}

#mobile-view .idx-title { padding: 0; font-size: 20px; margin-bottom: 14px; }
#mobile-view .idx-content { font-size: 14px; }
#mobile-view .idx-content .plb-split { padding: 0 0 34px; }

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
#site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 20px;
  pointer-events: none;
  z-index: 50;
}
#site-footer * { pointer-events: auto; }
.footer-socials {
  display: flex; gap: 14px; align-items: center;
}
.footer-socials a {
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.22); text-decoration: none;
  transition: color 0.15s;
}
.footer-socials a:hover { color: rgba(255,255,255,0.6); }
.footer-copy {
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.18);
}
.footer-impressum {
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.18);
  background: none; border: none;
  cursor: pointer; font-family: inherit;
  transition: color 0.15s; padding: 0;
}
.footer-impressum:hover { color: rgba(255,255,255,0.55); }

/* ─────────────────────────────────────────────
   Impressum lightbox
   ───────────────────────────────────────────── */
#impressum-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.93); z-index: 200;
  align-items: center; justify-content: center;
}
#impressum-lightbox.open { display: flex; }
#imp-inner {
  max-width: 520px; width: 90vw; max-height: 80vh; overflow-y: auto;
  padding: 36px 40px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(12,12,12,0.99);
  font-size: 12px; line-height: 1.85;
  color: rgba(255,255,255,0.42);
  white-space: pre-wrap;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#imp-title {
  font-size: 10px; font-weight: 500;
  color: rgba(255,255,255,0.3); letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 18px;
}
#imp-close {
  position: fixed; top: 16px; right: 20px;
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 20px; cursor: pointer; transition: color 0.15s; z-index: 201;
}
#imp-close:hover { color: rgba(255,255,255,0.9); }
