/* ============================================================
   Fradley — split "his & hers" front door + profile reveals
   Dom (indigo/violet) · Anna (rose/coral) · Family Hub at the seam
   ============================================================ */

html, body { height: 100%; }
body { overflow: hidden; }

/* ---------- top bar (over the split) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem clamp(1.2rem, 4vw, 2.5rem);
  pointer-events: none;
}
.topbar .brand-mark, .topbar .theme-toggle { pointer-events: auto; }
.topbar .brand-mark { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.topbar .theme-toggle { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(8px); }
.topbar .theme-toggle:hover { color: #fff; background: rgba(255,255,255,.22); }

/* ============================================================
   SPLIT
   ============================================================ */
.split { height: 100vh; display: flex; }

.panel-dom  { --p: #2870e6; --p2: #12b2cc; }
.panel-anna { --p: #f4701c; --p2: #fbac3a; }

.panel {
  position: relative; flex: 1 1 50%; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff;
  background: linear-gradient(155deg, var(--p), var(--p2));
  transition: flex-grow .55s cubic-bezier(.4,0,.2,1), filter .45s ease;
}
.panel::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(165deg, rgba(0,0,0,.12), rgba(0,0,0,.5));
}
.panel-glow {
  position: absolute; z-index: 0; width: 65vh; height: 65vh; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.4), transparent 60%);
  filter: blur(60px); opacity: .22; animation: floaty 17s ease-in-out infinite alternate;
}
.panel-anna .panel-glow { animation-delay: -8s; }
.panel-initial {
  position: absolute; z-index: 1; bottom: -8vh; right: -2vw; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: 46vh; line-height: 1;
  color: rgba(255,255,255,.07);
}
.panel-inner { position: relative; z-index: 2; text-align: center; padding: 2rem; max-width: 30ch; }
.panel-eyebrow { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.panel-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 9vw, 7rem); line-height: 1; letter-spacing: -.03em; margin: .35rem 0; }
.panel-tag { font-size: clamp(.95rem, 1.5vw, 1.15rem); opacity: .92; }
.panel-enter {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.7rem;
  font-weight: 600; font-size: .95rem; padding: .6rem 1.25rem; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.5); transition: gap .25s ease, background .25s ease, border-color .25s ease;
}
.panel:hover .panel-enter { background: rgba(255,255,255,.16); border-color: transparent; gap: .85rem; }

/* desktop hover grow */
@media (hover: hover) and (min-width: 760px) {
  .split:hover .panel { flex-grow: .82; filter: saturate(.85) brightness(.66); }
  .split .panel:hover { flex-grow: 1.55; filter: none; }
}

/* staggered entrance */
.panel-inner > * { animation: riseIn .7s ease both; }
.panel-inner > *:nth-child(2) { animation-delay: .05s; }
.panel-inner > *:nth-child(3) { animation-delay: .1s; }
.panel-inner > *:nth-child(4) { animation-delay: .15s; }

/* ---------- the seam: Family Hub ---------- */
.seam {
  position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  text-decoration: none; color: #fff;
}
.seam-badge {
  position: relative; width: 86px; height: 86px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(14, 17, 24, .72); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.28); box-shadow: 0 14px 44px rgba(0,0,0,.45);
  transition: transform .3s ease, box-shadow .3s ease;
}
.seam-badge .monogram { box-shadow: none; width: 48px; height: 48px; font-size: 1.5rem; }
.seam-badge::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); animation: pulse 2.8s ease-out infinite;
}
.seam-label {
  font-size: .78rem; font-weight: 600; letter-spacing: .03em;
  background: rgba(14, 17, 24, .6); padding: .28rem .8rem; border-radius: 999px; backdrop-filter: blur(8px);
}
.seam:hover .seam-badge { transform: scale(1.09); box-shadow: 0 0 0 7px rgba(255,255,255,.12), 0 14px 44px rgba(0,0,0,.5); }

/* ---------- footer ---------- */
.foot {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  text-align: center; padding: 1rem; font-size: .76rem;
  color: rgba(255,255,255,.6); pointer-events: none; text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

/* ============================================================
   PROFILE REVEAL (CSS :target — works without JS)
   ============================================================ */
.profile {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto;
  background: var(--bg);
  opacity: 0; visibility: hidden; transform: translateY(30px);
  transition: opacity .5s ease, transform .55s cubic-bezier(.4,0,.2,1), visibility .55s;
}
.profile:target { opacity: 1; visibility: visible; transform: none; }
.profile-dom  { --p: #2870e6; --p2: #12b2cc; }
.profile-anna { --p: #f4701c; --p2: #fbac3a; }
.profile::before {
  content: ""; position: sticky; top: 0; display: block; height: 5px;
  background: linear-gradient(90deg, var(--p), var(--p2)); z-index: 3;
}
.profile-scroll { max-width: 920px; margin: 0 auto; padding: 1.4rem clamp(1.2rem, 5vw, 2rem) 4rem; }

.back-btn {
  position: sticky; top: 1rem; display: inline-flex; align-items: center; gap: .4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .5rem 1.05rem; font-weight: 600; font-size: .9rem; color: var(--text);
  text-decoration: none; box-shadow: var(--shadow-sm); z-index: 4;
}
.back-btn:hover { color: var(--p); border-color: var(--p); }

.profile-hero { padding-top: 1.8rem; }
.avatar-mark {
  width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: -.02em;
  background: linear-gradient(145deg, var(--p), var(--p2)); box-shadow: 0 14px 40px rgba(0,0,0,.2);
}
.profile-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.025em; margin-top: 1.1rem; }
.profile .role { color: var(--p); font-weight: 600; font-size: 1.05rem; margin-top: .3rem; }
.profile .loc { color: var(--text-faint); margin-top: .2rem; font-size: .92rem; }
.profile .bio { color: var(--text-soft); margin-top: 1.2rem; max-width: 64ch; font-size: 1.02rem; }
.profile .cta { display: flex; gap: .7rem; margin-top: 1.7rem; flex-wrap: wrap; }
.btn.pbtn { background: linear-gradient(135deg, var(--p), var(--p2)); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.btn.pbtn:hover { filter: brightness(1.06); }

.profile-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2.8rem; }
.pcol h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: .9rem; }
.pcol h3:not(:first-child) { margin-top: 2rem; }

.timeline .tl-item { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--border); }
.timeline .tl-item:first-child { border-top: none; }
.tl-when { color: var(--text-faint); font-size: .85rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }
.tl-role { font-weight: 600; }
.tl-co { color: var(--text-soft); font-size: .9rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .42rem .9rem; font-size: .82rem; color: var(--text-soft); font-weight: 500; }
.pill.cert { background: transparent; border-color: var(--p); color: var(--p); }

/* ============================================================
   responsive — stack the split on small screens
   ============================================================ */
@media (max-width: 760px) {
  /* two clean 50/50 panels that fit one screen — no scroll */
  html, body { overflow: hidden; height: 100%; }
  .topbar { position: absolute; }
  .split { flex-direction: column; height: 100dvh; }
  .panel { flex: 1 1 50%; min-height: 0; padding: 3.2rem 1.4rem 1.4rem; }
  .panel-eyebrow { font-size: .72rem; }
  .panel-name { font-size: clamp(2.1rem, 11vw, 3.2rem); margin: .15rem 0; }
  .panel-tag { font-size: .95rem; }
  .panel-enter { margin-top: 1rem; }
  .panel-initial { font-size: 23vh; bottom: -2vh; }
  .foot { display: none; }

  .profile-grid { grid-template-columns: 1fr; }
  .timeline .tl-item { grid-template-columns: 1fr; gap: .15rem; }
  .tl-when { padding-top: 0; }
}

/* ============================================================
   motion
   ============================================================ */
@keyframes floaty { from { transform: translate(-12%, -10%); } to { transform: translate(12%, 14%); } }
@keyframes pulse { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .panel-glow, .seam-badge::before { animation: none; }
  .panel-inner > * { animation: none; }
  .panel, .profile { transition: none; }
}
