:root {
  --text: #0f2547;
  --muted: rgba(15, 37, 71, 0.72);
  --accent: #0a7f5a;
  --pill-bg: rgba(255,255,255,0.78);
  --pill-border: rgba(15, 37, 71, 0.18);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #f3f7ff;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  opacity: .52;
}
.video-vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 15%, rgba(224, 242, 255, 0.55), rgba(255,255,255,0.25) 45%, rgba(245,250,255,0.75)),
    linear-gradient(to bottom, rgba(252, 254, 255, 0.58), rgba(239, 246, 255, 0.68));
}

.topbar {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(12, 36, 84, 0.08);
}
.name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: #111827;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions a {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--pill-bg);
}
.actions a:hover { background: rgba(255,255,255,0.96); }

.end-panel {
  min-height: 58vh;
  padding-top: 56px;
}
.end-links {
  justify-content: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.8);
  background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(245,250,255,0.72));
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px rgba(12, 36, 84, 0.14);
}
.end-links a {
  font-size: 17px;
  font-weight: 650;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(15, 37, 71, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,249,255,0.92));
  box-shadow: 0 6px 14px rgba(12, 36, 84, 0.1);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.end-links a:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,252,255,0.96));
  box-shadow: 0 10px 18px rgba(12, 36, 84, 0.14);
}
.end-links a:active { transform: translateY(0); }
.end-links a:focus-visible {
  outline: 2px solid rgba(10,127,90,0.35);
  outline-offset: 2px;
}
.end-links a:nth-child(3) { color: #0a7f5a; }
.end-links a:nth-child(3):hover { color: #086c4d; }

.story { position: relative; z-index: 10; }
.panel {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 88px 24px 52px;
}
.panel-inner {
  display: grid;
  justify-items: center;
  gap: 18px;
}
.panel p {
  margin: 0;
  max-width: 940px;
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 3.5rem);
  line-height: 1.14;
  font-weight: 650;
  opacity: .2;
  transform: translateY(10px) scale(.985);
  transition: all .55s ease;
  text-wrap: balance;
  color: rgba(15, 37, 71, 0.55);
}
.panel.active p {
  opacity: 1;
  transform: translateY(0) scale(1);
  color: var(--text);
  text-shadow: 0 6px 24px rgba(255,255,255,.42);
}

.logo-inline {
  width: min(220px, 52vw);
  max-height: 70px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(6px);
  transition: all .45s ease;
  filter: saturate(0.9);
}
.panel.active .logo-inline {
  opacity: .9;
  transform: translateY(0);
}

.logo-stanford {
  width: min(190px, 46vw);
  margin-top: 10px;
}

.logo-ucla {
  width: min(320px, 76vw);
  max-height: 120px;
  margin-top: 34px;
}

.logo-agile {
  width: min(300px, 72vw);
  max-height: 96px;
  margin-top: 32px;
}

.logo-stanford-med {
  width: min(230px, 54vw);
  max-height: 138px;
  margin-top: 28px;
}

.logo-claude {
  width: min(210px, 48vw);
  max-height: 92px;
  margin-top: 20px;
}

.logo-vapor {
  width: min(125px, 30vw);
  max-height: 125px;
  margin-top: 16px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(12, 36, 84, 0.18);
}

.thesis p {
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  font-weight: 800;
  color: var(--accent);
}

.inline-link { color: #0d5ca3; text-underline-offset: 3px; }

.music-toggle {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 22;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(12, 36, 84, 0.08);
  white-space: nowrap;
}
.music-toggle:hover { background: rgba(255,255,255,.95); }

.hint {
  position: fixed;
  bottom: 18px;
  left: 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 20;
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; gap: 8px; flex-direction: column; }
  .actions { justify-content: center; }
  .end-links { flex-direction: column; align-items: stretch; width: min(92vw, 420px); gap: 10px; padding: 14px; }
  .end-links a { text-align: center; font-size: 16px; padding: 12px 16px; }
  .music-toggle { width: auto; }
  .hint { bottom: 58px; }
  .panel p { font-size: clamp(1.45rem, 7vw, 2.35rem); }
}
