:root {
  --bg-main: #050608;
  --bg-elevated: #111218;
  --bg-elevated-soft: #0c0d12;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --accent: #3dd9c4;
  --accent-soft: rgba(61, 217, 196, 0.08);
  --text-main: #f7f7f7;
  --text-muted: #a0a4b8;
  --text-soft: #7a7f95;
  --danger: #ff5c7b;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.4);
  --transition-fast: 180ms ease-out;
}

/* reset + basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #151624 0, #050608 46%, #020308 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Layout */
.page { min-height: 100vh; display: flex; flex-direction: column; }

.shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 2vw, 2rem);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 8, 0.94),
    rgba(5, 6, 8, 0.84),
    rgba(5, 6, 8, 0.65)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; }

.brand-mark {
  width: 40px; height: 40px; border-radius: 16px;
  background: conic-gradient(from 210deg,#ee0000,#13501b,#215f9a,#3dd9c4,#ee0000);
  padding: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2),0 12px 30px rgba(0, 0, 0, 0.75);
}

.brand-mark-inner {
  width: 100%; height: 100%; border-radius: 14px;
  background: radial-gradient(circle at 20% 0%, #1a1b26 0, #050608 80%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; color: var(--accent);
}

.brand-text { display: flex; flex-direction: column; gap: 0.15rem; }
.brand-name { font-weight: 650; letter-spacing: 0.12em; font-size: 0.85rem; text-transform: uppercase; }
.brand-tagline { font-size: 0.77rem; color: var(--text-soft); }

.nav { display: flex; align-items: center; gap: 0.75rem; }
.nav-links { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.nav-link {
  padding: 0.35rem 0.7rem; border-radius: 999px; color: var(--text-muted); border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform 120ms ease-out;
}
.nav-link:hover {
  background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.06); color: var(--text-main); transform: translateY(-1px);
}
.nav-pill { padding: 0.3rem 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); font-size: 0.75rem; color: var(--text-soft); display: inline-flex; align-items: center; gap: 0.4rem; }
.nav-pill-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 12px rgba(61,217,196,0.7); }

/* Hero */
.hero { padding-top: 2rem; padding-bottom: 2.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1.4fr); gap: 1.75rem; align-items: stretch; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: minmax(0,1fr); } }

.card {
  border-radius: var(--radius-xl); border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, rgba(61,217,196,0.12) 0, transparent 50%), radial-gradient(circle at bottom right, rgba(121,99,255,0.15) 0, transparent 56%), var(--bg-elevated);
  box-shadow: var(--shadow-soft); padding: 1.8rem 1.6rem; position: relative; overflow: hidden;
}
.card::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at top, rgba(255,255,255,0.03), transparent 55%); opacity:0.9; pointer-events:none; }
.card-inner { position: relative; z-index:1; }

.hero-label { display:inline-flex; align-items:center; gap:0.45rem; padding:0.25rem 0.7rem; border-radius:999px; border:1px solid rgba(255,255,255,0.08); background: rgba(6,9,15,0.85); font-size:0.75rem; color:var(--text-muted); margin-bottom:0.9rem; }
.hero-label-dot { width:9px; height:9px; border-radius:999px; background:var(--accent); box-shadow: 0 0 16px rgba(61,217,196,0.9); }
.hero-title { font-size: clamp(1.9rem, 3vw, 2.4rem); line-height:1.15; letter-spacing:0.02em; margin-bottom:0.9rem; }
.hero-title span { background: linear-gradient(120deg,#3dd9c4,#ffffff,#b8befe); -webkit-background-clip:text; color:transparent; }
.hero-subtitle { font-size:0.94rem; line-height:1.6; color:var(--text-muted); max-width:34rem; margin-bottom:1.4rem; }

.hero-actions { display:flex; flex-wrap:wrap; gap:0.75rem; margin-bottom:1.3rem; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:0.4rem; padding:0.65rem 1.4rem; border-radius:999px; font-size:0.87rem; font-weight:500; border:1px solid transparent; cursor:pointer; background:none; color:inherit; transition: background var(--transition-fast), border-color var(--transition-fast), transform 120ms ease-out, box-shadow var(--transition-fast); }
.btn-primary { background: linear-gradient(135deg,#3dd9c4,#2ab4ea); color:#020308; box-shadow: 0 14px 30px rgba(0,0,0,0.65); }
.btn-primary:hover { transform: translateY(-1px) translateZ(0); box-shadow: 0 18px 40px rgba(0,0,0,0.8); }
.btn-ghost { border-color: rgba(255,255,255,0.16); background: rgba(6,9,15,0.88); color: var(--text-muted); }
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.26); color: var(--text-main); }
.btn-icon { font-size:1rem; transform: translateX(0); transition: transform var(--transition-fast); }
.btn:hover .btn-icon { transform: translateX(3px); }

.hero-meta { display:flex; flex-wrap:wrap; gap:1.2rem; font-size:0.8rem; color:var(--text-soft); }
.hero-meta-item { display:inline-flex; align-items:center; gap:0.35rem; padding:0.35rem 0.75rem; border-radius:999px; background: rgba(0,0,0,0.38); border:1px solid rgba(255,255,255,0.04); }
.hero-meta-dot { width:8px; height:8px; border-radius:999px; background: rgba(255,255,255,0.4); }
.hero-meta-dot.accent { background: var(--accent); box-shadow: 0 0 10px rgba(61,217,196,0.7); }

.hero-side { border-radius: var(--radius-xl); border:1px solid var(--border-subtle); background: radial-gradient(circle at top right, rgba(61,217,196,0.1) 0, transparent 60%), var(--bg-elevated-soft); box-shadow: var(--shadow-soft); padding:1.5rem 1.4rem; display:flex; flex-direction:column; gap:1rem; }
.hero-side-header { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.hero-side-title { font-size:0.94rem; font-weight:500; }
.hero-side-tag { font-size:0.7rem; padding:0.25rem 0.7rem; border-radius:999px; border:1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.5); color:var(--text-soft); }

.hero-side-grid { display:grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1.1fr); gap:0.85rem; }
@media (max-width: 820px) { .hero-side-grid { grid-template-columns: minmax(0,1fr); } }

.mini-card { border-radius: var(--radius-lg); padding:0.9rem 0.9rem 1rem; border:1px solid rgba(255,255,255,0.06); background: rgba(2,3,10,0.85); box-shadow: var(--shadow-subtle); display:flex; flex-direction:column; gap:0.4rem; }
.mini-card-label { font-size:0.75rem; text-transform:uppercase; letter-spacing:0.14em; color:var(--text-soft); }
.mini-card-title { font-size:0.9rem; font-weight:500; }
.mini-card-text { font-size:0.75rem; color:var(--text-muted); line-height:1.5; }
.pill-row { display:flex; flex-wrap:wrap; gap:0.4rem; margin-top:0.3rem; }
.pill { font-size:0.72rem; padding:0.25rem 0.55rem; border-radius:999px; border:1px solid rgba(255,255,255,0.08); background: rgba(8,10,18,0.9); color:var(--text-soft); }
.pill.accent { background: var(--accent-soft); border-color: rgba(61,217,196,0.5); color: #d9fffb; }

.genealogy-highlight { margin-top:0.25rem; padding:0.75rem 0.8rem; border-radius:16px; background: rgba(61,217,196,0.08); border:1px dashed rgba(61,217,196,0.55); font-size:0.75rem; color:#c9fffb; display:flex; flex-direction:column; gap:0.5rem; }
.genealogy-tag { font-size:0.7rem; letter-spacing:0.12em; text-transform:uppercase; opacity:0.85; }

/* Sections */
/* Prevent anchor targets being covered by a sticky header */
section, .section, h2, .anchor { scroll-margin-top: 72px; }

.section { padding: 0.4rem 0 2.3rem; }
.section-header { display:flex; justify-content:space-between; gap:1rem; align-items:baseline; margin-bottom:1.5rem; }
.section-title { font-size:1.1rem; font-weight:500; letter-spacing:0.05em; text-transform:uppercase; color:#d9d9e6; }
.section-subtitle { font-size:0.8rem; color:var(--text-soft); max-width:30rem; text-align:right; }
@media (max-width:720px) { .section-header { flex-direction:column; align-items:flex-start; } .section-subtitle { text-align:left; } }

.grid-3 { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:1rem; }
@media (max-width:920px) { .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width:620px) { .grid-3 { grid-template-columns: minmax(0,1fr); } }

.tile { border-radius: var(--radius-lg); padding:1rem 1rem 1.1rem; background: rgba(4,6,12,0.9); border:1px solid rgba(255,255,255,0.06); box-shadow: var(--shadow-subtle); display:flex; flex-direction:column; gap:0.4rem; transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background 140ms ease-out; }
.tile:hover { transform: translateY(-4px) translateZ(0); box-shadow: 0 14px 34px rgba(0,0,0,0.78); background: rgba(8,11,20,0.98); border-color: rgba(255,255,255,0.14); }
.tile-kicker { font-size:0.75rem; text-transform:uppercase; letter-spacing:0.16em; color:var(--text-soft); }
.tile-title { font-size:0.98rem; font-weight:500; }
.tile-text { font-size:0.8rem; color:var(--text-muted); line-height:1.5; }
.tile-footer { margin-top:0.5rem; font-size:0.76rem; color:var(--text-soft); display:flex; justify-content:space-between; align-items:center; gap:0.4rem; }

.dot-row { display:flex; gap:0.3rem; align-items:center; }
.tiny-dot { width:5px; height:5px; border-radius:50%; background: rgba(255,255,255,0.35); }
.tiny-dot.accent { background: var(--accent); }

/* Contact / footer-top */
.contact-card { border-radius: var(--radius-lg); padding:1.1rem 1rem; background: rgba(3,5,10,0.96); border:1px solid rgba(255,255,255,0.08); display:flex; flex-wrap:wrap; gap:0.9rem; align-items:center; justify-content:space-between; font-size:0.85rem; color:var(--text-muted); }
.contact-main { max-width:30rem; }
.contact-main strong { color: var(--text-main); }
.contact-actions { display:flex; align-items:center; padding-right:1.0rem; flex-wrap:wrap; gap:1.6rem; }
.chip { border-radius:999px; padding:0.4rem 0.9rem; border:1px solid rgba(255,255,255,0.09); font-size:0.78rem; background: rgba(7,10,18,0.96); color:var(--text-soft); }
.contact-email { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size:0.82rem; color:#e0e0ff; word-break:break-all; }

/* Footer */
.footer { border-top:1px solid rgba(255,255,255,0.08); background: rgba(2,3,6,0.98); margin-top:auto; }
.footer-inner { display:flex; flex-direction:column; gap:1rem; padding-top:1.2rem; padding-bottom:1.4rem; font-size:0.78rem; color:var(--text-soft); }
.footer-top { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; align-items:center; }
.footer-links { display:flex; flex-wrap:wrap; gap:0.6rem; }
.footer-link { padding:0.25rem 0.55rem; border-radius:999px; border:1px solid transparent; cursor:pointer; transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform 120ms ease-out; }
.footer-link:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); color:var(--text-main); transform: translateY(-1px); }

.footer-bottom { display:flex; justify-content:space-between; flex-wrap:wrap; gap:0.5rem; align-items:center; border-top:1px dashed rgba(255,255,255,0.12); padding-top:0.9rem; }
.footer-meta { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; }
.footer-dot { width:4px; height:4px; border-radius:10px; background: rgba(255,255,255,0.35); }
.footer-social { display:flex; gap:0.5rem; flex-wrap:wrap; }
.footer-social a { padding:0.25rem 0.45rem; border-radius:999px; border:1px solid rgba(255,255,255,0.13); font-size:0.76rem; color:var(--text-soft); }
.footer-social a:hover { background: rgba(255,255,255,0.08); color:var(--text-main); }
