@import url("/fonts/source-han-serif-sc/fonts.css");

:root {
  color-scheme: dark;
  --ink: #f3efe7;
  --muted: rgba(243, 239, 231, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --warm: #ef7357;
  --cool: #58d8ff;
  font-family: "Source Han Serif SC", serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
  background: var(--site-surface, #fff);
  color: var(--site-ink, #292825);
}

body.experience-gallery-page {
  width: 100%;
  max-width: var(--site-shell-width, 112rem);
  min-width: 320px;
  min-height: 100vh;
  margin: 0 auto;
  padding-inline: var(--site-shell-gutter, clamp(1.5rem, 4vw, 4rem));
  overflow-x: clip;
  background: var(--site-surface, #fff);
  color: var(--site-ink, #292825);
}

.experience-gallery {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(24px, 5vw, 72px);
  background:
    radial-gradient(circle at 16% 14%, rgba(239, 115, 87, 0.13), transparent 28%),
    radial-gradient(circle at 87% 82%, rgba(88, 216, 255, 0.1), transparent 30%),
    linear-gradient(135deg, #111116, #090d12 58%, #08090c);
}

.gallery-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.gallery-header,
.experience-list,
.gallery-footer { position: relative; z-index: 1; }

.gallery-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: end;
  gap: 40px;
  max-width: 1320px;
  margin: 0 auto clamp(38px, 6vw, 76px);
}

.back-link {
  position: absolute;
  top: 0;
  left: 0;
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: .08em;
}

.back-link:hover { color: white; }

.gallery-kicker {
  grid-column: 1 / -1;
  margin-top: 54px;
  color: #f6c593;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
}

.gallery-header h1 {
  margin: 0;
  font-family: "Source Han Serif SC", serif;
  font-size: clamp(58px, 9vw, 130px);
  font-weight: 500;
  line-height: .78;
  letter-spacing: -.075em;
}

.gallery-header h1 span { color: var(--warm); }

.gallery-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: clamp(15px, 1.45vw, 20px);
  line-height: 1.8;
}

.experience-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 34px);
  max-width: 1320px;
  margin: calc(var(--apple-card-scale-offset, 7.56px) * -1) auto 0;
}

.experience-card {
  --apple-card-scale-offset: 7.56px;
  --apple-card-scale-percent: 1.0161290323;
  position: relative;
  display: grid;
  grid-template-rows: minmax(270px, 44vh) auto;
  min-height: 610px;
  margin-block-start: var(--apple-card-scale-offset);
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: inherit;
  text-decoration: none;
  transform: scale(1);
  transform-origin: center;
  transition:
    transform 300ms cubic-bezier(0, 0, 0.5, 1);
  will-change: transform;
}

.experience-card:hover {
  transform: scale(var(--apple-card-scale-percent));
}

.card-visual {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.nanocage-visual {
  background:
    radial-gradient(circle at 54% 48%, rgba(239,115,87,.28), transparent 14%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 38%),
    #141217;
}

.cage-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  border: 3px solid rgba(225,226,226,.8);
  border-radius: 35%;
  box-shadow: inset 0 0 24px rgba(255,255,255,.08), 0 0 24px rgba(255,255,255,.06);
}

.ring-a { transform: translate(-50%,-50%) rotate(18deg) skew(12deg); }
.ring-b { transform: translate(-50%,-50%) rotate(78deg) skew(-12deg); }
.ring-c { transform: translate(-50%,-50%) rotate(138deg) scale(.78); }

.guest-particle {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffb393, #e85f48 48%, #8e261d);
  box-shadow: 0 0 58px rgba(239,115,87,.58);
  transform: translate(-50%,-50%);
}

.cladding-visual {
  background:
    linear-gradient(rgba(88,216,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,216,255,.08) 1px, transparent 1px),
    radial-gradient(circle at 58% 65%, rgba(255,116,50,.2), transparent 18%),
    #09141c;
  background-size: 38px 38px, 38px 38px, auto, auto;
}

.robot-base,
.robot-joint,
.robot-arm,
.laser-head,
.workpiece { position: absolute; }

.robot-base {
  left: 66%;
  bottom: 18%;
  width: 94px;
  height: 68px;
  border-radius: 50% 50% 18px 18px;
  background: linear-gradient(120deg, #df7434, #8e3418);
}

.robot-arm {
  width: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8f3518, #e16c2c 48%, #9f3d1c);
  transform-origin: 50% 100%;
}

.arm-one { left: 69%; bottom: 30%; height: 145px; transform: rotate(-34deg); }
.arm-two { left: 54%; bottom: 55%; height: 130px; transform: rotate(63deg); }

.robot-joint {
  width: 52px;
  height: 52px;
  border: 10px solid #c25825;
  border-radius: 50%;
  background: #172027;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}

.joint-one { left: 55%; bottom: 54%; }
.joint-two { left: 42%; bottom: 43%; }

.laser-head {
  left: 44%;
  bottom: 26%;
  width: 24px;
  height: 100px;
  border-radius: 7px 7px 14px 14px;
  background: linear-gradient(90deg, #778891, #e0e7e9 50%, #65747b);
}

.laser-beam {
  position: absolute;
  left: calc(44% + 10px);
  bottom: 16%;
  width: 4px;
  height: 70px;
  background: #ff6a35;
  box-shadow: 0 0 18px #ff5d28, 0 0 38px rgba(255,93,40,.65);
}

.workpiece {
  left: 18%;
  right: 22%;
  bottom: 14%;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(90deg, #58473d, #9b7b65, #4c3c34);
  box-shadow: 0 14px 0 #263139;
}

.card-index {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  color: rgba(255,255,255,.38);
  font-family: "Source Han Serif SC", serif;
  font-size: 42px;
}

.card-copy { padding: clamp(24px, 3vw, 40px); }
.card-copy > span { color: #f6c593; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.cladding-card .card-copy > span { color: var(--cool); }
.three-body-card .card-copy > span { color: #c6a9ff; }
.solar-system-card .card-copy > span { color: #ffd36b; }
.card-copy h2 { margin: 12px 0 13px; font-size: clamp(25px, 2.5vw, 38px); line-height: 1.12; letter-spacing: -.045em; }
.card-copy p { min-height: 3.4em; margin: 0; color: var(--muted); line-height: 1.72; }
.card-copy strong { display: inline-block; margin-top: 24px; font-size: 12px; letter-spacing: .08em; }

.gallery-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1320px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: rgba(255,255,255,.4);
  font-size: 11px;
  letter-spacing: .08em;
}

.gallery-footer p { margin: 0; }

.three-body-visual {
  background:
    radial-gradient(circle at 20% 24%, rgba(255,255,255,.8) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 18%, rgba(255,255,255,.56) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 72%, rgba(255,255,255,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 68%, rgba(255,255,255,.46) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 48%, rgba(75, 89, 168, .2), transparent 34%),
    #03050c;
}

.gravity-orbit,
.gravity-star {
  position: absolute;
  top: 50%;
  left: 50%;
}

.gravity-orbit {
  width: 76%;
  height: 36%;
  border: 1px solid rgba(158, 177, 255, .3);
  border-radius: 50%;
  box-shadow: inset 0 0 26px rgba(96, 111, 220, .05), 0 0 18px rgba(96, 111, 220, .06);
}

.orbit-one { transform: translate(-50%, -50%) rotate(17deg); }
.orbit-two { transform: translate(-50%, -50%) rotate(137deg); }
.orbit-three { transform: translate(-50%, -50%) rotate(77deg) scale(.78); }

.gravity-star {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.star-amber {
  background: radial-gradient(circle at 35% 30%, #fff6bd, #ffc548 42%, #a43b13 78%);
  box-shadow: 0 0 26px rgba(255, 197, 72, .95), 0 0 72px rgba(255, 128, 35, .52);
  transform: translate(-145%, -90%);
}

.star-cyan {
  width: 46px;
  height: 46px;
  background: radial-gradient(circle at 35% 30%, #effeff, #62cfe3 45%, #07506b 82%);
  box-shadow: 0 0 24px rgba(98, 207, 227, .9), 0 0 58px rgba(53, 188, 210, .48);
  transform: translate(74%, -10%);
}

.star-violet {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 35% 30%, #f3ecff, #a78cff 45%, #3f287f 82%);
  box-shadow: 0 0 22px rgba(167, 140, 255, .9), 0 0 52px rgba(130, 102, 232, .48);
  transform: translate(-10%, 86%);
}

.solar-system-visual {
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.8) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.6) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 76%, rgba(255,255,255,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 82%, rgba(255,255,255,.48) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 50%, rgba(20, 62, 132, .28), transparent 42%),
    #020611;
}

.solar-sun,
.solar-orbit,
.solar-belt {
  position: absolute;
  top: 50%;
  left: 50%;
}

.solar-sun {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6bd, #ffd354 40%, #dc6c1d 72%, #7f250d);
  box-shadow: 0 0 30px rgba(255, 211, 84, .96), 0 0 88px rgba(255, 112, 28, .55);
  transform: translate(-50%, -50%);
}

.solar-orbit {
  border: 1px solid rgba(126, 220, 255, .27);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
}

.solar-orbit-one { width: 45%; height: 35%; }
.solar-orbit-two { width: 68%; height: 52%; transform: translate(-50%, -50%) rotate(8deg); }
.solar-orbit-three { width: 89%; height: 67%; transform: translate(-50%, -50%) rotate(-5deg); }

.solar-planet {
  position: absolute;
  top: 50%;
  right: -8px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.planet-earth {
  width: 17px;
  height: 17px;
  background: radial-gradient(circle at 30% 28%, #b6edff, #287ac9 48%, #0b285c 78%);
  box-shadow: 0 0 13px rgba(83, 181, 255, .75);
}

.planet-jupiter {
  width: 29px;
  height: 29px;
  background: repeating-linear-gradient(0deg, #8d5b3c 0 3px, #d7b28a 3px 7px, #f1d3ae 7px 10px);
  box-shadow: 0 0 16px rgba(222, 176, 127, .45);
}

.planet-saturn {
  width: 24px;
  height: 24px;
  background: #d9c48e;
  box-shadow: 0 0 14px rgba(224, 199, 137, .42);
}

.planet-saturn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 11px;
  border: 3px solid rgba(229, 210, 158, .78);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-13deg);
}

.solar-belt {
  width: 58%;
  height: 44%;
  border: 4px dotted rgba(180, 198, 218, .22);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(2deg);
}

@media (max-width: 1100px) {
  .experience-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .experience-gallery { padding: 22px 16px 34px; }
  .gallery-header { display: block; margin-bottom: 34px; }
  .gallery-kicker { padding-top: 46px; }
  .gallery-header h1 { margin: 18px 0 26px; font-size: clamp(62px, 22vw, 96px); }
  .experience-list { grid-template-columns: 1fr; }
  .experience-card { min-height: 560px; grid-template-rows: 300px auto; }
  .gallery-footer { display: block; line-height: 1.7; }
  .gallery-footer p { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* Editorial shell shared with the main site. The bespoke diagrams remain
   contained card artwork rather than becoming page backgrounds. */
.experience-gallery-page {
  background: var(--experience-surface);
  color: var(--experience-ink);
}

.experience-gallery {
  width: 100%;
  min-height: 100svh;
  margin: var(--site-page-top-space) 0 0;
  padding: 1.25rem 0 3rem;
  background: var(--experience-surface);
}

.gallery-grid {
  display: none;
}

.gallery-header,
.experience-list,
.gallery-footer {
  width: 100%;
  max-width: 104rem;
}

.gallery-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  align-items: end;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.gallery-kicker {
  grid-column: 1 / -1;
  margin-top: 0;
  color: var(--experience-accent);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.gallery-header h1 {
  font-size: clamp(2.65rem, 6vw, 5.25rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.gallery-header h1 span {
  color: var(--experience-accent);
}

.gallery-header p {
  max-width: 34rem;
  justify-self: end;
  color: var(--experience-muted);
  font-size: clamp(0.95rem, 1.25vw, 1.1rem);
  line-height: 1.85;
}

.experience-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
}

.experience-card {
  grid-template-rows: minmax(15rem, 30vh) auto;
  min-height: 34rem;
  border-radius: 8px;
  background: var(--experience-panel-strong);
  color: var(--experience-ink);
  box-shadow: none;
}

.experience-card:hover {
  transform: scale(var(--apple-card-scale-percent));
}

.card-visual {
  border-bottom-color: var(--experience-line);
}

.card-index {
  color: var(--experience-subtle);
}

.card-copy {
  padding: clamp(1.35rem, 2.5vw, 2rem);
}

.card-copy > span,
.cladding-card .card-copy > span,
.three-body-card .card-copy > span,
.solar-system-card .card-copy > span {
  color: var(--experience-accent);
}

.card-copy h2 {
  margin: 0.65rem 0 0.75rem;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.card-copy p {
  color: var(--experience-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.card-copy strong {
  margin-top: 1.25rem;
  color: var(--experience-accent);
}

.gallery-footer {
  border-top-color: var(--experience-line);
  color: var(--experience-muted);
}

@media (max-width: 800px) {
  .experience-gallery {
    padding: 1rem 0 2rem;
  }

  .gallery-header {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
  }

  .gallery-kicker {
    grid-column: 1;
  }

  .gallery-kicker {
    padding-top: 0;
  }

  .gallery-header h1 {
    margin: 0;
    font-size: clamp(2.7rem, 15vw, 4.5rem);
  }

  .experience-card {
    min-height: 29rem;
    grid-template-rows: 15rem auto;
  }
}
