/* motion-v8.css — v10: 3D Bristol balloon hero + page living layer
   Tokens only (no hex). Reduced-motion: static frame. */

/* ============ HERO GRID: copy left, balloon right ============ */
/* Home page never hides content waiting for scroll — sections are
   visible immediately; motion is enhancement, not a gate. */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-content { grid-template-columns: 1fr; }
}

/* ============ BALLOON SCENE ============ */
.v8b-wrap { position: relative; z-index: 1; }
.v8b-wrap canvas {
  display: block;
  width: 100%;
  height: clamp(340px, 36vw, 500px);
  cursor: grab;
}
.v8b-wrap canvas:active { cursor: grabbing; }
.v8b-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
}
.v8b-hud-l { display: inline-flex; align-items: center; gap: 0.45rem; }
.v8b-clock { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.v8-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: v8-pulse 2.2s ease-out infinite; }
@keyframes v8-pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============ LINE-MASK REVEALS ============ */
.v8-lm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.v8-lm-i {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.is-in .v8-lm-i, .is-in > .v8-lm-i { transform: none; }

/* ============ SCROLL THREAD ============ */
.v8-thread {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  top: 0;
  height: 100vh;
  width: 1px;
  background: var(--rule);
  z-index: 5;
  pointer-events: none;
}
.v8-thread-fill {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}
.v8-tick {
  position: absolute;
  right: -2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.25;
  transition: opacity 0.3s ease, background 0.3s ease;
}
.v8-tick.is-active { background: var(--accent); opacity: 0.9; }
.v8-tick-label {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--mid);
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}
.v8-tick-label.is-active { opacity: 0.6; }
@media (max-width: 900px) { .v8-thread { display: none !important; } }

/* ============ CARD SPOTLIGHT ============ */
.work-card { position: relative; overflow: hidden; }
.work-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.work-card:hover::after { opacity: 1; }

/* ============ PILLAR CARDS: TERMINAL EXAMPLE WINDOWS ============ */
/* Home page: equalize the three pillar cards (asym-tall layout left
   the Build card lower than its neighbours — ragged bottom edge). */
.asym-tiles {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: none;
}
.asym-tile-tall { grid-row: auto; }
.asym-tile-example {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  min-height: 12.5em;
  font-size: 0.78rem;
}
.asym-tile-example::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 10px 0 0 var(--ink-3), 20px 0 0 var(--ink-3);
  margin: 0 0 0.7rem;
}

/* ============ ABOUT-ME FACTS ROW ============ */
.v8-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mid);
}
.v8-facts span { display: inline-flex; align-items: center; gap: 0.5rem; }
.v8-facts .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============ TERMINAL-TYPED PROOF LINES ============ */
.v8-type-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: v8-blink 1s steps(1) infinite;
}
@keyframes v8-blink { 50% { opacity: 0; } }

/* ============ FILM GRAIN ============ */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .v8-thread { display: none; }
  .v8-lm-i { transform: none; transition: none; }
  .v8-dot { animation: none; }
  .work-card::after { display: none; }
}
