/*
  ======================================================
  FELOO PORTFOLIO — styles.css
  ======================================================
*/

/* ===================== TOKENS ====================== */
:root {
  --bg:     #1500E1;
  --bg2:    #1200c8;
  --text:   #ffffff;
  --muted:  rgba(255,255,255,0.55);
  --accent: #ffffff;
  --border: rgba(255,255,255,0.15);
  --nav-h:  56px;
}

/* Solid blue base — Three.js canvas draws the grid on top */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
}
/* no CSS grid overlay — handled by Three.js for perspective distortion */

/* ===================== RESET ======================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.page-home { scroll-behavior: auto; }
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: transparent;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ===================== SCROLLBAR =================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.4); border-radius: 2px; }

/* ===================== NAVIGATION ================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2.5rem;
  background: rgba(21,0,225,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Logo top-left */
.nav-logo {
  color: var(--text);
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
  margin-right: auto;
}
.nav-logo img {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
}
.nav-logo:hover { opacity: 0.75; }

/* Nav links centre */
.nav-links {
  display: flex;
  gap: 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

/* Language switcher */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}
.lang-sep { color: var(--muted); }
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: inherit;
  letter-spacing: inherit;
  padding: 0.15rem 0.25rem;
  transition: color 0.2s;
  font-family: inherit;
}
.lang-btn:hover,
.lang-btn.active { color: var(--text); }

/* ===================== FIXED 3D CANVAS ================= */
#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  display: block;
  z-index: 0;
}

/* Tall invisible area — infinite scroll loop drives ring rotation */
.scroll-drive {
  height: 200vh;
  pointer-events: none;
}

/* Home: footer bleibt sichtbar, Scroll-Bereich endet darüber */
.page-home .site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(21, 0, 225, 0.55);
  border-top: none;
}

/* ===================== SECTIONS =================== */
.section {
  padding: 6rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: rgba(21,0,225,0.88);
}
.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 3rem;
}

/* ===================== WORKS GRID ================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3.25rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 1100px) {
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.75rem; }
}
@media (max-width: 560px) {
  .works-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
}

.work-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow: visible;
  min-width: 0;
}
.work-item-media {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(0, 0, 0, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.22);
}
.work-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1;
}
.work-item:hover .work-item-media img {
  transform: scale(1.03);
  opacity: 1;
}
.work-item-info {
  margin-top: 1rem;
  position: static;
  background: none;
  transform: none;
  opacity: 1;
  padding: 0;
  text-align: center;
}
.work-item:hover .work-item-info {
  transform: none;
}
.work-item-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.work-item-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* ===================== STUDIO ===================== */
.studio-inner {
  max-width: 640px;
}
.studio-text {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}
.studio-text p + p { margin-top: 1rem; }

/* ===================== CONTACT / MY WORLD ========= */
.page-main.contact-page {
  max-width: 1180px;
  margin: 0 auto;
  /* Same top rhythm as .project-shell; slightly tighter on the left */
  padding: calc(var(--nav-h) + 2.25rem) 2.5rem 4.5rem 1.5rem;
}
.contact-page .project-back {
  position: relative;
  z-index: 2;
  margin-bottom: 2.25rem;
}
.contact-world-title {
  margin: 0 0 2.5rem;
}
.contact-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem 2.25rem;
  align-items: center;
}
.contact-portrait {
  margin: 0;
  max-width: 520px;
  width: 100%;
}
.mspaint-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 345 / 413;
}
.mspaint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(0, 0, 0, 0.3),
    0 10px 28px rgba(0, 0, 0, 0.25);
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.mspaint.is-closing {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}
.mspaint-stage.is-closed .mspaint {
  visibility: hidden;
}
.mspaint-photo {
  position: absolute;
  /* transparent square canvas hole: 280×280 at (60,55) in 345×413 */
  left: 17.3913%;
  top: 13.3172%;
  width: 81.1594%;
  height: 67.7966%;
  object-fit: cover;
  object-position: center 82%;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.mspaint-draw {
  position: absolute;
  left: 17.3913%;
  top: 13.3172%;
  width: 81.1594%;
  height: 67.7966%;
  z-index: 1;
  pointer-events: none;
  touch-action: none;
}
.mspaint-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  z-index: 2;
  pointer-events: none;
}
.mspaint-hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  touch-action: none;
  cursor: crosshair;
}
.mspaint-hit[data-cursor="eraser"] { cursor: cell; }
.mspaint-hit[data-cursor="eyedropper"] { cursor: copy; }
.mspaint-hit[data-cursor="chrome"] { cursor: default; }
.mspaint-hit[data-cursor="close"] { cursor: pointer; }

/* Blue selection box — see-through so the tool icon stays readable */
.mspaint-tool-active {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 191, 0.85);
  background: rgba(192, 220, 243, 0.28);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset -1px -1px 0 rgba(0, 0, 191, 0.35);
}

/* Close (X) — red fill inside the template button face (12×12 square) */
.mspaint-close {
  position: absolute;
  left: calc(100% * 323 / 345);
  top: calc(100% * 7 / 413);
  width: calc(100% * 12 / 345);
  height: calc(100% * 12 / 413);
  z-index: 3;
  pointer-events: none;
  box-sizing: border-box;
  background: transparent;
}
.mspaint.is-close-hover .mspaint-close {
  background: #e81123;
  mix-blend-mode: multiply;
}

/* Current paint color — large FG well left of the palette swatches */
.mspaint-fg {
  position: absolute;
  left: calc(100% * 5 / 345);
  top: calc(100% * 349 / 413);
  width: calc(100% * 27 / 345);
  height: calc(100% * 27 / 413);
  z-index: 3;
  pointer-events: none;
  box-sizing: border-box;
  background: #000;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset -1px -1px 0 rgba(0, 0, 0, 0.35);
}

.mspaint-secret {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  padding: 1.5rem;
  animation: mspaint-secret-in 0.45s ease;
}
.mspaint-secret[hidden] {
  display: none !important;
}
@keyframes mspaint-secret-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.mspaint-reopen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  max-width: 18rem;
  transition: transform 0.15s ease;
}
.mspaint-reopen:hover,
.mspaint-reopen:focus-visible {
  transform: scale(1.05);
  outline: none;
}
.mspaint-reopen-logo {
  width: clamp(200px, 72%, 280px);
  height: auto;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.mspaint-reopen-label {
  font-size: 0.72rem;
  line-height: 1.25;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);
}
.contact-bio {
  color: rgba(255,255,255,0.88);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  max-width: 38rem;
}
.contact-bio strong {
  font-weight: 700;
  color: #fff;
}
.contact-bio p + p { margin-top: 1rem; }

.contact-skills {
  margin-top: 3.25rem;
}
.contact-skills h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.1rem;
}
.contact-skill-tags {
  margin-top: 0;
}

.contact-block {
  margin-top: 3.75rem;
  padding-bottom: 2rem;
}
.contact-block-title {
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1.25rem;
}
.contact-rows {
  list-style: none;
  border-top: 1px solid rgba(255,255,255,0.55);
}
.contact-rows li {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.55);
}
.contact-rows .contact-type {
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255,255,255,0.55);
  min-width: 0;
}
.contact-rows a {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  justify-self: end;
  text-align: right;
  transition: opacity 0.2s;
}
.contact-rows a:hover { opacity: 0.75; }

@media (max-width: 900px) {
  .page-main.contact-page {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .contact-intro {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: start;
  }
  .contact-portrait { max-width: 420px; }
}
@media (max-width: 560px) {
  .contact-rows li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .contact-rows a {
    justify-self: start;
    text-align: left;
  }
}

/* legacy contact list (unused) */
.contact-section { max-width: 700px; }
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-type {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 90px;
}
.contact-list a {
  color: var(--text);
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--accent); }

/* Tags (used on project page) */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ===================== FOOTER ===================== */
.site-footer {
  position: relative;
  z-index: 3;
  padding: 1.5rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: rgba(21,0,225,0.92);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-links { display: flex; gap: 0.75rem; align-items: center; }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ===================== INNER PAGES (works/studio/contact) == */
.page-main {
  min-height: calc(100svh - var(--nav-h));
  padding: 0 2.5rem 5rem;
}
.page-header {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 3rem;
}
.page-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-active {
  color: #fff !important;
}

/* ===================== PROJECT PAGE =============== */
.project-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2.25rem) 2.5rem 4.5rem;
}
.project-back {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2.25rem;
  transition: color 0.2s;
}
.project-back:hover { color: var(--text); }
.project-missing {
  font-size: 1.5rem;
  font-weight: 500;
}

.project-top {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 2.5rem 3rem;
  align-items: start;
}
.project-intro h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
}
/* World.Shutdown() only — keep title on one line */
.project-shell.is-world-shutdown .project-intro h1 {
  white-space: nowrap;
  letter-spacing: 0;
}
.project-shell.is-world-shutdown .project-intro h1 .title-parens {
  letter-spacing: 0.18em;
  margin-left: 0.04em;
  padding-right: 0.06em;
}
/* Vivienne — exactly two title lines (break after colon) */
.project-shell.is-vivienne .project-intro h1 {
  white-space: normal;
}
.project-shell.is-vivienne .project-intro h1 .title-line {
  white-space: nowrap;
}
.project-excerpt {
  color: rgba(255,255,255,0.72);
  margin-top: 0.85rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.35;
}
.project-software {
  margin-top: 2.4rem;
}
.project-software h2,
.project-description h2,
.project-video-section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.1rem;
  letter-spacing: 0.01em;
}
.project-meta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.project-meta .tag {
  border-color: rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.88);
  padding: 0.35rem 0.75rem;
  font-size: 0.68rem;
}

.project-media {
  width: 100%;
  background: transparent;
  color: #6a6a6a;
  overflow: visible;
  align-self: start;
  display: flex;
  justify-content: flex-end;
  box-shadow: none;
}
.project-media img,
.project-cover img {
  width: auto;
  height: auto;
  max-width: min(100%, 475px);
  max-height: min(50vh, 450px);
  display: block;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.project-media iframe,
.project-media video {
  width: 100%;
  height: auto;
  max-height: min(52vh, 480px);
  border: 0;
  display: block;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.project-media-placeholder {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  max-height: min(52vh, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  background: #d8d8d8;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.project-media-hint {
  font-size: 0.72rem;
  opacity: 0.7;
}

.project-description {
  margin-top: 3.5rem;
  width: 100%;
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  font-size: 1.02rem;
}
.project-description p + p { margin-top: 1.1rem; }

.project-video-section {
  margin-top: 3.5rem;
  width: 100%;
}
.project-video-section .project-video-frame + .project-video-frame {
  margin-top: 1.75rem;
}
.project-video-frame {
  width: 100%;
  background: transparent;
  color: #6a6a6a;
  overflow: visible;
  box-shadow: none;
}
.project-video-frame video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(70vh, 640px);
  display: block;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.project-video-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(70vh, 640px);
  display: block;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
}
.project-video-frame .project-media-placeholder {
  aspect-ratio: 16 / 9;
  max-height: min(70vh, 640px);
}

/* Project images — static row, or marquee when they don't fit */
.project-gallery {
  margin-top: 3rem;
  padding: 0.85rem 0;
}
.project-gallery.is-static {
  width: 100%;
  overflow: visible;
}
.project-gallery.is-static .project-gallery-track {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}
.project-gallery.is-scrollable {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.project-gallery.is-marquee {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  cursor: grab;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.project-gallery.is-marquee .project-gallery-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 1rem;
  will-change: transform;
}
.project-gallery.is-js-driven .project-gallery-track {
  animation: none;
}
.project-gallery-set {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.project-gallery-item {
  --media-unit: clamp(200px, 26vw, 300px);
  margin: 0;
  flex: 0 0 auto;
  width: fit-content;
  height: fit-content;
  background: transparent;
  overflow: visible;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  display: block;
  cursor: default;
  position: relative;
  z-index: 1;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: none;
}
.project-gallery-item.is-clickable {
  cursor: pointer;
}
.project-gallery-item:hover,
.project-gallery-item.is-clickable:focus-visible {
  transform: scale(1.055);
  z-index: 3;
}
.project-gallery-item.is-clickable:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.project-gallery-item img {
  width: auto;
  height: auto;
  max-width: var(--media-unit);
  max-height: var(--media-unit);
  display: block;
  object-fit: contain;
  pointer-events: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(0, 0, 0, 0.32),
    0 8px 22px rgba(0, 0, 0, 0.26);
}
.project-gallery-item.is-placeholder {
  width: var(--media-unit);
  height: var(--media-unit);
  background: #d8d8d8;
  color: #6a6a6a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(0, 0, 0, 0.32),
    0 8px 22px rgba(0, 0, 0, 0.26);
}

@media (prefers-reduced-motion: reduce) {
  .project-gallery.is-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* Lightbox */
.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 0, 80, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
}
.project-lightbox.is-open { display: flex; }
.project-lightbox-figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.project-lightbox-close,
.project-lightbox-nav {
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.project-lightbox-close:hover,
.project-lightbox-nav:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}
.project-lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  line-height: 1;
}
.project-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.4rem;
}
.project-lightbox-prev { left: 1.25rem; }
.project-lightbox-next { right: 1.25rem; }
.project-lightbox-count {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
}

.project-archive-row {
  margin-top: 3.25rem;
  display: flex;
  justify-content: flex-start;
}
.project-archive-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}
.project-archive-link:hover { color: #fff; }
.project-archive-link.is-disabled {
  color: rgba(255,255,255,0.28);
  cursor: default;
  pointer-events: none;
  user-select: none;
}
.project-archive-link.is-disabled:hover {
  color: rgba(255,255,255,0.28);
}
.project-credit {
  margin-top: 1.75rem;
  width: 100%;
  font-size: 0.72rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 900px) {
  .project-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .project-gallery-item {
    --media-unit: clamp(170px, 42vw, 260px);
  }
}
@media (max-width: 560px) {
  .project-shell { padding-left: 1.25rem; padding-right: 1.25rem; }
  .project-lightbox-nav { display: none; }
}

/* ===================== LEGAL PAGES ================ */
.legal-page {
  padding: 8rem 2.5rem 5rem;
  max-width: 640px;
}
.legal-crumb {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}
.legal-crumb a:hover { color: var(--text); }
.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  margin-bottom: 2rem;
}
.legal-note {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  margin-bottom: 2rem;
}
.legal-block { margin-top: 2rem; }
.legal-block h2 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.legal-block p { color: var(--muted); }
.legal-block p + p { margin-top: 0.75rem; }
.legal-block a { color: var(--accent); }
.legal-stand {
  margin-top: 3rem;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ===================== RESPONSIVE NAV ============= */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .site-nav { justify-content: space-between; }
  .nav-logo { margin-right: 0; }
}