/* ════════════════════════════════════════════════════════════════
   Biography world 2 · "Under the Same Sky"
   A night sky. Each chapter is a star that ignites; the stars draw a
   constellation as you travel, a comet rides the line, the year glows.
   ════════════════════════════════════════════════════════════════ */

body.b2 {
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(226,167,46,.10) 0%, transparent 42%),
    radial-gradient(140% 100% at 80% -10%, rgba(70,60,140,.30) 0%, transparent 50%),
    linear-gradient(180deg, #0b1026 0%, #0a0a18 45%, #07060f 100%);
  color: #ece6d6; min-height: 100vh;
}
#sky { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.sky-glow {
  position: fixed; left: 50%; bottom: -28vh; transform: translateX(-50%);
  width: 130vw; height: 50vh; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240,177,62,.18), transparent 70%);
}

/* ── hero ── */
.b2-hero {
  position: relative; z-index: 2; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6rem clamp(1.4rem,6vw,4rem) 4rem;
}
.b2-hero .bio-kicker { font-size: .72rem; letter-spacing: .38em; text-transform: uppercase; color: var(--saffron); margin-bottom: 1.3rem; }
.b2-hero .bio-title { font-family: "Fraunces", serif; font-weight: 340; font-size: clamp(3rem,11vw,7rem); line-height: 1; letter-spacing: -.015em; text-shadow: 0 0 40px rgba(240,177,62,.25); }
.b2-hero .bio-title em { font-style: italic; color: var(--saffron); }
.b2-hero .bio-intro { max-width: 40rem; margin: 1.8rem auto 0; font-size: clamp(1.02rem,1.5vw,1.2rem); opacity: .82; }
.b2-cue { margin-top: 2.6rem; display: inline-flex; flex-direction: column; align-items: center; gap: .8rem; color: var(--saffron); }
.b2-cue .cue-text { font-size: clamp(.98rem, 2.6vw, 1.25rem); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 0 26px rgba(240,177,62,.45); }
.b2-cue .cue-line { width: 2px; height: 60px; background: linear-gradient(var(--saffron), transparent); animation: cueflow 2.2s ease-in-out infinite; }
@keyframes cueflow { 0%,100% { transform: scaleY(.5); opacity: .4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; transform-origin: top; } }

/* ── constellation ── */
.constel-wrap { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 2rem clamp(1.2rem,5vw,3rem) 4rem; }
.constel-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.const-seg { fill: none; stroke: rgba(240,177,62,.5); stroke-width: 1.4; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(240,177,62,.6)); }
.const-comet { fill: #fff7e6; }

.star-stop { position: relative; display: flex; padding: clamp(2.4rem,7vh,5.6rem) 0; min-height: 44vh; }
.star-stop[data-side="left"] { justify-content: flex-start; }
.star-stop[data-side="right"] { justify-content: flex-end; }

.star {
  position: absolute; top: 50%; transform: translate(-50%,-50%); z-index: 2;
  width: 12px; height: 12px; border-radius: 50%;
  background: #cfd2e6; box-shadow: 0 0 0 0 rgba(240,177,62,0);
  transition: background .4s var(--ease-out), box-shadow .5s var(--ease-out), transform .5s var(--ease-out);
}
.star-stop[data-side="left"] .star { left: 39%; }
.star-stop[data-side="right"] .star { left: 61%; }
.star::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.7), transparent); opacity: .5; }
.star.lit {
  background: #fff7e6;
  box-shadow: 0 0 8px 2px rgba(255,247,230,.9), 0 0 26px 8px rgba(240,177,62,.55);
  transform: translate(-50%,-50%) scale(1.5);
}

.star-card {
  position: relative; z-index: 2; width: min(46%, 30rem);
  background: linear-gradient(180deg, rgba(28,30,54,.74), rgba(14,15,30,.74));
  border: 1px solid rgba(240,177,62,.22); border-radius: 20px;
  padding: clamp(1.6rem,3vw,2.4rem);
  box-shadow: 0 26px 60px -30px rgba(0,0,0,.8); backdrop-filter: blur(4px);
  will-change: transform;
}
.s-year { display: inline-block; font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: 1.05rem; color: var(--saffron); margin-bottom: .5rem; }
.s-title { font-family: "Fraunces", serif; font-weight: 360; font-size: clamp(1.5rem,2.6vw,2.15rem); line-height: 1.12; margin-bottom: 1rem; }
.s-title em { font-style: italic; color: #b9c3ff; }
.s-text { font-size: clamp(.96rem,1.2vw,1.04rem); opacity: .9; }
.s-text + .s-text { margin-top: .9rem; }
.star-card a.wiki { color: #ece6d6; background-image: linear-gradient(var(--saffron), var(--saffron)); }
.star-card a.wiki:hover { color: var(--saffron); }

/* ── closing ── */
.b2-end { position: relative; z-index: 2; text-align: center; padding: clamp(4rem,12vh,9rem) clamp(1.4rem,6vw,4rem) 5rem; }
.end-lead { font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: clamp(2.4rem,7vw,4.6rem); color: var(--saffron); line-height: 1.05; margin-bottom: 1.3rem; text-shadow: 0 0 36px rgba(240,177,62,.25); }
.end-body { max-width: 36rem; margin: 0 auto 2.4rem; opacity: .85; }
.end-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.b2 .btn-ghost { color: #ece6d6; }
.b2 .btn-ghost:hover { background: #ece6d6; color: #0a0a18; }
.bio-foot { margin-top: 4rem; opacity: .7; }
.bio-foot .fn { font-family: "Fraunces", serif; font-size: 1.4rem; }
.bio-foot .fn em { color: var(--saffron); }
.bio-foot .ft { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; margin-top: .4rem; }

/* ── mobile: stars hug the left, cards stack ── */
@media (max-width: 820px) {
  .constel-wrap { padding-left: 0; padding-right: 0; }
  .star-stop { padding: 2.1rem 0; min-height: 0; }
  .star-stop, .star-stop[data-side="left"], .star-stop[data-side="right"] { justify-content: flex-end; }
  .star-card { width: calc(100% - 3rem); }
  .star, .star-stop[data-side="left"] .star, .star-stop[data-side="right"] .star { left: 1rem; top: 3.2rem; }
  .end-cta { flex-direction: column; align-items: center; }
  .end-cta .btn { width: min(20rem, 86vw); }
}

@media (prefers-reduced-motion: reduce) { .b2-cue .cue-line { animation: none; } }

/* touch devices: solid cards (no per-frame backdrop blur) and no SVG line filter */
@media (pointer: coarse) {
  .star-card { backdrop-filter: none; will-change: auto; background: linear-gradient(180deg, rgba(22,24,46,.95), rgba(11,12,24,.96)); }
  .const-seg { filter: none; }
}
