:root {
  --bg: #07080a;
  --fg: #f2f0ea;
  --muted: #9a978d;
  --line: rgba(242, 240, 234, 0.18);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: "EB Garamond", "Times New Roman", serif;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Intro poem ---------- */

.skip-intro .intro {
  display: none;
}

.skip-intro .scene,
.skip-intro .final-quote {
  transition: none;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 42%, #101210 0%, #050606 72%);
  padding: 48px 24px;
  cursor: pointer;
  transition: opacity 1.2s ease, transform 1.2s ease, filter 1.2s ease;
}

.intro.leaving {
  opacity: 0;
  transform: scale(1.14);
  filter: blur(8px);
  pointer-events: none;
}

.intro.reduced {
  transition: opacity 0.4s ease;
}

.intro.reduced.leaving {
  transform: none;
  filter: none;
}

.poem {
  max-width: 480px;
  text-align: center;
}

.poem-title {
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.poem-byline {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 44px;
  letter-spacing: 0.05em;
}

.stanza {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #d8d5cc;
  margin: 0 0 28px;
  opacity: 0;
  transform: translateY(10px);
  animation: stanzaIn 1s ease forwards;
}

.s1 { animation-delay: 0.3s; }
.s2 { animation-delay: 1.5s; }
.s3 { animation-delay: 2.7s; }
.s4 { animation-delay: 3.9s; }

.enter-btn {
  margin-top: 16px;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 22px;
  cursor: pointer;
  opacity: 0;
  animation: stanzaIn 1s ease forwards;
  animation-delay: 5.1s;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.enter-btn:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.enter-btn .arrow {
  display: inline-block;
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes stanzaIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.intro.reduced .stanza,
.intro.reduced .enter-btn {
  animation: none;
  opacity: 1;
  transform: none;
}

@media (max-width: 600px) {
  .poem-title { font-size: 1.2rem; }
  .stanza { font-size: 0.95rem; line-height: 1.8; margin-bottom: 22px; }
}

/* ---------- Home scene ---------- */

.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #050607;
  transition: transform 1.7s cubic-bezier(0.22, 0.61, 0.36, 1), filter 1.7s ease, opacity 1.7s ease;
}

.scene.pre {
  transform: scale(1.2);
  filter: blur(6px);
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .scene {
    transition: opacity 0.4s ease;
  }
  .scene.pre {
    transform: none;
    filter: none;
    opacity: 0.6;
  }
}

.scene svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.brand {
  position: absolute;
  top: 32px;
  left: 40px;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
  animation: fadeIn 1.4s ease both;
}

.road-nav {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.road-nav a {
  pointer-events: auto;
}

.season-btn {
  position: absolute;
  top: 32px;
  right: 40px;
  z-index: 2;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
  animation: fadeIn 1.4s ease both;
}

.season-btn:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.road-message {
  position: absolute;
  top: 27%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  max-width: 340px;
  text-align: center;
  font-style: italic;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: var(--muted);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: fadeIn 1.6s ease 0.4s both;
}

@media (max-width: 640px) {
  .road-message {
    top: 20%;
    font-size: 0.82rem;
    max-width: 260px;
  }
}

.key-hint {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.key-hint .key {
  position: absolute;
  bottom: 14%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
  animation: fadeIn 1.6s ease 1s both;
}

.key-hint .key-left {
  left: 37%;
}

.key-hint .key-right {
  right: 37%;
}

.key-hint .key svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .key-hint .key {
    bottom: 8%;
    width: 24px;
    height: 24px;
  }
  .key-hint .key-left {
    left: 18%;
  }
  .key-hint .key-right {
    right: 18%;
  }
}

.season-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-color: transparent;
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: background-color 1s ease, opacity 1s ease;
}

.scene-fx {
  transition: filter 1s ease;
}

.fx {
  opacity: 0;
  transition: opacity 1.4s ease;
}

.scene[data-season="spring"] .scene-fx {
  filter: hue-rotate(55deg) saturate(1.3) brightness(1.08);
}
.scene[data-season="spring"] .season-overlay {
  background-color: #cdeec0;
  opacity: 0.16;
}
.scene[data-season="spring"] .fx-spring {
  opacity: 1;
}

.fx-spring use {
  transform-origin: 0 0;
  transition: opacity 0.9s ease, scale 0.9s ease;
  scale: 0.05;
}

.scene[data-season="spring"] .fx-spring use {
  scale: 1;
}

.fx-spring > g:nth-child(4n+1) use { transition-delay: 0s; }
.fx-spring > g:nth-child(4n+2) use { transition-delay: 0.12s; }
.fx-spring > g:nth-child(4n+3) use { transition-delay: 0.24s; }
.fx-spring > g:nth-child(4n+4) use { transition-delay: 0.36s; }

.scene[data-season="summer"] .scene-fx {
  filter: saturate(1.15);
}
.scene[data-season="summer"] .sky-rect {
  fill: url(#skySummer);
}
.scene[data-season="summer"] .fog-ellipse {
  fill: url(#fogSummer);
}
.scene[data-season="summer"] .road-fill {
  fill: url(#roadSummer);
}
.scene[data-season="summer"] .season-overlay {
  background-color: #fff1c4;
  opacity: 0.1;
}
.scene[data-season="summer"] .walker-jacket-fill {
  fill: url(#walkerJacketSummer);
}
.scene[data-season="summer"] .walker-jacket-stroke {
  stroke: url(#walkerJacketSummer);
}

.scene[data-season="summer"] .fx-summer {
  opacity: 1;
  animation: sunPulse 6s ease-in-out infinite;
}

.fx-summer-leaves use {
  transform-origin: 0 0;
  transition: opacity 0.9s ease, scale 0.9s ease;
  scale: 0.05;
}

.scene[data-season="summer"] .fx-summer-leaves {
  opacity: 1;
}

.scene[data-season="summer"] .fx-summer-leaves use {
  scale: 1;
}

.fx-summer-leaves > g:nth-child(4n+1) use { transition-delay: 0s; }
.fx-summer-leaves > g:nth-child(4n+2) use { transition-delay: 0.12s; }
.fx-summer-leaves > g:nth-child(4n+3) use { transition-delay: 0.24s; }
.fx-summer-leaves > g:nth-child(4n+4) use { transition-delay: 0.36s; }

.scene[data-season="fall"] .scene-fx {
  filter: hue-rotate(-10deg) saturate(1.1) brightness(0.98);
}
.scene[data-season="fall"] .season-overlay {
  background-color: #c96a28;
  opacity: 0.16;
}
.scene[data-season="fall"] .fx-fall {
  opacity: 1;
}

.scene[data-season="winter"] .scene-fx {
  filter: saturate(0.2) brightness(1.25) hue-rotate(10deg);
}
.scene[data-season="winter"] .season-overlay {
  background-color: #d8e6f0;
  opacity: 0.3;
}
.scene[data-season="winter"] .fx-winter {
  opacity: 1;
}

@keyframes sunPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

#walkerHit {
  cursor: grab;
  touch-action: none;
}

#walkerHit:active {
  cursor: grabbing;
}

.snowfall {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

.scene[data-season="winter"] .snowfall {
  opacity: 1;
}

.flake {
  position: absolute;
  top: -10px;
  left: 0;
  width: var(--size, 4px);
  height: var(--size, 4px);
  background: #fff;
  border-radius: 50%;
  opacity: var(--op, 0.7);
  animation-name: snowfall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--dur, 12s);
  animation-delay: var(--delay, 0s);
  animation-play-state: paused;
}

.scene[data-season="winter"] .flake {
  animation-play-state: running;
}

@keyframes snowfall {
  from { transform: translate(0, -10px); }
  to { transform: translate(var(--drift, 20px), 940px); }
}

@media (prefers-reduced-motion: reduce) {
  .scene[data-season="summer"] .fx-summer {
    animation: none;
  }
}

@media (max-width: 720px) {
  .season-btn {
    top: auto;
    bottom: 20px;
    left: 24px;
    right: auto;
  }
}

.final-quote {
  position: absolute;
  top: 62px;
  left: 40px;
  z-index: 2;
  max-width: 280px;
  text-align: left;
  opacity: 0;
  transition: opacity 1.2s ease 0.6s, transform 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}

.final-quote.visible {
  opacity: 1;
}

.final-quote:hover {
  transform: translateY(-1px);
}

.final-quote p {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: color 0.25s ease;
}

.final-quote:hover p {
  color: var(--fg);
}

.final-quote .fq-byline {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
  .final-quote {
    transition: opacity 0.3s ease;
  }
}

@media (max-width: 720px) {
  .final-quote {
    top: 58px;
    left: 24px;
    max-width: 220px;
  }
  .final-quote p {
    font-size: 0.76rem;
  }
}

.poem-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 7, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.poem-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.poem-modal-card {
  position: relative;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: #0d0e0d;
  border: 1px solid var(--line);
  padding: 40px 36px;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.poem-modal.open .poem-modal-card {
  transform: translateY(0);
}

.poem-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.poem-modal-close:hover {
  color: var(--fg);
}

.poem-modal .stanza {
  font-size: 1rem;
  line-height: 1.85;
  color: #d8d5cc;
  margin: 0 0 24px;
}

.road-nav a {
  position: absolute;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  padding: 6px 12px 8px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid transparent;
  transition: color 0.35s ease, border-color 0.35s ease, letter-spacing 0.35s ease, background-color 0.35s ease;
  animation: fadeUp 1s ease both;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.road-nav a:hover {
  color: #ffffff;
  border-color: var(--line);
  letter-spacing: 0.09em;
  background: rgba(0, 0, 0, 0.65);
}

.item-1 { left: 39.4%; top: 46%; animation-delay: 0.1s; }
.item-2 { left: 33%; top: 54%; animation-delay: 0.25s; }
.item-3 { left: 28%; top: 62%; animation-delay: 0.4s; }
.item-4 { left: 60.6%; top: 46%; animation-delay: 0.1s; }
.item-5 { left: 67%; top: 54%; animation-delay: 0.25s; }
.item-6 { left: 72%; top: 62%; animation-delay: 0.4s; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-width: 720px) {
  .scene {
    height: 100vh;
  }
  .road-nav a {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
  }
  .item-1 { left: 50%; top: 36%; }
  .item-2 { left: 50%; top: 43%; }
  .item-3 { left: 50%; top: 50%; }
  .item-4 { left: 50%; top: 57%; }
  .item-5 { left: 50%; top: 64%; }
  .item-6 { left: 50%; top: 71%; }
}

/* ---------- Section pages ---------- */

.page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(90, 95, 100, 0.18), transparent 60%),
    linear-gradient(180deg, #060708 0%, #0b0c0d 100%);
  padding: 48px 40px 80px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 760px;
  margin: 0 auto 12vh;
}

.back-link {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--fg);
}

.page-number {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 32px;
}

.page-content p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 60ch;
}

.page-content .placeholder {
  border-left: 1px solid var(--line);
  padding-left: 20px;
  margin-top: 40px;
  font-style: italic;
}

/* ---------- Section page components ---------- */

.section-lede {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 48px;
}

/* About: flip cards */

.flip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}

.flip-card {
  perspective: 1000px;
  height: 200px;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-inner,
.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: #0d0e0d;
}

.flip-front h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.flip-front .flip-hint {
  margin-top: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
}

.flip-back {
  transform: rotateY(180deg);
}

.flip-back p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Reading: bookshelf */

.shelf-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.shelf {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 4px;
  overflow-x: auto;
}

.book {
  border: none;
  cursor: pointer;
  color: #f2f0ea;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 16px 7px;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
  border-radius: 2px 2px 0 0;
}

.book:hover, .book.active {
  transform: translateY(-16px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.shelf-ledge {
  height: 12px;
  background: linear-gradient(180deg, #3a2f22, #241b12);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.book-detail {
  margin-top: 32px;
  min-height: 90px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.book-detail h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.book-detail .book-author {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.book-detail p.note {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 60ch;
}

.detail-hint {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* People */

.people-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.people-grid.focused {
  gap: 0;
}

.person {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #14140f;
  color: var(--fg);
  font-family: inherit;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
    font-size 0.4s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.35s ease,
    opacity 0.3s ease, margin 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  padding: 0;
  overflow: hidden;
  position: relative;
}

.people-grid.focused .person:not(.active) {
  width: 0;
  height: 0;
  min-width: 0;
  border-width: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

/* When returning to the full grid, snap every other circle straight back to
   its normal size/position (no animated width/height, which is what causes
   flex-wrap to reshuffle everyone mid-transition) and only fade them back
   in. The previously-enlarged circle still shrinks smoothly on its own. */
.people-grid.snap .person:not(.active) {
  transition: opacity 0.3s ease;
}

.person.person-photo {
  border: none;
  background: none;
}

.person.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  transform: scale(1.35);
}

.person:not(.active):hover {
  width: 130px;
  height: 130px;
  font-size: 1.9rem;
  border-color: var(--fg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.person.active {
  width: 304px;
  height: 304px;
  font-size: 4.4rem;
  border-color: var(--fg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.person-detail {
  margin-top: 36px;
  min-height: 90px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.person-detail h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 400;
}

.person-detail .person-role {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.person-detail p.note {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.person-detail .detail-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.person-detail .detail-link:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* Training */

.training-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.training-item {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.training-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 8px;
}

.training-row .pct {
  color: var(--muted);
  font-style: italic;
  text-transform: none;
}

.bar {
  height: 6px;
  background: rgba(242, 240, 234, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #c9723a, #e0a53a);
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bar-fill.filled {
  width: var(--pct);
}

.training-detail {
  margin-top: 8px;
  min-height: 60px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.training-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

/* Insights: accordion */

.accordion {
  max-width: 680px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-head {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  padding: 18px 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.accordion-head:hover {
  color: #fff;
}

.accordion-head .chev {
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.open .chev {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-item.open .accordion-body {
  max-height: 280px;
}

.accordion-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
  padding: 0 4px;
  max-width: 60ch;
}

/* Media: gallery + lightbox */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.gallery-tile {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1c1c18, #0d0d0b);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.gallery-tile:hover {
  transform: translateY(-3px);
  border-color: var(--fg);
  color: var(--fg);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 6, 7, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-card {
  position: relative;
  max-width: 420px;
  width: 100%;
  background: #0d0e0d;
  border: 1px solid var(--line);
  padding: 32px;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.lightbox.open .lightbox-card {
  transform: translateY(0);
}

.lightbox-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #1c1c18, #0d0d0b);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lightbox-caption {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-close:hover {
  color: var(--fg);
}

@media (max-width: 600px) {
  .flip-grid, .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .person {
    width: 64px;
    height: 64px;
    font-size: 0.95rem;
  }
  .person.active {
    width: 220px;
    height: 220px;
    font-size: 3.2rem;
  }
}
