/* ==========================================================================
   CHAPTER 01: HERO (FROZEN OWNER-APPROVED RED DWARF FORMATION BASELINE)
   Source: prototypes/red-dwarf-animation/index.html
   DO NOT RETUNE, REDESIGN, SIMPLIFY, OR MODIFY BEHAVIOR
   ========================================================================== */

:root {
  --hero-bg: #040508;
  --hero-text: #f4efe8;
  --hero-muted: #9e968f;
  --signal-warm: #ff6b35;
  --signal-amber: #ffaa40;
  --hero-copy-offset-x: clamp(-100px, calc(clamp(20px, 4vw, 64px) - max(5vw, calc((100vw - 1400px) / 2))), 0px);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--hero-bg);
  color: var(--hero-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Monogram Navigation Header */
.portfolio-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  z-index: 100;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 8, 0.88) 0%, rgba(4, 5, 8, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: none;
}

.portfolio-header > * {
  pointer-events: auto;
}

.portfolio-header__logo {
  color: #f4efe8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.portfolio-header__logo:hover {
  opacity: 0.85;
}

.portfolio-header__logo .fw-logo-svg {
  height: 20px;
  width: auto;
  display: block;
}

.fw-logo-dot {
  filter: drop-shadow(0 0 6px rgba(254, 138, 47, 0.8));
}

.portfolio-header__status {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'JetBrains Mono', 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #7b8599;
  text-transform: uppercase;
}

.portfolio-header__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-warm);
  box-shadow: 0 0 8px var(--signal-warm);
  display: inline-block;
  animation: signal-beacon 2.4s ease-in-out infinite;
}

@keyframes signal-beacon {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 20px;
  background: #ff6b35;
  color: #fff;
  padding: 8px 16px;
  z-index: 999;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* Hero Section */
.hero--red-dwarf {
  background: var(--hero-bg);
  color: var(--hero-text);
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.hero--red-dwarf::before {
  background: #702315;
  border-radius: 50%;
  content: "";
  filter: blur(104px);
  height: min(30vw, 480px);
  left: 74%;
  opacity: .12;
  pointer-events: none;
  position: absolute;
  top: 51%;
  transform: translate(-50%, -50%);
  width: min(30vw, 480px);
  z-index: -1;
}

/* Seamless Soft Transition from Chapter 01 to Chapter 02 */
.hero--red-dwarf::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 340px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(4, 5, 8, 0.15) 70px,
    rgba(4, 5, 8, 0.45) 150px,
    rgba(4, 5, 8, 0.80) 230px,
    rgba(4, 5, 8, 0.98) 290px,
    #040508 100%
  );
  pointer-events: none;
  z-index: 2;
}

.hero-red-dwarf__sky {
  inset: 0;
  pointer-events: none;
  position: absolute;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(20, 26, 42, 0.45) 0%, transparent 58%),
    radial-gradient(circle at 82% 55%, rgba(60, 20, 12, 0.28) 0%, transparent 62%);
}

.hero-red-dwarf__night-sky {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-red-dwarf__night-sky .star {
  transform-origin: center;
  transform-box: fill-box;
}

.hero-red-dwarf__night-sky .star--twinkle-1 {
  animation: star-blink-1 2.8s ease-in-out infinite;
}
.hero-red-dwarf__night-sky .star--twinkle-2 {
  animation: star-blink-2 4.1s ease-in-out infinite 0.75s;
}
.hero-red-dwarf__night-sky .star--twinkle-3 {
  animation: star-blink-3 3.4s ease-in-out infinite 1.4s;
}
.hero-red-dwarf__night-sky .star--twinkle-4 {
  animation: star-blink-4 5.2s ease-in-out infinite 2.2s;
}
.hero-red-dwarf__night-sky .star--beacon {
  animation: star-beacon-pulse 4.6s ease-in-out infinite;
}

@keyframes star-blink-1 {
  0%, 100% { opacity: 0.20; transform: scale(0.75); }
  35% { opacity: 0.95; transform: scale(1.18); }
  52% { opacity: 0.32; transform: scale(0.85); }
  72% { opacity: 0.88; transform: scale(1.06); }
}
@keyframes star-blink-2 {
  0%, 100% { opacity: 0.78; transform: scale(1.02); }
  28% { opacity: 0.16; transform: scale(0.72); }
  62% { opacity: 1.0; transform: scale(1.22); }
  82% { opacity: 0.38; transform: scale(0.85); }
}
@keyframes star-blink-3 {
  0%, 100% { opacity: 0.22; transform: scale(0.8); }
  45% { opacity: 0.92; transform: scale(1.12); }
  60% { opacity: 0.28; transform: scale(0.82); }
  85% { opacity: 0.82; transform: scale(1.04); }
}
@keyframes star-blink-4 {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  22% { opacity: 0.96; transform: scale(1.16); }
  42% { opacity: 0.22; transform: scale(0.78); }
  68% { opacity: 0.88; transform: scale(1.08); }
  84% { opacity: 0.18; transform: scale(0.72); }
}
@keyframes star-beacon-pulse {
  0%, 100% { opacity: 0.42; filter: drop-shadow(0 0 2px rgba(255, 240, 220, 0.45)); transform: scale(0.88); }
  50% { opacity: 1.0; filter: drop-shadow(0 0 5px rgba(255, 240, 220, 0.95)) drop-shadow(0 0 11px rgba(255, 185, 130, 0.5)); transform: scale(1.18); }
}

.hero-red-dwarf__inner {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 72px);
  min-height: inherit;
  padding-bottom: 96px;
  padding-top: 96px;
  position: relative;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  z-index: 2;
}

.hero-red-dwarf__copy {
  max-width: 680px;
  position: relative;
  z-index: 2;
}

.hero--red-dwarf h1 {
  color: #f4efe8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 88px;
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0.05em;
  line-height: 0.92;
  margin: 0;
  max-width: none;
  transform: translate(var(--hero-copy-offset-x, -100px), 0px);
  text-align: left;
  opacity: 1;
  white-space: nowrap;
}

.hero-red-dwarf__info-node {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(var(--hero-copy-offset-x, -100px), 195px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px 4px 6px;
  margin: -4px 0 0 -6px;
  cursor: pointer;
  user-select: none;
  z-index: 5;
  transition: opacity 0.3s ease, border-color 0.2s ease, background 0.2s ease;
  font: inherit;
  color: inherit;
  text-align: left;
  border-radius: 4px;
}

.hero-red-dwarf__info-node:hover {
  background: rgba(254, 138, 47, 0.06);
  border-color: rgba(254, 138, 47, 0.25);
}

.hero-red-dwarf__info-node:focus-visible {
  border-color: rgba(254, 138, 47, 0.65);
  box-shadow: 0 0 0 2px rgba(254, 138, 47, 0.25);
  outline: none;
}

.hero-red-dwarf__info-indicator {
  position: relative;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-red-dwarf__info-core {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fe8a2f;
  box-shadow: 0 0 6px #fe8a2f, 0 0 12px rgba(254, 138, 47, 0.4);
  animation: hero-info-core-pulse 2.6s ease-in-out infinite;
}

.hero-red-dwarf__info-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(254, 138, 47, 0.5);
  animation: hero-info-ring-ping 2.6s cubic-bezier(0.2, 0.8, 0.25, 1) infinite;
}

.hero-red-dwarf__info-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #f4efe8;
  line-height: 1;
  animation: hero-info-text-pulse 2.6s ease-in-out infinite;
  transition: color 0.2s ease, text-shadow 0.2s ease, opacity 0.2s ease;
}

.hero-red-dwarf__info-node:hover .hero-red-dwarf__info-label {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 0 10px rgba(254, 138, 47, 0.6), 0 0 18px rgba(254, 138, 47, 0.35);
  animation-play-state: paused;
}

.hero-red-dwarf__info-node:hover .hero-red-dwarf__info-core {
  box-shadow: 0 0 8px #fe8a2f, 0 0 16px rgba(254, 138, 47, 0.6);
}

@keyframes hero-info-core-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.75;
    box-shadow: 0 0 4px #fe8a2f;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 8px #fe8a2f, 0 0 14px rgba(254, 138, 47, 0.5);
  }
}

@keyframes hero-info-text-pulse {
  0%, 100% {
    opacity: 0.82;
    filter: brightness(100%);
    text-shadow: 0 0 0px rgba(254, 138, 47, 0);
  }
  50% {
    opacity: 1;
    filter: brightness(118%);
    text-shadow: 0 0 8px rgba(254, 138, 47, 0.45), 0 0 14px rgba(244, 239, 232, 0.25);
  }
}

@keyframes hero-info-ring-ping {
  0% {
    transform: scale(0.65);
    opacity: 0.85;
    border-color: rgba(254, 138, 47, 0.7);
  }
  65% {
    transform: scale(1.35);
    opacity: 0.15;
    border-color: rgba(254, 138, 47, 0.2);
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
    border-color: rgba(254, 138, 47, 0);
  }
}

.hero-red-dwarf__sentence,
.hero-red-dwarf__title {
  color: #f4efe8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.12em;
  line-height: 1.35;
  margin: 22px 0 0;
  max-width: 520px;
  min-height: 88px;
  transform: translate(var(--hero-copy-offset-x, -100px), 250px);
  text-align: left;
  opacity: 0.9;
  filter: brightness(110%);
  display: block;
  word-wrap: break-word;
  transition: opacity 0.45s ease-in-out;
}

.hero-red-dwarf__sentence.is-fading {
  opacity: 0 !important;
}

.hero-red-dwarf__star-field {
  align-items: center;
  cursor: grab;
  display: flex;
  justify-content: flex-end;
  padding-right: clamp(0px, 2.4vw, 40px);
  position: relative;
  touch-action: none;
  user-select: none;
}
.hero-red-dwarf__star-field.is-dragging {
  cursor: grabbing;
}

.hero-red-dwarf__canvas {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: block;
  filter: drop-shadow(0 0 30px rgba(220, 60, 15, .16)) drop-shadow(0 0 72px rgba(150, 30, 10, .10));
  height: auto;
  max-height: min(78vh, 620px);
  max-width: 100%;
  pointer-events: auto;
  position: relative;
  width: min(100%, 580px);
  z-index: 1;
}

.hero-red-dwarf__formation-canvas {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.6s ease-out;
}

.hero-red-dwarf__fallback {
  aspect-ratio: 635 / 680;
  display: none;
  filter: saturate(.95) contrast(1.03) drop-shadow(0 0 28px rgba(126, 40, 22, .16));
  height: auto;
  mask-image: radial-gradient(ellipse 47% 47% at 50% 50%, #000 0 78%, transparent 96%);
  mix-blend-mode: screen;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
  width: min(100%, 630px);
  -webkit-mask-image: radial-gradient(ellipse 47% 47% at 50% 50%, #000 0 78%, transparent 96%);
}

body.no-webgl .hero-red-dwarf__canvas {
  display: none;
}
body.no-webgl .hero-red-dwarf__fallback {
  display: block;
}

.hero-red-dwarf__replay-btn {
  position: absolute;
  bottom: 12px;
  right: clamp(10px, 3vw, 40px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.20),
              inset 0 0 16px 0 rgba(255, 255, 255, 0.03),
              0 6px 24px rgba(0, 0, 0, 0.35);
  color: rgba(244, 239, 232, 0.88);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.025em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.5s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, transform 0.3s ease;
  z-index: 10;
  -webkit-font-smoothing: antialiased;
}
.hero-red-dwarf__replay-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.hero-red-dwarf__replay-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: transparent;
  box-shadow: inset 0 1px 2px 0 rgba(255, 255, 255, 0.30),
              inset 0 0 20px 0 rgba(255, 255, 255, 0.05),
              0 8px 30px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}
.hero-red-dwarf__replay-btn:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.6);
  outline-offset: 3px;
}
.hero-red-dwarf__replay-btn:active {
  transform: translateY(1px);
}
.hero-red-dwarf__replay-text {
  line-height: 1;
  white-space: nowrap;
}
.hero-red-dwarf__replay-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  line-height: 1;
  background: rgba(244, 239, 232, 0.06);
  border: 1px solid rgba(244, 239, 232, 0.14);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: rgba(244, 239, 232, 0.70);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.hero-red-dwarf__replay-btn:hover .hero-red-dwarf__replay-kbd {
  background: rgba(244, 239, 232, 0.10);
  border-color: rgba(244, 239, 232, 0.22);
  color: rgba(244, 239, 232, 0.95);
}

/* Scroll indicator / continuity hint at bottom of Hero */
.hero-continuity-carrier {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(244, 239, 232, 0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 5;
  text-decoration: none;
  transition: color 0.3s ease;
}
.hero-continuity-carrier:hover {
  color: var(--signal-warm);
}
.hero-continuity-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, var(--signal-warm) 0%, rgba(255, 107, 53, 0) 100%);
  animation: carrier-flow 2s ease-in-out infinite;
}

@keyframes carrier-flow {
  0% { transform: scaleY(0.2); transform-origin: top; opacity: 0.2; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 0.9; }
  100% { transform: scaleY(0.2); transform-origin: bottom; opacity: 0.2; }
}

/* ==========================================================================
   HERO INFORMATION EDITORIAL PANEL (RIGHT SLIDE-OUT DRAWER)
   Design Authority: Atmospheric Dark Space (#040508) + Amber Telemetry +
   Editorial Hierarchy. Semi-transparent glass preserving the star field behind it.
   ========================================================================== */

/* Panel Container & Backdrop (Unified Centered Modal) */
.hero-info-panel-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.25s ease, opacity 0.25s ease;
}

.hero-info-panel-container.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.hero-info-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.hero-info-panel-container.is-open .hero-info-panel-backdrop {
  opacity: 1;
}

/* Centered Editorial Profile Card (Unified with Chapter 02 Dossiers) */
.hero-info-panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  background: linear-gradient(180deg, #131724 0%, #0d1017 100%);
  border: 1px solid rgba(255, 170, 112, 0.25);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 107, 53, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  overflow: hidden;
  z-index: 2;
}

.hero-info-panel-container.is-open .hero-info-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Panel Header (Clean, top-right close button matching all dossiers) */
.hero-info-panel__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 24px 0;
  border-bottom: none;
  flex-shrink: 0;
}

.hero-info-panel__close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.hero-info-panel__close-btn:hover,
.hero-info-panel__close-btn:focus-visible {
  border-color: rgba(255, 170, 112, 0.5);
  color: #ffaa70;
  background: rgba(255, 107, 53, 0.1);
  outline: none;
}

.hero-info-panel__close-kbd {
  display: none;
}

.hero-info-panel__close-btn svg {
  pointer-events: none;
  width: 14px;
  height: 14px;
}

/* Panel Body & Scroll Container */
.hero-info-panel__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(254, 138, 47, 0.25) transparent;
}

.hero-info-panel__body::-webkit-scrollbar {
  width: 4px;
}

.hero-info-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.hero-info-panel__body::-webkit-scrollbar-thumb {
  background: rgba(254, 138, 47, 0.25);
  border-radius: 2px;
}

/* Circular Profile-Photo Canvas */
.hero-info-panel__photo-frame {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 2px solid rgba(254, 138, 47, 0.40);
  background: radial-gradient(circle, rgba(254, 138, 47, 0.08) 0%, rgba(13, 17, 26, 0.7) 70%, rgba(6, 8, 14, 0.95) 100%);
  overflow: hidden;
  box-shadow: 0 0 24px rgba(254, 138, 47, 0.18), 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  flex-shrink: 0;
}

.photo-reticle {
  display: none;
}

.hero-info-panel__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

/* Identity Block */
.hero-info-panel__identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.hero-info-panel__name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #f4efe8;
  margin: 0;
  line-height: 1.15;
  text-align: center;
}

.hero-info-panel__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(254, 138, 47, 0.35) 20%, rgba(255, 255, 255, 0.12) 50%, rgba(254, 138, 47, 0.35) 80%, transparent 100%);
  margin: -4px 0 0 0;
}

/* Grounded Introduction Copy */
.hero-info-panel__narrative {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.hero-info-panel__p {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(244, 239, 232, 0.82);
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Parallel Identical Actions (Download CV, LinkedIn, Email) */
.hero-info-panel__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-info-panel__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #f4efe8;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.22s ease;
}

.hero-info-panel__action-btn svg {
  color: #fe8a2f;
  flex-shrink: 0;
}

.hero-info-panel__action-btn .action-arrow {
  font-size: 11px;
  color: rgba(254, 138, 47, 0.8);
  transition: transform 0.2s ease;
}

.hero-info-panel__action-btn:hover {
  background: rgba(254, 138, 47, 0.1);
  border-color: rgba(254, 138, 47, 0.5);
  box-shadow: 0 4px 16px rgba(254, 138, 47, 0.15);
  color: #ffffff;
  transform: translateY(-1px);
}

.hero-info-panel__action-btn:hover .action-arrow {
  transform: translate(1px, -1px);
}

.hero-info-panel__action-btn:focus-visible {
  outline: 1px solid rgba(254, 138, 47, 0.85);
  outline-offset: 2px;
}

/* Hero Info Panel Dev Tools (gated: hidden by default, visible in edit mode) */
.hero-info-panel__dev-tools {
  display: none;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  text-align: center;
}

body.dev-editor-active .hero-info-panel__dev-tools {
  display: block;
}

@media (max-width: 440px) {
  .hero-info-panel__actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .hero-red-dwarf__inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 96px;
    padding-top: 96px;
  }
  .hero-red-dwarf__copy { max-width: 600px; }
  .hero--red-dwarf h1 {
    transform: none;
    font-size: clamp(48px, 8vw, 72px);
  }
  .hero-red-dwarf__info-node {
    position: static;
    transform: none;
    margin-top: 18px;
    margin-bottom: 4px;
  }
  .hero-red-dwarf__sentence,
  .hero-red-dwarf__title {
    transform: none;
    margin-top: 16px;
  }
  .hero-red-dwarf__star-field {
    justify-content: center;
    margin-top: 36px;
    padding-right: 0;
  }
  .hero-red-dwarf__canvas {
    width: min(88vw, 480px);
  }
  .hero-red-dwarf__replay-btn {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 18px auto 0;
  }
}

@media (max-width: 600px) {
  .hero-red-dwarf__inner { gap: 0; padding: 88px 0; }
  .hero--red-dwarf h1 { font-size: clamp(36px, 9.5vw, 48px); line-height: 1.05; max-width: 100%; white-space: normal; transform: none; }
  .hero-red-dwarf__info-node {
    position: static;
    transform: none;
    margin-top: 14px;
    margin-bottom: 2px;
  }
  .hero-red-dwarf__sentence,
  .hero-red-dwarf__title { font-size: 14px; line-height: 1.35; margin-top: 14px; transform: none; }
  .hero-red-dwarf__star-field { margin-top: 32px; width: 100%; }
  .hero--red-dwarf::before { left: 50%; top: 58%; }
  .hero-red-dwarf__canvas {
    width: min(88vw, 360px);
  }
  .hero-info-panel-container {
    padding: 14px;
  }
  .hero-info-panel {
    max-width: 100%;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    border-radius: 14px;
  }
  .hero-info-panel__header {
    padding: 14px 16px 0;
  }
  .hero-info-panel__body {
    padding: 4px 16px 20px;
    gap: 16px;
  }
  .hero-info-panel__photo-frame {
    width: 110px;
    height: 110px;
    margin: 0 auto;
  }
  .hero-info-panel__name {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-info-panel-container,
  .hero-info-panel-backdrop,
  .hero-info-panel,
  .hero-info-panel__cv-btn {
    transition: none !important;
  }
  .hero-red-dwarf__night-sky .star {
    animation: none !important;
    opacity: 0.55 !important;
    transform: none !important;
  }
  .hero-red-dwarf__star-field { cursor: default; touch-action: auto; }
  .hero-red-dwarf__info-core,
  .hero-red-dwarf__info-ring,
  .hero-red-dwarf__info-label {
    animation: none !important;
  }
  .hero-red-dwarf__info-label {
    opacity: 1 !important;
  }
  .hero-red-dwarf__info-ring {
    opacity: 0.35;
    transform: scale(1);
  }
  .hero-red-dwarf__replay-btn,
  .hero-red-dwarf__formation-canvas {
    display: none !important;
  }
  .hero-continuity-line {
    animation: none !important;
    opacity: 0.6 !important;
  }
  .hero-red-dwarf__sentence {
    transition: none !important;
  }
}
