/* A visual portfolio: one project at a time, complete original images. */
.project-gallery {
  position:relative;
  isolation:isolate;
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 16px 42px #38261a0a;
}
.project-gallery:focus-visible {outline:3px solid var(--clay);outline-offset:6px}
.project-gallery:not(.is-ready) {display:flex;overflow-x:auto;scroll-snap-type:x mandatory}
.project-slide {
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr);
  flex:0 0 100%;
  width:100%;
  min-width:0;
  scroll-snap-align:start;
}
.project-gallery.is-ready {display:grid;touch-action:pan-y}
.project-gallery.is-ready .project-slide {
  grid-area:1 / 1;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateX(28px);
  transition:opacity .65s ease,transform .65s cubic-bezier(.22,.61,.36,1),visibility 0s linear .65s;
}
.project-gallery.is-ready .project-slide.is-active {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateX(var(--swipe-x,0px));
  transition-delay:0s;
  z-index:1;
}
.project-gallery.is-dragging .project-slide.is-active {transition:none}
.project-media {
  position:relative;
  display:grid;
  place-items:center;
  min-width:0;
  min-height:470px;
  padding:36px;
  overflow:hidden;
  background:#e6e8df;
  color:var(--ink);
  cursor:zoom-in;
  text-decoration:none;
  user-select:none;
  -webkit-user-select:none;
}
.project-media.project-media--book {background:transparent;padding:0}
.project-media--print {background:#dedbd5}
.project-object {
  display:block;
  width:100%;
  height:398px;
  object-fit:contain;
  transform-origin:center;
}
.project-media--book .project-object {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.website-preview {
  width:100%;
  border:1px solid #ffffffa6;
  border-radius:9px;
  overflow:hidden;
  box-shadow:0 18px 36px #29302524;
  background:white;
}
.preview-bar {display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;background:#f9f9f5;color:#5e625c;font-size:.8rem}
.preview-kind {font-size:.7rem;letter-spacing:.13em;font-weight:800}
.project-gallery .real-photo::after {display:none}
.project-gallery .project-slide.is-active .project-visual,
.project-gallery .project-slide.is-active .project-object {animation:project-reveal 6s ease-out both}
/* Keep the book scene flush with its panel throughout the slide transition. */
.project-gallery .project-slide.is-active .project-media--book .project-object {
  animation:none;
  transform:none;
}
@keyframes project-reveal {from{transform:translateY(7px) scale(.975)}to{transform:translateY(0) scale(1)}}
.project-gallery.is-paused .project-slide.is-active .project-visual,
.project-gallery.is-paused .project-slide.is-active .project-object {animation-play-state:paused}
.project-info {display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-width:0;padding:42px;background:#fff}
.project-category {color:var(--clay);font-size:1rem;font-weight:600;letter-spacing:0;text-transform:none;line-height:1.5}
.project-info h3 {margin:20px 0;font-size:clamp(1.75rem,2.6vw,2.25rem);line-height:1.15;letter-spacing:-.02em}
.project-info>p {margin:0;font-size:1rem;line-height:1.65;color:var(--muted)}
.project-info>p.project-caption {margin-top:17px;font-size:.875rem;line-height:1.6}
.project-links {display:flex;flex-wrap:wrap;gap:12px;margin-top:27px}
.project-main-link {display:inline-flex;align-items:center;justify-content:center;padding:12px 17px;border-radius:8px;background:var(--clay);color:#fff;font-size:.94rem;line-height:1.4;font-weight:750;text-decoration:none;transition:background .2s}
.project-main-link:hover,.project-main-link:focus-visible {background:var(--ink);color:#fff}
.project-status {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:20px;color:var(--muted);font-size:.875rem}
.project-status p {margin:0}
.project-count {font-weight:750;color:var(--ink)}
.gallery-mobile-help {display:none}
.project-timeline {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-top:20px}
.project-marker {min-width:0;color:var(--muted);font-size:.875rem;transition:color .3s}
.project-marker.is-current {color:var(--clay);font-weight:750}
.project-marker-track {display:block;height:3px;margin-bottom:10px;overflow:hidden;background:#d2c3b4;border-radius:4px}
.project-marker-track i {display:block;width:100%;height:100%;background:var(--clay);transform:scaleX(var(--progress,0));transform-origin:left}
.project-lightbox {
  width:min(1160px,94vw);
  max-width:94vw;
  max-height:94dvh;
  margin:auto;
  padding:0;
  border:1px solid #ffffff2e;
  border-radius:16px;
  color:#faf7f2;
  background:#25231f;
  box-shadow:0 30px 100px #0008;
}
.project-lightbox::backdrop {background:#171511d9;backdrop-filter:blur(7px)}
.lightbox-top {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 22px;border-bottom:1px solid #ffffff22}
.lightbox-top h3 {margin:0;font-size:1.1rem;line-height:1.4}
.lightbox-close {flex-shrink:0;border:1px solid #ffffff65;padding:9px 15px;border-radius:8px;background:transparent;color:#fff;font:inherit;font-size:.875rem;cursor:pointer}
.lightbox-close:hover,.lightbox-close:focus-visible {background:#faf7f2;color:#25231f}
.lightbox-image-wrap {display:grid;place-items:center;padding:20px}
.lightbox-image-wrap img {display:block;width:100%;height:min(65dvh,720px);object-fit:contain}
.lightbox-bottom {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:0 22px 20px;font-size:.875rem;line-height:1.5}
.lightbox-bottom p {margin:0;max-width:70%;color:#e4d9cd}
.lightbox-bottom a {color:#f7c9a9;text-underline-offset:4px;text-align:right;font-weight:750}
@media(max-width:960px) {
  .project-slide {grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
  .project-info {padding:30px}
  .project-media {padding:25px;min-height:440px}
  .project-object {height:370px}
}
@media(max-width:720px) {
  .project-slide {grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .project-gallery {border-radius:16px}
  .project-media {min-height:0;aspect-ratio:1.5;padding:22px}
  .project-object {position:absolute;inset:20px;width:calc(100% - 40px);height:calc(100% - 40px)}
  .project-media--book {aspect-ratio:1.5}
  .project-info {padding:28px}
  .project-info h3 {font-size:1.875rem;margin:13px 0 15px}
  .project-info>p {font-size:1rem}
  .project-links {margin-top:22px}
  .preview-bar {padding:7px 9px;font-size:.72rem}
  .preview-kind {font-size:.65rem}
  .project-status {align-items:flex-start;flex-direction:column;font-size:.875rem}
  .gallery-desktop-help {display:none}
  .gallery-mobile-help {display:inline}
  .project-timeline {gap:10px;margin-top:17px}
  .project-marker {font-size:.8rem}
  .lightbox-top {padding:13px 16px}
  .lightbox-top h3 {font-size:1rem}
  .lightbox-image-wrap {padding:12px}
  .lightbox-image-wrap img {height:58dvh}
  .lightbox-bottom {padding:0 16px 16px;align-items:flex-start;flex-direction:column}
  .lightbox-bottom p {max-width:100%}
}
@media(prefers-reduced-motion:reduce) {
  .project-gallery.is-ready .project-slide {transition:none;transform:none}
  .project-gallery .project-slide.is-active .project-visual,
  .project-gallery .project-slide.is-active .project-object {animation:none}
  .project-main-link {transition:none}
}
