:root {
  --bg: #ffffff;
  --ink: #1f1418;
  --muted: #6b5a60;
  --line: #efe4e7;
  --wash: #fbf3f5;
  --burgundy: #7b1e3a;
  --burgundy-deep: #4e1024;
  --rose: #b2456a;
  --blush: #e8b9c7;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1080px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

::selection {
  background: var(--burgundy);
  color: #fff;
}

a {
  color: inherit;
}

em {
  font-style: italic;
  color: var(--burgundy);
}

/* ── Scroll progress ("voltage") bar ───────────────── */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--rose), var(--burgundy));
}

@supports (animation-timeline: scroll()) {
  .progress {
    animation: grow linear both;
    animation-timeline: scroll(root);
  }
  @keyframes grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

/* ── Nav ───────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(env(safe-area-inset-top) + 14px) var(--gutter) 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, padding 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--line);
}

.mono {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--burgundy);
  color: #fff;
  font: 600 15px/1 var(--serif);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.hz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.08em;
  color: var(--burgundy);
}

.hz svg {
  width: 30px;
  height: 12px;
  overflow: hidden;
}

.hz path {
  fill: none;
  stroke: var(--rose);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  animation: hz 0.8s linear infinite;
}

@keyframes hz {
  to { stroke-dashoffset: -20; }
}

.nav nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.nav nav a:hover {
  color: var(--burgundy);
  background: var(--wash);
}

.nav nav .nav-cta {
  color: var(--burgundy);
  border: 1px solid var(--blush);
}

@media (max-width: 560px) {
  .nav nav a:not(.nav-cta) {
    display: none;
  }
}

/* ── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--gutter) 200px;
  max-width: var(--max);
  margin: 0 auto;
}

.hero::before {
  /* soft burgundy glow behind the name */
  content: '';
  position: absolute;
  z-index: -1;
  top: 8%;
  right: -20%;
  width: min(70vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(178, 69, 106, 0.16), rgba(178, 69, 106, 0) 65%);
  animation: breathe 9s ease-in-out infinite alternate;
}

@keyframes breathe {
  to { transform: translate(-6%, 8%) scale(1.12); }
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}

.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 17vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 144;
}

.name .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.name .word {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1.1s var(--ease) forwards;
}

.name .line:nth-child(2) .word {
  animation-delay: 0.12s;
}

.name em {
  font-weight: 300;
}

.name .aka {
  display: inline-block;
  vertical-align: 0.9em;
  margin-left: 0.1em;
  font: italic 300 0.26em/1 var(--serif);
  letter-spacing: 0;
  color: var(--rose);
}

@keyframes rise {
  to { transform: none; }
}

.lede {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.5;
  color: var(--muted);
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(transparent 62%, rgba(232, 185, 199, 0.6) 62%);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s, box-shadow 0.25s, color 0.25s;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: var(--burgundy);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(123, 30, 58, 0.6);
}

.btn.primary:hover {
  background: var(--burgundy-deep);
  box-shadow: 0 14px 34px -10px rgba(78, 16, 36, 0.7);
}

.btn.ghost {
  color: var(--burgundy);
  border: 1px solid var(--blush);
  background: #fff;
}

.btn.ghost:hover {
  background: var(--wash);
}

.btn.light {
  background: #fff;
  color: var(--burgundy);
}

.btn.light:hover {
  background: var(--wash);
}

/* Three-phase waves */
.phases {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  width: 100%;
  height: 160px;
  overflow: visible;
  pointer-events: none;
}

.ph {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  animation: flow 6s linear infinite;
}

.ph-a { stroke: var(--burgundy); }
.ph-b { stroke: var(--rose); opacity: 0.7; animation-delay: -2s; }
.ph-c { stroke: var(--blush); animation-delay: -4s; }

.ph-pulse {
  stroke: var(--burgundy);
  stroke-width: 4;
  stroke-dasharray: 60 1540;
  filter: drop-shadow(0 0 6px rgba(178, 69, 106, 0.8));
  animation: pulse 3.2s linear infinite, flow 6s linear infinite;
}

@keyframes flow {
  from { transform: translateX(0); }
  to { transform: translateX(-400px); }
}

@keyframes pulse {
  from { stroke-dashoffset: 1600; }
  to { stroke-dashoffset: 0; }
}

/* ── Marquee ───────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--wash);
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.track span {
  font: italic 400 clamp(22px, 3vw, 30px)/1 var(--serif);
  color: var(--burgundy);
  white-space: nowrap;
}

.track i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ── Sections ──────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) var(--gutter) 0;
  scroll-margin-top: 40px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}

.title {
  margin: 0;
  font: 400 clamp(40px, 7vw, 76px)/1 var(--serif);
  letter-spacing: -0.03em;
}

.section-lede {
  max-width: 52ch;
  margin: 20px 0 0;
  font-size: 18px;
  color: var(--muted);
}

/* Education timeline: a vertical bus bar with a breaker per feeder. The bar
   "energizes" (fills burgundy) as it scrolls through the viewport. */
.bus {
  position: relative;
  list-style: none;
  margin: 56px 0 0;
  padding: 0 0 0 44px;
  display: grid;
  gap: 28px;
}

.bus::before,
.bus::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px;
}

.bus::before {
  background: var(--line);
}

.bus::after {
  background: linear-gradient(var(--rose), var(--burgundy));
  transform-origin: top;
  transform: scaleY(var(--energy, 0));
  transition: transform 0.2s linear;
}

@supports (animation-timeline: view()) {
  .bus::after {
    transition: none;
    animation: energize linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 65%;
  }
  @keyframes energize {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
  }
}

.feeder {
  position: relative;
}

.breaker {
  position: absolute;
  left: -44px;
  top: 28px;
  width: 29px;
  height: 29px;
  border: 3px solid var(--burgundy);
  border-radius: 7px;
  background: #fff;
  transition: background-color 0.4s 0.3s, transform 0.4s 0.3s var(--ease);
}

.breaker::after {
  /* the switch blade: open until the feeder is in view, then closes */
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 15px;
  margin: -7.5px 0 0 -1.5px;
  border-radius: 2px;
  background: var(--burgundy);
  transform: rotate(-45deg);
  transition: transform 0.5s 0.3s var(--ease), background-color 0.4s 0.3s;
}

.feeder.in .breaker {
  background: var(--burgundy);
  transform: scale(1.05);
}

.feeder.in .breaker::after {
  transform: rotate(0deg);
  background: #fff;
}

.card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(31, 20, 24, 0.03), 0 24px 48px -32px rgba(123, 30, 58, 0.35);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--blush);
    box-shadow: 0 1px 0 rgba(31, 20, 24, 0.03), 0 30px 60px -30px rgba(123, 30, 58, 0.45);
  }
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.years {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--rose);
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--burgundy);
  font-size: 13px;
  font-weight: 700;
}

.card h3 {
  margin: 14px 0 6px;
  font: 400 clamp(26px, 4vw, 36px)/1.12 var(--serif);
  letter-spacing: -0.02em;
}

.school {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.blurb {
  margin: 14px 0 0;
  max-width: 60ch;
  color: var(--muted);
}

.chips {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--burgundy);
  background: #fff;
  transition: background-color 0.2s, border-color 0.2s;
}

.chips li:hover {
  background: var(--wash);
  border-color: var(--blush);
}

/* Focus tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 48px;
}

.tile {
  position: relative;
  padding: 28px;
  border-radius: 24px;
  background: var(--wash);
  overflow: hidden;
  isolation: isolate;
}

.tile::before {
  /* burgundy flood that rises on hover / tap */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--burgundy);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}

.tile svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--burgundy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s;
}

.tile h3 {
  margin: 18px 0 8px;
  font: 400 26px/1.15 var(--serif);
  letter-spacing: -0.01em;
  transition: color 0.4s;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  transition: color 0.4s;
}

.tile:hover::before,
.tile:focus-within::before,
.tile.lit::before {
  transform: none;
}

.tile:hover svg,
.tile.lit svg {
  stroke: #fff;
}

.tile:hover h3,
.tile.lit h3 {
  color: #fff;
}

.tile:hover p,
.tile.lit p {
  color: rgba(255, 255, 255, 0.85);
}

/* ── Contact ───────────────────────────────────────── */
.contact {
  position: relative;
  margin: clamp(80px, 12vw, 140px) auto 0;
  max-width: calc(var(--max) - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px);
  border-radius: 32px;
  background: radial-gradient(120% 140% at 100% 0%, var(--rose) 0%, var(--burgundy) 45%, var(--burgundy-deep) 100%);
  color: #fff;
  overflow: hidden;
}

.contact h2 {
  position: relative;
  margin: 0;
  font: 400 clamp(44px, 8vw, 88px)/1 var(--serif);
  letter-spacing: -0.03em;
}

.contact h2 em {
  color: var(--blush);
}

.contact p {
  position: relative;
  margin: 16px 0 32px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.contact .btn {
  position: relative;
}

.contact-wave {
  position: absolute;
  right: -10%;
  bottom: 12%;
  width: 70%;
  height: 120px;
  opacity: 0.25;
}

.contact-wave path {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-dasharray: 8 10;
  animation: hz 1.2s linear infinite;
}

/* ── Footer ────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) calc(env(safe-area-inset-bottom) + 40px);
  color: var(--muted);
  font-size: 14px;
}

/* ── Reveal on scroll ──────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.hero .reveal:nth-of-type(1) { transition-delay: 0.05s; }
.hero .lede.reveal { transition-delay: 0.35s; }
.hero .cta.reveal { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .name .word,
  .js .reveal {
    transform: none;
    opacity: 1;
  }
  .bus::after {
    transform: scaleY(1);
  }
}
