/* Generated by npm run build. Edit src/styles/components/engineer-gallery.css. */
/* Hallmark · Comp Master · component: immersive engineer gallery · material: cast glass and an atelier floor.
   Critique: let portraits occupy the room; keep the name, skills and consultation readable in both themes.
   Owner-approved: edge-to-edge environment, one 3D entrance, bounded pointer parallax and soft floor reflections. */
:root {
  --gallery-glass-edge: color-mix(in srgb, var(--accent-cyan) 75%, var(--text-on-accent));
  --gallery-glass-rear: color-mix(in srgb, var(--accent-bright) 36%, var(--text-muted));
  --gallery-rim: color-mix(in srgb, var(--text-on-accent) 15%, transparent);
  --gallery-glass-tint: color-mix(in srgb, var(--ink) 18%, transparent);
  --gallery-halo: color-mix(in srgb, var(--accent-cyan) 21%, transparent);
  --gallery-etched: color-mix(in srgb, var(--text-on-accent) 50%, transparent);
  --gallery-smoke: color-mix(in srgb, var(--ink) 82%, transparent);
  --gallery-caption: color-mix(in srgb, var(--ink) 94%, transparent);
  --gallery-shadow: color-mix(in srgb, var(--ink) 75%, transparent);
  --gallery-cta-ink: var(--ink);
  --gallery-room-veil: color-mix(in srgb, var(--bg-deep) 32%, transparent);
  --gallery-room-opacity: 0.82;
  --gallery-caption-ink: var(--text-on-accent);
  --gallery-reflection-opacity: 0.23;
  --gallery-rear-reflection-opacity: 0.11;
  --gallery-reflection-blur: 2px;
  --gallery-reflection-fade: 42%;
  --gallery-depth-filter: brightness(0.5) blur(4px);
  --gallery-rear-visual-opacity: 1;
  --gallery-frame-shadow:
    inset 1px 0 1px var(--gallery-etched), 2px 2px 0 var(--gallery-shadow),
    3px 3px 0 color-mix(in srgb, var(--edge) 42%, transparent), 0 24px 40px -16px var(--gallery-shadow);
  --gallery-selection-shadow:
    inset 0 0 0 1px var(--gallery-glass-edge), 0 0 18px -4px var(--gallery-halo),
    0 14px 44px -10px var(--gallery-halo);
}

html[data-theme='light'] {
  --gallery-day-ink: #111827;
  --gallery-day-cyan: #007a92;
  --gallery-day-violet: #5b24d6;
  --gallery-studio-key: #ffffff;
  --gallery-studio-mid: #f3f4f6;
  --gallery-studio-edge: #e5e7eb;
  --gallery-studio-mask: #000000;
  --gallery-rear-tint: rgba(240, 240, 245, 0.7);
  --gallery-rear-rim: rgba(40, 49, 66, 0.16);
  --gallery-glass-light: rgba(255, 255, 255, 0.8);
  --gallery-hover-shadow: 0 36px 70px rgba(0, 0, 0, 0.14), inset 0 0 20px var(--gallery-glass-light);
  --gallery-cta-ink: var(--text-on-accent);
  --gallery-glass-edge: color-mix(in srgb, var(--gallery-day-cyan) 60%, transparent);
  --gallery-glass-rear: color-mix(in srgb, var(--text-muted) 36%, transparent);
  --gallery-rim: rgba(0, 0, 0, 0.08);
  --gallery-glass-tint: rgba(255, 255, 255, 0.74);
  --gallery-etched: var(--glass-highlight);
  --gallery-shadow: var(--shadow-ink);
  --gallery-halo: var(--shadow-ink);
  --gallery-caption: var(--bg-glass-light);
  --gallery-caption-ink: var(--gallery-day-ink);
  --gallery-room-veil: color-mix(in srgb, var(--bg-deep) 82%, transparent);
  --gallery-room-opacity: 0.12;
  --gallery-reflection-opacity: 0.085;
  --gallery-rear-reflection-opacity: 0.035;
  --gallery-reflection-blur: 4px;
  --gallery-reflection-fade: 28%;
  --gallery-depth-filter: brightness(0.78) saturate(0.86) blur(2.5px);
  --gallery-rear-visual-opacity: 0.96;
  --gallery-frame-shadow:
    inset 1px 1px 0 var(--gallery-glass-light), 2px 3px 0 var(--border-strong),
    0 12px 24px -12px var(--shadow-ink);
  --gallery-selection-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), inset 0 0 20px var(--gallery-glass-light);
}

/* Light the portrait volume like a studio set. The field is static and masked at
   the scene edges; it never recolors the page or the adjacent profile column. */
html[data-theme='light'] .engineer-gallery {
  --text-primary: var(--gallery-day-ink);
  --accent: var(--gallery-day-violet);
  --accent-bright: var(--gallery-day-violet);
  --accent-cyan: var(--gallery-day-cyan);
}

html[data-theme='light'] .engineer-gallery__scene::before {
  content: '';
  position: absolute;
  inset: -5% -6% -4%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 38%,
    var(--gallery-studio-key) 0% 12%,
    var(--gallery-studio-mid) 35%,
    var(--gallery-studio-edge) 68% 100%
  );
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, var(--gallery-studio-mask) 15% 75%, transparent),
    linear-gradient(to right, transparent, var(--gallery-studio-mask) 12% 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, var(--gallery-studio-mask) 15% 75%, transparent),
    linear-gradient(to right, transparent, var(--gallery-studio-mask) 12% 82%, transparent);
  mask-composite: intersect;
}

html[data-theme='light'] .engineer-gallery__slab[data-depth='1'] .engineer-gallery__glass {
  --gallery-glass-tint: var(--gallery-rear-tint);
  border-color: var(--gallery-rear-rim);
}

html[data-theme='light'] .engineer-gallery__visual::after {
  box-shadow: var(--gallery-hover-shadow);
}

html[data-theme='light'] .engineer-gallery__reflection {
  -webkit-mask-image: linear-gradient(to bottom, currentColor, transparent var(--gallery-reflection-fade));
}

.engineer-gallery {
  --gallery-gutter: clamp(var(--space-6), 4vw, 96px);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  overflow: clip;
  padding-block: clamp(var(--space-16), 7vw, 128px) clamp(var(--space-16), 6vw, 112px);
  color: var(--text-primary);
  scroll-margin-block-start: 80px;
}

/* The room spans the section, with enough overscan for 12px of pointer travel.
   Both axes fade to transparency, preserving the page's continuous background. */
.engineer-gallery__environment {
  position: absolute;
  inset: -20px;
  z-index: -1;
  pointer-events: none;
  opacity: var(--gallery-room-opacity);
  mask-image:
    linear-gradient(to bottom, transparent 2%, currentColor 28% 67%, transparent 96%),
    linear-gradient(to right, transparent, currentColor 10% 88%, transparent);
  mask-composite: intersect;
  background:
    linear-gradient(to right, transparent 6%, var(--gallery-room-veil) 55%, var(--bg-deep) 82%),
    linear-gradient(to top, var(--bg-deep), transparent 28%),
    url('img/gallery/atelier.webp') 30% 63% / cover no-repeat;
}

.engineer-gallery__inner {
  width: 100%;
  min-width: 0;
}

.engineer-gallery__heading {
  position: relative;
  z-index: 1;
  margin-inline: var(--gallery-gutter);
  margin-bottom: clamp(var(--space-6), 3vw, var(--space-12));
  max-width: 78rem;
}

.engineer-gallery__heading h2,
.engineer-gallery__name {
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.engineer-gallery__heading h2 {
  font-size: clamp(2.25rem, 5.2vw, 5.5rem);
  line-height: 1.05;
}

.engineer-gallery__heading p {
  margin: var(--space-4) 0 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.5;
}

.engineer-gallery__layout {
  display: grid;
  grid-template-areas: 'scene profile' 'rail rail';
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: stretch;
}

.engineer-gallery__scene {
  grid-area: scene;
  position: relative;
  min-width: 0;
  touch-action: pan-y pinch-zoom;
}

.engineer-gallery__stage {
  position: relative;
  min-height: clamp(620px, 48vw, 850px);
  perspective: 2000px;
  perspective-origin: 50% 43%;
  transform-style: preserve-3d;
  user-select: none;
  touch-action: pan-y pinch-zoom;
  /* Perspective's own plane cannot intercept the hit tests of receding panels. */
  pointer-events: none;
}

/* Camera motion never touches the transforms used for selection or entry.
   The 100px floor reserve holds a reflection beneath the front panel. */
.engineer-gallery__camera {
  position: absolute;
  inset: 0 0 100px;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  transform-style: preserve-3d;
  pointer-events: none;
}

.engineer-gallery__slab {
  --edge: var(--gallery-glass-rear);
  grid-area: 1 / 1;
  position: relative;
  justify-self: center;
  align-self: center;
  display: block;
  width: clamp(260px, 28vw, 460px);
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  transform: translateZ(0);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition-property: none;
  background: transparent;
  color: var(--text-on-accent);
  cursor: pointer;
  pointer-events: auto;
  font: inherit;
  text-align: left;
}

.engineer-gallery__slab.is-active {
  --edge: var(--gallery-glass-edge);
}

.engineer-gallery__slab.is-moving {
  will-change: transform, opacity;
}

.engineer-gallery__visual {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  transform: translateZ(0);
  transform-style: preserve-3d;
  pointer-events: none;
}
.engineer-gallery__slab[data-depth='1'] .engineer-gallery__visual {
  opacity: var(--gallery-rear-visual-opacity);
}

.engineer-gallery__glass {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid var(--gallery-rim);
  border-radius: inherit;
  background:
    linear-gradient(122deg, var(--gallery-etched) -30%, transparent 24%),
    linear-gradient(155deg, color-mix(in srgb, var(--edge) 6%, transparent), var(--gallery-glass-tint));
  backdrop-filter: blur(16px);
  box-shadow: var(--gallery-frame-shadow);
}

.engineer-gallery__photo {
  position: absolute;
  inset: 0;
  overflow: clip;
  border-radius: inherit;
}

.engineer-gallery__portrait,
.engineer-gallery__reflection-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: inherit;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Focus falls on the portrait, leaving the neighboring nameplates legible. */
.engineer-gallery__slab:not(.is-active) .engineer-gallery__portrait {
  filter: var(--gallery-depth-filter);
}

.engineer-gallery__glass::after,
.engineer-gallery__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

.engineer-gallery__glass::after {
  box-shadow: var(--gallery-selection-shadow);
  background:
    linear-gradient(123deg, color-mix(in srgb, var(--edge) 22%, transparent), transparent 17% 88%),
    linear-gradient(90deg, var(--gallery-rim), transparent 3% 99%, var(--gallery-etched));
}

.engineer-gallery__slab.is-active .engineer-gallery__glass::after {
  opacity: 1;
}

/* The brighter hover light is prepainted and faded, never a shadow tween. */
.engineer-gallery__visual::after {
  box-shadow:
    0 0 42px -8px var(--gallery-halo),
    inset 0 0 0 1px var(--gallery-glass-edge);
}

.engineer-gallery__plate {
  position: absolute;
  inset: auto 1px 1px;
  padding: var(--space-4) var(--space-5);
  overflow-wrap: anywhere;
  border-top: 1px solid var(--gallery-etched);
  border-radius: 0 0 11px 11px;
  color: var(--gallery-caption-ink);
  background: var(--gallery-caption);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.45vw, 1.375rem);
  font-weight: 600;
  line-height: 1.25;
}

/* Neighboring glass planes are intentionally behind the selected portrait.
   Present names in the profile/thumbnail controls instead of half-obscured plaques. */
.engineer-gallery__slab:not(.is-active) .engineer-gallery__plate {
  visibility: hidden;
}

/* Inert mirrored artwork uses the same cached portrait, not another network asset.
   The mask is outside the flip so the reflection vanishes toward the floor. */
.engineer-gallery__reflection {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  opacity: var(--gallery-reflection-opacity);
  filter: blur(var(--gallery-reflection-blur));
  mask-image: linear-gradient(to bottom, currentColor, transparent var(--gallery-reflection-fade));
  pointer-events: none;
}

.engineer-gallery__reflection-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: clip;
  border: 1px solid var(--edge);
  border-radius: inherit;
  transform: scaleY(-1);
  background: transparent;
}

.engineer-gallery__slab:not(.is-active) .engineer-gallery__reflection {
  opacity: var(--gallery-rear-reflection-opacity);
}

.engineer-gallery__profile {
  display: flex;
  grid-area: profile;
  position: relative;
  z-index: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8) var(--gallery-gutter) 100px var(--space-4);
  overflow-wrap: anywhere;
}

.engineer-gallery__name {
  max-width: 13ch;
  font-size: clamp(2.25rem, 3.8vw, 4.5rem);
  line-height: 1.05;
}

.engineer-gallery__role {
  margin: var(--space-4) 0 0;
  color: var(--accent-bright);
  font-weight: 600;
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.4;
}

.engineer-gallery__bio {
  max-width: 43ch;
  margin: var(--space-5) 0 0;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.55;
}

.engineer-gallery__skills {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
}

.engineer-gallery__skills li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  border-top: 1px solid var(--border-glass);
  padding-block: var(--space-3);
  color: var(--text-primary);
  font-size: 1.125rem;
  line-height: 1.4;
}

.engineer-gallery__skills li::before {
  content: '';
  width: 11px;
  height: 6px;
  margin-block-start: 0.37em;
  border: solid var(--accent-cyan);
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

.engineer-gallery__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.engineer-gallery__choose,
.engineer-gallery__dossier,
.engineer-gallery__arrow,
.engineer-gallery__status button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font: 600 1rem/1.3 var(--font-body);
  cursor: pointer;
}

.engineer-gallery__choose {
  position: relative;
  min-height: 56px;
  padding: var(--space-4) var(--space-6);
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  color: var(--gallery-cta-ink);
  box-shadow: inset 0 1px 0 var(--gallery-etched);
}

.engineer-gallery__choose-content {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
  pointer-events: none;
}

.engineer-gallery__choose::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 5px 30px -5px var(--gallery-halo),
    inset 0 0 0 1px var(--gallery-etched);
  opacity: 0;
  transition: opacity var(--motion-ui) var(--ease);
}

.engineer-gallery__actions svg,
.engineer-gallery__arrow svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.engineer-gallery__nav {
  display: grid;
  grid-area: rail;
  position: relative;
  z-index: 1;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-5);
  margin-inline: var(--gallery-gutter);
  margin-top: var(--space-2);
  padding-block: var(--space-4);
}

.engineer-gallery__arrow {
  width: 48px;
  min-height: 48px;
  padding: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
}

.engineer-gallery__thumbs {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: var(--space-2);
}

.engineer-gallery__thumb {
  position: relative;
  display: grid;
  flex: 0 0 clamp(52px, 4.5vw, 80px);
  aspect-ratio: 1;
  overflow: clip;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  cursor: pointer;
  scroll-snap-align: center;
}

.engineer-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 21%;
  opacity: 0.62;
  transition: opacity var(--motion-fast) var(--ease);
}

.engineer-gallery__thumb[aria-pressed='true'] {
  border-color: var(--accent-cyan);
  box-shadow:
    0 0 0 2px var(--bg-deep),
    0 0 0 4px var(--accent-cyan);
}

.engineer-gallery__thumb[aria-pressed='true'] img {
  opacity: 1;
}

.engineer-gallery__count {
  min-width: 3.5em;
  color: var(--text-secondary);
  font: 500 1rem/1 var(--font-body);
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.engineer-gallery__status {
  margin-inline: var(--gallery-gutter);
  padding: var(--space-8) 0;
  color: var(--text-secondary);
  font: 400 1rem/1.55 var(--font-body);
}

.engineer-gallery__status button {
  margin-top: var(--space-3);
}

.engineer-gallery__announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: clip;
  clip-path: inset(50%);
  white-space: nowrap;
}

.engineer-gallery :is(button, a):focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
}

.engineer-gallery__choose:is(:hover, :focus-visible):enabled::before {
  opacity: 1;
}

.engineer-gallery button:disabled {
  cursor: default;
  opacity: 0.45;
}

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

@media (prefers-reduced-motion: no-preference) {
  .engineer-gallery__visual {
    transition: transform 500ms var(--ease);
  }
  .engineer-gallery__slab:not([data-depth='2']) .engineer-gallery__portrait {
    transition: filter 620ms var(--ease);
  }
  .engineer-gallery__glass::after,
  .engineer-gallery__visual::after {
    transition: opacity 500ms var(--ease);
  }
  .engineer-gallery__arrow:active:enabled {
    transform: translateY(1px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .engineer-gallery__thumb:hover img {
    opacity: 1;
  }
  .engineer-gallery__dossier:hover:enabled {
    border-color: var(--text-secondary);
    background: var(--bg-glass);
  }
  .engineer-gallery :is(.engineer-gallery__arrow, .engineer-gallery__status button):hover:enabled {
    border-color: var(--accent-cyan);
    background: var(--surface-soft);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .engineer-gallery__slab.is-active:is(:hover, :focus-visible) .engineer-gallery__visual {
    transform: translate3d(0, -10px, 0);
  }
  .engineer-gallery__slab.is-active:is(:hover, :focus-visible) .engineer-gallery__visual::after {
    opacity: 1;
  }
}

@media (max-width: 1000px) {
  .engineer-gallery__profile {
    padding-inline-start: 0;
  }
  .engineer-gallery__name {
    font-size: 2.5rem;
  }
}

@media (max-width: 900px) {
  .engineer-gallery__environment {
    background-position: 32% center;
    mask-image: linear-gradient(to bottom, transparent 3%, currentColor 24% 44%, transparent 65%);
  }
  .engineer-gallery__layout {
    grid-template-areas: 'scene' 'rail' 'profile';
    grid-template-columns: minmax(0, 1fr);
  }
  .engineer-gallery__stage {
    min-height: clamp(400px, 87vw, 650px);
  }
  .engineer-gallery__camera {
    inset-block-end: 84px;
  }
  .engineer-gallery__slab {
    width: clamp(200px, 54vw, 340px);
  }
  .engineer-gallery__profile {
    padding: var(--space-8) var(--gallery-gutter) 0;
  }
  .engineer-gallery__name {
    max-width: none;
    font-size: clamp(2.25rem, 6vw, 3.5rem);
  }
  .engineer-gallery__nav {
    margin-top: 0;
  }
}

@media (max-width: 500px) {
  .engineer-gallery {
    --gallery-gutter: var(--space-6);
    padding-block: var(--space-16);
  }
  .engineer-gallery__heading h2 {
    font-size: clamp(2rem, 8.4vw, 2.6rem);
  }
  .engineer-gallery__slab {
    width: clamp(190px, 56vw, 250px);
  }
  .engineer-gallery__plate {
    padding: var(--space-3);
  }
  .engineer-gallery__nav {
    gap: var(--space-2);
  }
  .engineer-gallery__thumbs {
    gap: var(--space-3);
  }
  .engineer-gallery__thumb {
    flex-basis: 48px;
  }
  .engineer-gallery__count {
    min-width: auto;
    font-size: 0.875rem;
  }
  .engineer-gallery__arrow {
    width: 44px;
    min-height: 44px;
  }
  .engineer-gallery__actions > * {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .engineer-gallery__profile :is(h3, p, li) {
    transition-property: none;
    opacity: 1 !important;
    transform: none !important;
  }
  .engineer-gallery__visual,
  .engineer-gallery__glass::after,
  .engineer-gallery__visual::after,
  .engineer-gallery__thumb img,
  .engineer-gallery__choose::before {
    transition: none;
  }
}
