/* ══════════════════════════════════════
   Radial Orbital Timeline
   Vanilla CSS port — ACM JIT Design System
   ══════════════════════════════════════ */

/* ── Page Layout & Spacing Overrides ── */
.main-content {
  padding-top: calc(var(--nav-h, 64px) + 0.5rem) !important;
  padding-bottom: 2.5rem !important;
}

.main-content .page-header {
  margin-bottom: 0.5rem !important;
}

.main-content .page-header .label {
  margin-bottom: 0.2rem;
}

.main-content .page-header .page-title {
  margin-top: 0.25rem !important;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

/* ── Container ── */
.orbital-timeline {
  position: relative;
  width: 100%;
  max-width: 84rem;
  margin: 0 auto;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  background: transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .orbital-timeline {
  background: transparent;
}

/* ── Orbit ring + center planet ── */
.orbital-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 2.5px dashed rgba(16, 185, 129, 0.3);
  pointer-events: none;
}

body.light-theme .orbital-ring {
  border-color: rgba(11, 15, 13, 0.2);
}

/* ── Planet container ── */
.orbital-planet {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.orbital-planet:hover {
  transform: translate(-50%, -50%) scale(1.12) rotate(6deg);
}

/* ── Ambient glow / corona ── */
.orbital-planet-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(250, 204, 21, 0.28) 0%,
    rgba(250, 204, 21, 0.08) 45%,
    transparent 70%
  );
  pointer-events: none;
  animation: planet-corona 4s ease-in-out infinite;
}

/* ── Illustrated Planet Image (assets/globe.png) ── */
.orbital-planet-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(4px 4px 0px #0B0F0D) drop-shadow(0 6px 14px rgba(250, 204, 21, 0.25));
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.3s ease;
  display: block;
  z-index: 2;
}

.orbital-planet:hover .orbital-planet-img {
  transform: scale(1.08);
}

/* ── Moon orbit container ── */
.orbital-planet-orbit {
  position: absolute;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  animation: moon-orbit 6s linear infinite;
  pointer-events: none;
}

/* ── Moon dot ── */
.orbital-planet-moon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #facc15;
  border: 1px solid #0B0F0D;
  box-shadow: 0 0 6px #facc15;
}

/* ── Orbital node (each timeline item) ── */
.orbital-node {
  position: absolute;
  top: 50%;
  left: 50%;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

/* ── Node Dot (Vibrant Neo-Brutalist Circle Badges) ── */
.orbital-node-dot {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #0B0F0D;
  box-shadow: 3.5px 3.5px 0px #0B0F0D;
  background: #10B981;
  color: #0B0F0D;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
}

.orbital-node:hover .orbital-node-dot {
  transform: translateY(-4px) scale(1.12);
  box-shadow: 5px 5px 0px #0B0F0D;
}

/* Category-specific Vibrant Node Colors */
.orbital-node-1 .orbital-node-dot {
  background: #fb923c;
  color: #431407;
}

.orbital-node-2 .orbital-node-dot {
  background: #c084fc;
  color: #3b0764;
}

.orbital-node-3 .orbital-node-dot {
  background: #38bdf8;
  color: #083344;
}

.orbital-node-dot svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orbital-node.is-active .orbital-node-dot {
  transform: scale(1.25) translateY(-2px);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5), 5px 5px 0px #0B0F0D;
}

.orbital-node.is-related .orbital-node-dot {
  animation: orbital-related-pulse 1.2s ease-in-out infinite;
}

/* ── Node Label (Sticker Pill Badge) ── */
.orbital-node-label {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #ffffff;
  color: #0B0F0D;
  border: 2px solid #0B0F0D;
  box-shadow: 2.5px 2.5px 0px #0B0F0D;
  padding: 3px 10px;
  border-radius: 999px;
  transition: all 0.3s ease;
  z-index: 6;
}

body:not(.light-theme) .orbital-node-label {
  background: #111A16;
  color: #D1FAE5;
  border-color: #0B0F0D;
  box-shadow: 2.5px 2.5px 0px #0B0F0D;
}

.orbital-node.is-active .orbital-node-label {
  background: #facc15;
  color: #0B0F0D;
  transform: translateX(-50%) scale(1.06);
}

/* ── Expanded Detail Card ── */
.orbital-detail-card {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: 275px;
  border-radius: 18px;
  border: 2.5px solid #0B0F0D;
  box-shadow: 6px 6px 0px #0B0F0D;
  background: #111A16;
  color: #D1FAE5;
  padding: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .orbital-detail-card {
  background: #ffffff;
  color: #0B0F0D;
}

.orbital-node.is-active .orbital-detail-card {
  opacity: 1;
  pointer-events: auto;
}

/* Connector line from dot to card */
.orbital-detail-card::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5px;
  height: 12px;
  background: #0B0F0D;
}

.orbital-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 0;
}

.orbital-status-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  border: 2px solid var(--v-text, #D1FAE5);
}

.orbital-status-badge.completed {
  background: var(--v-primary, #10B981);
  color: var(--v-white, #fff);
  border-color: var(--v-primary, #10B981);
}

.orbital-status-badge.in-progress {
  background: var(--v-cta, #F59E0B);
  color: var(--v-black, #0B0F0D);
  border-color: var(--v-cta, #F59E0B);
}

.orbital-status-badge.pending {
  background: transparent;
  color: var(--v-text, #D1FAE5);
  border-color: var(--v-text, #D1FAE5);
  opacity: 0.6;
}

.orbital-card-date {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.7rem;
  color: var(--v-text, #D1FAE5);
  opacity: 0.5;
}

.orbital-card-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--v-text, #D1FAE5);
  padding: 0.5rem 1rem 0;
}

.orbital-card-content {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--v-text, #D1FAE5);
  opacity: 0.8;
  padding: 0.25rem 1rem 0.75rem;
}

/* Connected nodes section */
.orbital-connections-section {
  padding: 0 1rem 0.75rem;
  border-top: 1px solid rgba(209, 250, 229, 0.1);
  padding-top: 0.75rem;
}

.orbital-connections-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--v-text, #D1FAE5);
  opacity: 0.6;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.orbital-connections-title svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.orbital-connections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.orbital-connection-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--v-text, #D1FAE5);
  border-radius: var(--block-radius, 12px);
  background: transparent;
  color: var(--v-text, #D1FAE5);
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition, all 0.25s ease);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.orbital-connection-btn:hover {
  background: var(--v-primary, #10B981);
  color: var(--v-white, #fff);
  border-color: var(--v-primary, #10B981);
  transform: translate(2px, 2px);
  box-shadow: none;
}

.orbital-connection-btn svg {
  width: 8px;
  height: 8px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

body.light-theme .orbital-card-title {
  color: #0B0F0D;
}

body.light-theme .orbital-card-content {
  color: #334155;
  opacity: 0.95;
}

body.light-theme .orbital-card-date {
  color: #64748b;
  opacity: 0.9;
}

body.light-theme .orbital-connections-section {
  border-top-color: rgba(11, 15, 13, 0.1);
}

body.light-theme .orbital-connections-title {
  color: #475569;
  opacity: 0.9;
}

body.light-theme .orbital-connection-btn {
  border: 1.5px solid #0B0F0D;
  color: #0B0F0D;
  background: #f1f5f9;
}

body.light-theme .orbital-connection-btn:hover {
  background: #047857;
  color: #ffffff;
  border-color: #0B0F0D;
}

/* ── Section heading for the timeline ── */
.orbital-section-header {
  text-align: center;
  margin: 4rem 0 2rem;
}

.orbital-section-header .section-label {
  margin-bottom: 1rem;
}

.orbital-section-header .section-title {
  margin-top: 0.75rem;
}

.orbital-section-header .section-subtitle {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--slate-300, #cbd5e1);
  max-width: 32rem;
  margin-inline: auto;
}

/* ── Keyframes ── */
@keyframes orbital-related-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.1); }
}

@keyframes planet-corona {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.75; }
}

@keyframes planet-terminator-rotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes moon-orbit {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .orbital-timeline {
    height: 480px;
  }

  .orbital-ring {
    width: 280px;
    height: 280px;
  }

  .orbital-detail-card {
    width: 220px;
  }

  .orbital-node-dot {
    width: 36px;
    height: 36px;
  }

  .orbital-node-dot svg {
    width: 14px;
    height: 14px;
  }

  .orbital-node-label {
    font-size: 0.6rem;
    top: 44px;
  }
}

@media (max-width: 480px) {
  .orbital-timeline {
    height: 420px;
  }

  .orbital-ring {
    width: 220px;
    height: 220px;
  }

  .orbital-detail-card {
    width: 190px;
    font-size: 0.85em;
  }
}

@media (max-width: 380px) {
  .orbital-timeline {
    height: 380px;
  }

  .orbital-ring {
    width: 180px;
    height: 180px;
  }

  .orbital-detail-card {
    width: 170px;
    font-size: 0.8em;
  }
  
  .orbital-node-dot {
    width: 30px;
    height: 30px;
  }
}
