:root {
  --bg: #070707;
  --text: #f4ecd2;
  --muted: #d2c394;
  --line: rgba(213, 177, 74, 0.28);
  --gold: #d4af37;
  --gold-soft: #f0d67a;
  --panel: rgba(18, 18, 18, 0.82);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.14), transparent 34%),
    radial-gradient(circle at right 20%, rgba(212, 175, 55, 0.09), transparent 28%),
    linear-gradient(180deg, #090909 0%, #0b0b0b 44%, #050505 100%);
}

a { color: inherit; text-decoration: none; }

.page-shell {
  position: relative;
  width: min(980px, calc(100% - 24px));
  padding: 24px 0;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(72px);
  pointer-events: none;
  opacity: 0.42;
}
.bg-orb-1 { top: 6%; left: 2%; width: 240px; height: 240px; background: rgba(212, 175, 55, 0.15); }
.bg-orb-2 { right: 4%; bottom: 8%; width: 280px; height: 280px; background: rgba(212, 175, 55, 0.1); }

.tree-stage {
  position: relative;
  padding: 30px 22px 40px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.9), rgba(8, 8, 8, 0.92));
  box-shadow: var(--shadow);
}

.tree-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(240, 214, 122, 0.04), transparent 30%, transparent 70%, rgba(212, 175, 55, 0.04));
  pointer-events: none;
}

.tree-header {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(240, 214, 122, 0.2);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.05);
  color: var(--gold-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.family-tree {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 14px 0 0;
}

.generation {
  display: flex;
  justify-content: center;
  width: 100%;
}

.profile-node {
  position: relative;
  display: block;
  border-radius: 999px;
  transition: transform 220ms ease, filter 220ms ease;
}
.profile-node:hover {
  transform: translateY(-6px) scale(1.03);
  filter: brightness(1.03);
}

.profile-avatar {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(240, 214, 122, 0.22);
  font-size: 2.45rem;
  font-weight: 800;
  color: #100d05;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 18px 34px rgba(0,0,0,0.3),
    0 0 0 10px rgba(212, 175, 55, 0.04);
  overflow: hidden;
}
.avatar-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.avatar-eduardo-photo {
  background-image:
    linear-gradient(rgba(12, 12, 12, 0.08), rgba(12, 12, 12, 0.08)),
    url('/assets/eduardo.png');
}
.avatar-marc-photo {
  background-image:
    linear-gradient(rgba(12, 12, 12, 0.06), rgba(12, 12, 12, 0.06)),
    url('/assets/marc.png');
}
.avatar-marc {
  background: radial-gradient(circle at 30% 30%, #fff0b9, #d4af37 72%, #8b6b1c 100%);
}

.profile-hover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 18px);
  transform: translateX(-50%) translateY(12px) scale(0.96);
  min-width: 230px;
  padding: 16px 18px;
  border: 1px solid rgba(240, 214, 122, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.98));
  color: var(--text);
  box-shadow: 0 22px 50px rgba(0,0,0,0.42);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
  text-align: center;
}
.profile-hover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 14px;
  height: 14px;
  background: rgba(12, 12, 12, 0.98);
  border-right: 1px solid rgba(240, 214, 122, 0.14);
  border-bottom: 1px solid rgba(240, 214, 122, 0.14);
  transform: translate(-50%, -50%) rotate(45deg);
}
.profile-hover strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.profile-hover span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.profile-hover span:last-child {
  color: var(--gold-soft);
}
.profile-node:hover .profile-hover,
.profile-node:focus-visible .profile-hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  box-shadow: 0 26px 56px rgba(0,0,0,0.5);
}

.tree-connector {
  position: relative;
  width: 180px;
  height: 118px;
}
.connector-stem {
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(180deg,
      rgba(240, 214, 122, 0.06) 0%,
      rgba(240, 214, 122, 0.84) 18%,
      rgba(212, 175, 55, 0.62) 52%,
      rgba(240, 214, 122, 0.28) 82%,
      rgba(240, 214, 122, 0.05) 100%);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.18);
}
.connector-branch {
  position: absolute;
  left: 50%;
  width: 50px;
  height: 26px;
  border-top: 2px solid rgba(240, 214, 122, 0.34);
  top: 48px;
  opacity: 0.8;
}
.connector-branch-left {
  transform: translateX(-100%);
  border-left: 2px solid rgba(240, 214, 122, 0.22);
  border-top-left-radius: 28px;
}
.connector-branch-right {
  transform: translateX(0);
  border-right: 2px solid rgba(240, 214, 122, 0.22);
  border-top-right-radius: 28px;
}
.connector-glow {
  position: absolute;
  left: 50%;
  border-radius: 999px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(240, 214, 122, 0.18), transparent 70%);
  pointer-events: none;
}
.connector-glow-top {
  top: 24px;
  width: 28px;
  height: 28px;
}
.connector-glow-bottom {
  bottom: 16px;
  width: 40px;
  height: 40px;
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 16px, 980px);
    padding: 16px 0;
  }
  .tree-stage {
    padding: 20px 14px 24px;
  }
  .profile-avatar {
    width: 98px;
    height: 98px;
    font-size: 2rem;
  }
  .profile-hover {
    min-width: 184px;
    padding: 12px 14px;
  }
  .tree-connector {
    width: 140px;
    height: 92px;
  }
  .connector-branch {
    width: 36px;
  }
}
