html {
  scroll-behavior: smooth;
}

:root {
  --bg: #020617;
  --bg-alt: rgba(15, 23, 42, 0.9);
  --primary: #38bdf8;
  --primary-soft: rgba(56, 189, 248, 0.14);
  --accent: #f97316;
  --accent-soft: rgba(248, 113, 22, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --shadow: 0 26px 60px rgba(15, 23, 42, 0.9);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
  --transition-fast: 0.18s ease;
  --transition-med: 0.28s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18) 0, transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.18) 0, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(129, 140, 248, 0.28) 0, transparent 60%),
    #020617;
  color: var(--text);
  line-height: 1.6;
}

/* Simple fade-in */

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.7s var(--transition-med) forwards;
}

.fade-in:nth-of-type(2) { animation-delay: 0.08s; }
.fade-in:nth-of-type(3) { animation-delay: 0.16s; }
.fade-in:nth-of-type(4) { animation-delay: 0.24s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.4rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.7);
}

.logo {
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #f9fafb;
}

.main-nav a {
  margin-left: 0.8rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  text-decoration: none;
  color: #9ca3af;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.main-nav a:hover {
  background: rgba(15, 118, 110, 0.3);
  color: #e5e7eb;
  transform: translateY(-1px);
}

/* Hero */

.hero {
  padding: 3.6rem 1.3rem 2.8rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  border-radius: 28px;
  padding: 2.5rem 2.1rem 2.4rem;
  position: relative;
  overflow: hidden;
  color: #e5e7eb;
  box-shadow: var(--shadow);
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.3) 0, transparent 55%),
              radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.32) 0, transparent 50%),
              linear-gradient(135deg, #0f172a, #020617);
}

.hero-inner::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.25) 0, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(168, 85, 247, 0.2) 0, transparent 45%),
    radial-gradient(circle at 50% 120%, rgba(249, 115, 22, 0.25) 0, transparent 50%);
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: heroGlow 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate3d(-10px, -10px, 0) scale(1); }
  50% { transform: translate3d(10px, 6px, 0) scale(1.03); }
  100% { transform: translate3d(-4px, 12px, 0) scale(1.02); }
}

.hero-kicker {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  opacity: 0.9;
  margin: 0 0 0.45rem;
}

.hero h1 {
  margin: 0 0 0.7rem;
  font-size: 2.1rem;
}

.hero-text {
  max-width: 640px;
  margin: 0 0 0.5rem;
  opacity: 0.96;
  position: relative;
  z-index: 1;
}

/* Sections */

.section {
  padding: 0 1.3rem;
  margin: 2.3rem auto 2.6rem;
  scroll-margin-top: 90px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.8rem 2.1rem;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.section h2 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  color: #e5e7eb;
}

.section p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Member cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem 1.3rem;
  margin-top: 1.3rem;
}

.card {
  background: #020617;
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.24) 0, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(249, 115, 22, 0.22) 0, transparent 45%);
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.hover-lift {
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-med),
    background var(--transition-med);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
}

.hover-lift:hover::before {
  opacity: 0.5;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: #e0f2fe;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.1rem;
  flex-shrink: 0;
}

/* For future: you can replace text with background-image on .avatar */

.avatar.outside {
  background: var(--accent-soft);
  color: #fed7aa;
}

.outside-tag {
  background: var(--accent-soft);
  color: #fed7aa;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.member-links {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.member-links a {
  font-size: 0.78rem;
  text-decoration: none;
  color: #e0f2fe;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.4);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.member-links a:hover {
  background: #38bdf8;
  color: #0b1120;
  box-shadow: 0 10px 26px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

/* Family tree image */

.tree-image-frame {
  margin-top: 1.4rem;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.25) 0, transparent 55%),
              radial-gradient(circle at bottom, rgba(249, 115, 22, 0.25) 0, transparent 55%);
  padding: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  position: relative;
  overflow: hidden;
}

.tree-image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  background: #020617;
}

.tree-image-caption {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.hover-glow {
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.hover-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  border-color: rgba(56, 189, 248, 0.6);
}

/* Gallery */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  margin-top: 1.2rem;
}

.photo-card {
  background: #020617;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.9rem 0.9rem 1rem;
  position: relative;
  overflow: hidden;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18) 0, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(249, 115, 22, 0.18) 0, transparent 45%);
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.photo-card.hover-lift:hover::before {
  opacity: 0.5;
}

.photo-box {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  border-radius: 12px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b1120;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 1.3rem 1rem 1.8rem;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding: 3.1rem 1rem 2.3rem;
  }

  .hero-inner {
    padding: 2.1rem 1.6rem 2rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section-inner {
    padding: 1.7rem 1.4rem 1.9rem;
  }
}
