/* ============================================================
   TriOrbit links.triorbit.com  |  shared space theme
   Used by index.html (3D orbit) and lite.html (static list).
   ============================================================ */

:root {
  --space:      #05010f;
  --heading:    #f5f3ff;
  --subtext:    #9aa4c8;
  --label:      #6d78a6;
  --glass:      rgba(255, 255, 255, 0.06);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --radius:     16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--space);
  color: var(--heading);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- background layers ---------- */
.nebula {
  position: fixed; inset: -20%; z-index: -3;
  background:
    radial-gradient(38% 45% at 22% 28%, rgba(124,58,237,0.55), transparent 60%),
    radial-gradient(42% 40% at 80% 22%, rgba(219,39,119,0.42), transparent 62%),
    radial-gradient(45% 50% at 70% 78%, rgba(34,211,238,0.30), transparent 60%),
    radial-gradient(50% 55% at 25% 82%, rgba(79,70,229,0.45), transparent 62%);
  filter: blur(60px) saturate(130%);
  animation: drift 34s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  0%   { transform: translate3d(-2%,-1%,0) scale(1.05) rotate(0deg); }
  50%  { transform: translate3d(2%,2%,0)   scale(1.15) rotate(4deg); }
  100% { transform: translate3d(1%,-2%,0)  scale(1.08) rotate(-3deg); }
}
#stars { position: fixed; inset: 0; z-index: -2; display: block; }
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 42%, transparent 40%, rgba(3,0,12,0.78) 100%);
}

/* ---------- header ---------- */
.profile { text-align: center; padding: 40px 20px 8px; }
.avatar-wrap { position: relative; width: 116px; height: 116px; margin: 0 auto 18px; }
.avatar-wrap::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(from 0deg, #7c3aed, #db2777, #22d3ee, #4f46e5, #7c3aed);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: spin 12s linear infinite;
  filter: drop-shadow(0 0 10px rgba(124,58,237,0.6));
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  position: relative; width: 116px; height: 116px; border-radius: 50%;
  object-fit: cover; display: block; border: 3px solid rgba(5,1,15,0.9);
  box-shadow: 0 0 30px rgba(124,58,237,0.35);
}
.name {
  font-size: 1.75rem; font-weight: 700; letter-spacing: 0.01em;
  background: linear-gradient(100deg,#e9d5ff,#f9a8d4,#a5f3fc,#c4b5fd,#e9d5ff);
  background-size: 250% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 18px rgba(168,85,247,0.45));
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 250% center; } }
.bio { margin-top: 8px; font-size: 0.95rem; color: var(--subtext); }

/* ---------- orbit stage ---------- */
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center;
         min-height: 0; padding: 8px 0 4px; }
.orbit {
  position: relative; height: 360px; perspective: 1100px; touch-action: pan-y;
  cursor: grab; user-select: none;
}
.orbit.dragging { cursor: grabbing; }
.orbit__track { position: absolute; inset: 0; transform-style: preserve-3d; }

/* ---------- planet disc (logo holder) ---------- */
.planet {
  position: relative; flex: none; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid hsla(var(--glow),90%,82%,0.4);
  background: radial-gradient(circle at 32% 26%,
              hsla(var(--glow),92%,74%,0.98),
              hsla(var(--glow),85%,46%,0.95) 46%,
              hsla(var(--glow),82%,20%,0.98) 100%);
  box-shadow:
    inset -6px -8px 14px rgba(0,0,0,0.55),
    inset 4px 5px 10px hsla(var(--glow),95%,88%,0.5),
    0 0 22px hsla(var(--glow),90%,60%,0.5);
}
.planet__logo { position: absolute; inset: 0; width: 100%; height: 100%;
                object-fit: contain; padding: 5px; border-radius: 50%; }
.planet__initials { font-weight: 700; font-size: 1.35rem; color: #fff;
                    letter-spacing: 0.02em; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }
.planet--sm { width: 34px; height: 34px; }
.planet--sm .planet__logo { padding: 3px; }
.planet--sm .planet__initials { font-size: 0.85rem; }

/* ---------- glass-gem cards ---------- */
.gem {
  --glow: 265;
  position: absolute; left: 50%; top: 50%;
  width: 320px; min-height: 120px;
  display: flex; flex-direction: row; align-items: center; gap: 16px;
  padding: 18px 22px; border-radius: var(--radius); text-decoration: none;
  /* Solid, not glass (16 Oct 2026): with 14+ cards in the orbit, see-through
     cards let every card show through the one in front. Each card is an
     opaque dark panel tinted with its own --glow hue. */
  background:
    radial-gradient(circle at 18% 50%, hsla(var(--glow),80%,45%,0.28), transparent 55%),
    linear-gradient(150deg, hsl(var(--glow),38%,17%), #0c0a22 72%);
  border: 1px solid var(--glass-edge);
  box-shadow:
    0 0 0 1px hsla(var(--glow),90%,70%,0.06),
    0 10px 34px rgba(0,0,0,0.4),
    0 0 38px hsla(var(--glow),90%,60%,0.16);
  transform-origin: center center;
  transition: opacity 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform, opacity; cursor: pointer;
}
.gem::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, hsla(var(--glow),95%,80%,0.55), transparent 40%,
              transparent 65%, hsla(var(--glow),95%,75%,0.30));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.gem.is-front {
  border-color: hsla(var(--glow),95%,75%,0.55);
  box-shadow:
    0 0 0 1px hsla(var(--glow),90%,70%,0.12),
    0 16px 46px rgba(0,0,0,0.5),
    0 0 64px hsla(var(--glow),95%,62%,0.42);
}
.gem__body { display: flex; flex-direction: column; min-width: 0; }
.gem__cat {
  font-size: 0.64rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.2em; color: hsla(var(--glow),85%,80%,0.9); margin-bottom: 6px;
}
.gem__title { font-size: 1.12rem; font-weight: 600; color: var(--heading); }
.gem__desc { font-size: 0.85rem; color: var(--subtext); margin-top: 3px; }
.gem__more {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  color: hsla(var(--glow),90%,82%,1); margin-top: 9px;
  opacity: 0; transform: translateY(-2px); transition: opacity 0.3s ease, transform 0.3s ease;
}
.gem__more::after { content: " \2192"; }
.gem.is-front .gem__more { opacity: 1; transform: none; }

/* ---------- controls ---------- */
.controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.orbit__btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-edge);
  color: var(--heading); font-size: 1.3rem; line-height: 1; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.orbit__btn:hover { background: rgba(255,255,255,0.12); transform: scale(1.08); }
.orbit__btn:active { transform: scale(0.94); }
.dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 300px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.22); transition: background 0.25s ease, transform 0.25s ease;
}
.dot.active { background: #d8b4fe; transform: scale(1.4); box-shadow: 0 0 10px rgba(168,85,247,0.8); }
.hint { text-align: center; font-size: 0.76rem; color: var(--label); margin-top: 12px; letter-spacing: 0.02em; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center;
            justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox__scrim { position: absolute; inset: 0; background: rgba(3,0,12,0.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn 0.3s ease; }
.lightbox__panel {
  --glow: 265;
  position: relative; width: min(440px, 100%); max-height: 86vh; overflow-y: auto;
  border-radius: 20px; padding: 32px 28px 28px;
  background: linear-gradient(160deg, rgba(20,16,40,0.94), rgba(8,4,20,0.94));
  border: 1px solid hsla(var(--glow),90%,75%,0.4);
  box-shadow: 0 0 0 1px hsla(var(--glow),90%,70%,0.1),
              0 30px 80px rgba(0,0,0,0.6), 0 0 80px hsla(var(--glow),90%,55%,0.35);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  animation: panelIn 0.4s cubic-bezier(.2,.9,.3,1.2);
}
.lightbox__panel::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, transparent, hsla(var(--glow),95%,78%,0.9), transparent);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(22px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-edge);
  color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer; transition: background 0.2s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,0.16); }
.lb__back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 0.8rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-edge); color: var(--heading);
  transition: background 0.2s ease;
}
.lb__back[hidden] { display: none; }
.lb__back:hover { background: rgba(255,255,255,0.14); }
.lb__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.lb__head .planet { width: 70px; height: 70px; }
.lb__head .planet__initials { font-size: 1.6rem; }
.lb__cat { font-size: 0.66rem; font-weight: 600; text-transform: uppercase;
           letter-spacing: 0.2em; color: hsla(var(--glow),85%,80%,0.9); }
.lb__title { font-size: 1.45rem; font-weight: 700; color: var(--heading); margin-top: 4px; }
.lb__content { color: var(--subtext); font-size: 0.95rem; line-height: 1.65; }
.lb__content p { margin-bottom: 12px; }
.lb__content a { color: hsla(var(--glow),90%,82%,1); }
.lb__facts { list-style: none; margin: 16px 0 0; display: flex; flex-direction: column; gap: 9px; }
.lb__facts li { display: flex; gap: 12px; font-size: 0.9rem; }
.lb__facts .k { color: hsla(var(--glow),85%,80%,0.95); min-width: 96px; font-weight: 600; }
.lb__facts .v { color: var(--heading); }
.lb__cta {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 24px;
  padding: 13px 24px; border-radius: 12px; text-decoration: none; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, hsla(var(--glow),85%,56%,1), hsla(var(--glow),85%,42%,1));
  box-shadow: 0 8px 24px hsla(var(--glow),90%,50%,0.4);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.lb__cta:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* dot-separated subdomain projects inside the lightbox */
.lb__projects { margin-top: 20px; }
.lb__projects-label {
  display: block; font-size: 0.66rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.2em; color: hsla(var(--glow),85%,80%,0.9); margin-bottom: 8px;
}
.lb__projects-list { font-size: 0.92rem; line-height: 1.9; }
.lb__projects-list a { color: hsla(var(--glow),90%,82%,1); text-decoration: none; }
.lb__projects-list a:hover { text-decoration: underline; }
.lb__projects-list .soon { color: var(--label); }
.lb__projects-list > *:not(:first-child)::before {
  content: "\00B7"; margin: 0 9px; color: var(--label);
}

/* ---------- footer ---------- */
.footer { text-align: center; padding: 18px 20px 26px; font-size: 0.78rem; color: var(--label); }
.footer a { color: var(--subtext); text-decoration: none; }
.footer a:hover { color: var(--heading); }
.footer .sep { opacity: 0.4; margin: 0 8px; }

/* ============================================================
   LITE LAYOUT (lite.html)  |  same theme, static stacked list
   ============================================================ */
.lite-main { flex: 1; }
.lite-list {
  width: 100%; max-width: 460px; margin: 0 auto;
  padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 14px;
}
.lite-list .gem {
  position: static; left: auto; top: auto; width: 100%; min-height: 0;
  transform: none !important; opacity: 1 !important; z-index: auto;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.lite-list .gem:hover {
  transform: translateY(-3px) !important;
  border-color: hsla(var(--glow),95%,75%,0.5);
  box-shadow:
    0 0 0 1px hsla(var(--glow),90%,70%,0.1),
    0 16px 40px rgba(0,0,0,0.45),
    0 0 55px hsla(var(--glow),95%,62%,0.32);
}
.lite-list .gem__more { display: none; }

/* nested subdomains under a parent (lite version) */
.gem-group { display: flex; flex-direction: column; gap: 10px; }
.subnest {
  margin-left: 32px; padding-left: 18px;
  border-left: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-direction: column; gap: 8px;
}
.subnest__label {
  font-size: 0.62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--label); margin-bottom: 2px;
}
.subnest__link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: 11px; text-decoration: none;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.subnest__link:hover {
  background: rgba(255,255,255,0.07);
  border-color: hsla(var(--glow),90%,70%,0.45);
  transform: translateX(2px);
}
.subnest__dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 30%, hsla(var(--glow),92%,78%,1), hsla(var(--glow),85%,45%,1));
  box-shadow: 0 0 9px hsla(var(--glow),90%,60%,0.7);
}
.subnest__body { display: flex; flex-direction: column; min-width: 0; }
.subnest__name { font-size: 0.9rem; font-weight: 600; color: var(--heading); }
.subnest__desc { font-size: 0.77rem; color: var(--subtext); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .nebula, .name, .avatar-wrap::before { animation: none !important; }
  .lightbox__panel, .lightbox__scrim { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 520px) {
  .orbit { height: 330px; }
  .gem { width: 264px; padding: 16px 18px; gap: 13px; }
  .lite-list .gem { width: 100%; }
  .subnest { margin-left: 18px; padding-left: 14px; }
  .planet { width: 52px; height: 52px; }
  .name { font-size: 1.5rem; }
}

/* Logos in every planet now (16 Oct 2026): the initials were only a
   fallback for missing logos, but they showed through behind the
   transparent icons. Hide them whenever the planet holds its logo;
   if a logo fails to load, onerror removes the img and the initials
   come back. */
.planet:has(.planet__logo) .planet__initials { display: none; }
