/* ---------- Tokens ---------- */
:root {
  --bg: #FBF7F1;          /* warm paper */
  --bg-alt: #F3ECE2;      /* sand */
  --ink: #1F1B2E;         /* deep ink */
  --ink-soft: #5B5568;
  --line: #E4DACB;
  --accent: #E0603E;      /* coral / terracotta */
  --accent-soft: #F7D9CC;
  --sea: #E0247A;         /* strong pink, labels (was teal) */
  --sea-soft: #FAD6E6;
  --card: #FFFFFF;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1120px;
  --gutter: clamp(16px, 5vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 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-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent-soft); }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; }
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--sea), var(--accent));
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(251, 247, 241, .86); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.mark { font-family: var(--serif); font-size: 26px; font-weight: 600; text-decoration: none; letter-spacing: -.02em; }
.mark span { color: var(--accent); }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); align-items: center; }
.site-header nav a { text-decoration: none; font-size: 15px; font-weight: 500; position: relative; }
.site-header nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.site-header nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg) !important; transition: background .25s; }
.nav-cta:hover { background: var(--accent); }

/* ---------- Act rail ---------- */
.act-rail {
  position: fixed; left: calc(var(--gutter) * .6); top: 50%; transform: translateY(-50%);
  z-index: 30; display: none; opacity: 0; transition: opacity .4s;
}
.act-rail.visible { opacity: 1; }
.act-rail .rail-line { position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.act-rail .rail-fill { display: block; width: 100%; height: 100%; background: linear-gradient(var(--accent), #7B4FA0, #3C4F9E); transform-origin: top; transform: scaleY(var(--rail, 0)); }
.act-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 64px; position: relative; }
.act-rail li { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); transition: color .3s; }
.act-rail li span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--line); font-family: var(--serif); font-size: 13px; text-transform: none; letter-spacing: 0;
  transition: all .3s var(--ease);
}
.act-rail li.active { color: var(--ink); }
.act-rail li.active span { border-color: var(--accent); background: var(--accent); color: #fff; transform: scale(1.12); }
.act-rail li[data-rail="act-2"].active span { border-color: #7B4FA0; background: #7B4FA0; }
.act-rail li[data-rail="act-3"].active span { border-color: #3C4F9E; background: #3C4F9E; }
@media (min-width: 1240px) { .act-rail { display: block; } }

/* ---------- Layout helpers ---------- */
section { scroll-margin-top: 60px; padding: clamp(80px, 12vw, 160px) var(--gutter); position: relative; }
section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.eyebrow, .act-kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--sea); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 120px; overflow: hidden; }
.hero > * { width: 100%; }
.hero-blob {
  position: absolute; width: min(70vw, 720px); aspect-ratio: 1; right: -12vw; top: 8vh; max-width: none;
  background: radial-gradient(circle at 35% 35%, var(--accent-soft), transparent 60%),
              radial-gradient(circle at 70% 65%, var(--sea-soft), transparent 55%);
  filter: blur(20px); border-radius: 50%; z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-6vw, 6vh) rotate(25deg) scale(1.08); } }
.hero-title {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1.02;
  font-size: clamp(44px, 8.4vw, 116px); margin: 22px auto 30px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.loaded .hero-title .line > span { transform: none; }
.loaded .hero-title .line:nth-child(2) > span { transition-delay: .12s; }
.loaded .hero-title .line:nth-child(3) > span { transition-delay: .24s; }
.hero-sub { max-width: 620px; margin-left: 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); }
.hero > .hero-sub, .hero > .eyebrow, .hero > .scroll-cue { margin-left: max(0px, calc((100% - var(--max)) / 2)); }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 48px; width: max-content;
  text-decoration: none; font-weight: 500; font-size: 15px;
}
.scroll-cue svg { animation: bob 2s ease-in-out infinite; color: var(--accent); }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---------- Acts ---------- */
/* Each act has its own palette */
.act { --act-bg: var(--bg); --act-accent: var(--accent); --act-soft: var(--accent-soft); --act-kicker: var(--sea); --act-line: var(--line); --act-turn: #FFF4EF;
  background: var(--act-bg); border-top: 1px solid var(--act-line); }
#act-2 { --act-bg: #F1ECF7; --act-accent: #7B4FA0; --act-soft: #DDD0EC; --act-kicker: #7B4FA0; --act-line: #E2D8EE; }
#act-3 { --act-bg: #E9EFF8; --act-accent: #3C4F9E; --act-soft: #CCD7EE; --act-kicker: #3C4F9E; --act-line: #D3DDEE; --act-turn: #F4F6FD; }
.act .act-kicker { color: var(--act-kicker); }
.act-head { position: relative; margin-bottom: clamp(48px, 7vw, 88px); }
.act-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: clamp(24px, 4vw, 56px); align-items: center; }
.act-head > :not(.act-art) { grid-column: 1; }
.act-art {
  grid-column: 2; grid-row: 1 / span 3; align-self: center; position: relative; z-index: 0;
  color: var(--act-accent); pointer-events: none;
}
.act-art::before {
  content: ""; position: absolute; inset: 6% 2%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--act-soft) 0%, transparent 70%); opacity: .8;
}
.act-svg { display: block; width: 100%; height: auto; transform: translateY(var(--parallax, 0px)); opacity: .85; }
.act-svg .art-fill { fill: var(--act-soft); }
.act-svg .art-fill-soft { fill: color-mix(in srgb, var(--act-soft) 55%, transparent); }
.act-svg .art-fill-white { fill: rgba(255, 255, 255, .75); }
.art-pulse { animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.art-walk { animation: walk 9s ease-in-out infinite alternate; }
@keyframes walk { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
.act-title {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; line-height: 1;
  font-size: clamp(48px, 8vw, 104px); margin: 14px 0 22px;
}
.act-lede { max-width: 640px; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; }

.chapters { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.chapter {
  background: var(--card); border: 1px solid var(--act-line); border-radius: 20px; padding: 28px 28px 32px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.chapter:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -22px rgba(31, 27, 46, .35); border-color: var(--act-soft); }
.chapter header { margin-bottom: 14px; }
.when { font-size: 13px; font-weight: 600; color: var(--act-accent, var(--accent)); letter-spacing: .04em; }
.chapter h3, .story h3 { font-family: "Comfortaa", var(--sans); font-weight: 700; font-size: 25px; line-height: 1.25; letter-spacing: -.01em; margin: 8px 0 4px; }
.role { font-size: 14px; color: var(--ink-soft); }
.chapter p { color: var(--ink-soft); font-size: 16px; }

.act-quote {
  margin: clamp(56px, 8vw, 96px) auto 0; max-width: 860px; text-align: center;
  font-family: "Comfortaa", var(--sans); font-weight: 700; line-height: 1.6;
  font-size: clamp(22px, 2.8vw, 34px); letter-spacing: -.01em; color: var(--ink);
}
.act-quote span {
  --neon: #FF5E57;
  padding: 0 .15em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image:
    linear-gradient(var(--neon), var(--neon)),
    linear-gradient(color-mix(in srgb, var(--neon) 16%, transparent), color-mix(in srgb, var(--neon) 16%, transparent));
  background-repeat: no-repeat;
  background-position: 0 92%, 0 100%;
  background-size: 0% 3px, 0% 45%;
  transition: background-size 1.2s var(--ease) .35s;
}
.act-quote.in span { background-size: 100% 3px, 100% 45%; }

/* Act III: feature stories */
.act-feature { border-top: 0; }
.story {
  border-top: 1px solid var(--act-line);
  padding: clamp(36px, 5vw, 56px) 0;
  display: grid; gap: 28px; grid-template-columns: 1fr;
}
.story-hook { font-family: var(--serif); font-size: 22px; color: var(--act-accent); margin-top: 18px; }
.story header { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; row-gap: 2px; }
.story header .when { flex-basis: 100%; }
.story header .story-hook { flex-basis: 100%; margin-top: 4px; }
.story-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px; counter-reset: step; }
.step {
  counter-increment: step; position: relative;
  background: var(--card); border: 1px solid var(--act-line); border-radius: 18px; padding: 24px 24px 26px;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(31, 27, 46, .35); }
.step h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--act-accent); margin-bottom: 10px; font-weight: 600; }
.step h4::before { content: "0" counter(step) "  "; opacity: .55; white-space: pre; }
.step p { color: var(--ink-soft); font-size: 16px; }
.step-turn { background: var(--act-turn); border-color: var(--act-soft); }

/* Flow: cards light up 1 -> 2 -> 3 -> 4 with arrows drawing between them */
.step::after {
  content: ""; position: absolute; top: 50%; right: -38px; width: 32px; height: 20px; margin-top: -10px;
  background: var(--act-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20'%3E%3Cpath d='M2 10h24M19 3l7 7-7 7' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20'%3E%3Cpath d='M2 10h24M19 3l7 7-7 7' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform-origin: left center; transform: scaleX(0); opacity: 0;
}
.step:last-child::after { display: none; }
.story .step { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .4s var(--ease); }
.story.in .step { opacity: 1; transform: none; }
.story.in .step:nth-child(1) { transition-delay: .15s; }
.story.in .step:nth-child(2) { transition-delay: .75s; }
.story.in .step:nth-child(3) { transition-delay: 1.35s; }
.story.in .step:nth-child(4) { transition-delay: 1.95s; }
.story.in .step::after { animation: arrow-draw .5s var(--ease) forwards, arrow-nudge 1.8s ease-in-out infinite; }
.story.in .step:nth-child(1)::after { animation-delay: .55s, 2.8s; }
.story.in .step:nth-child(2)::after { animation-delay: 1.15s, 3.0s; }
.story.in .step:nth-child(3)::after { animation-delay: 1.75s, 3.2s; }
.story.in .step:hover { transform: translateY(-4px); transition-delay: 0s; }
@keyframes arrow-draw { to { transform: scaleX(1); opacity: 1; } }
@keyframes arrow-nudge { 0%, 100% { transform: translateX(0) scaleX(1); opacity: 1; } 50% { transform: translateX(5px) scaleX(1); opacity: 1; } }

/* ---------- About ---------- */
.about { background: var(--bg-alt); }
.about-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; margin-bottom: clamp(72px, 10vw, 120px); }
.profile-card { margin: 0; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(31, 27, 46, .45); border: 1px solid var(--line); }
.profile-banner { height: 170px; background: linear-gradient(120deg, #F7D9CC 0%, #DDD0EC 50%, #CCD7EE 100%); overflow: hidden; }
.profile-banner svg { width: 100%; height: 100%; display: block; }
.planet { transform-box: fill-box; transform-origin: center; animation: float 7s ease-in-out infinite alternate; }
.planet.p2 { animation-duration: 5s; } .planet.p3 { animation-duration: 9s; animation-delay: -2s; } .planet.p4 { animation-duration: 6s; animation-delay: -1s; }
@keyframes float { to { transform: translateY(-8px); } }
.orbit { animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -320; } }
.profile-avatar {
  display: block; width: 176px; height: 176px; border-radius: 50%; object-fit: cover;
  margin: -96px 0 0 28px; position: relative; border: 6px solid var(--card); background: var(--card);
  box-shadow: 0 10px 30px -14px rgba(31, 27, 46, .5);
}
.profile-card figcaption { padding: 16px 28px 28px; display: grid; gap: 2px; }
.profile-card figcaption strong { font-family: var(--serif); font-size: 26px; font-weight: 500; }
.profile-card figcaption span { color: var(--ink-soft); font-size: 15px; }
.about-text p:not(.eyebrow) { color: var(--ink-soft); margin-bottom: 16px; max-width: 600px; }
.about-text .section-title { margin: 12px 0 24px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; letter-spacing: .03em; text-decoration: none; transition: background .25s, color .25s, transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #C94F2F; }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.subsection-title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.5vw, 44px); letter-spacing: -.02em; margin-bottom: 32px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 64px); letter-spacing: -.02em; margin-bottom: 48px; }
.pillars { list-style: none; padding: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line); }
.pillars li { padding: 28px 24px 32px 0; border-bottom: 1px solid var(--line); }
.pillar-num { font-family: var(--serif); font-weight: 600; color: var(--accent); font-size: 20px; }
.pillars h3 { font-size: 20px; font-weight: 600; margin: 8px 0 8px; }
.pillars p { color: var(--ink-soft); font-size: 16px; }
.facts { margin: 48px auto 0; display: grid; gap: 18px; font-size: 15px; }
.facts div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
.facts dt { font-weight: 600; color: var(--sea); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink-soft); }

/* ---------- Bookshelf ---------- */
.shelf { border-top: 1px solid var(--line); }
.shelf .section-title { margin-top: 12px; }
.shelf-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 80px); }
.shelf-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--ink-soft); margin-bottom: 20px; }
.books { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.book { display: flex; flex-direction: column; gap: 4px; }
.book-cover {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; margin-bottom: 10px;
  border-radius: 3px 8px 8px 3px; box-shadow: inset 4px 0 0 rgba(0,0,0,.08), 0 14px 28px -16px rgba(31, 27, 46, .55);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.book:hover .book-cover { transform: translateY(-8px) rotate(-1.5deg); box-shadow: 0 26px 40px -20px rgba(31, 27, 46, .55); }
.book h4 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.book p { font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.podcasts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.podcasts a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500;
  transition: padding .3s var(--ease), color .3s;
}
.podcasts a:hover { padding-left: 12px; color: #1DB954; }
.pod-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #1DB954; }
.pod-arrow { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); text-align: center; padding-bottom: clamp(100px, 14vw, 180px); }
.contact-title { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 7vw, 96px); line-height: 1.05; letter-spacing: -.03em; margin: 18px auto 40px; }
.contact-mail {
  display: inline-block; font-size: clamp(18px, 2.4vw, 26px); font-weight: 500; text-decoration: none;
  padding: 16px 30px; border-radius: 999px; background: var(--ink); color: var(--bg);
  transition: background .3s, transform .3s var(--ease); word-break: break-all;
}
.contact-mail:hover { background: var(--accent); transform: translateY(-3px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.contact-linkedin {
  display: inline-flex; align-items: center; gap: 10px; font-size: clamp(18px, 2.4vw, 26px); font-weight: 500; text-decoration: none;
  padding: 16px 30px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.contact-linkedin:hover { background: #0A66C2; border-color: #0A66C2; color: #fff; transform: translateY(-3px); }
.footer-links { display: inline-flex; gap: 20px; }
.contact-meta { margin-top: 18px; color: var(--ink-soft); font-size: 15px; }

.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft);
}
.site-footer a { text-decoration: none; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) and (min-width: 861px) {
  .story-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
  .act-head { grid-template-columns: 1fr; }
  .act-art { grid-column: 1; grid-row: auto; order: -1; width: min(300px, 80%); margin-bottom: 8px; }
  .about-intro { grid-template-columns: 1fr; }
  .profile-card { max-width: 440px; }
  .story-steps { grid-template-columns: 1fr; gap: 40px; }
  .step::after { top: auto; bottom: -34px; right: auto; left: 50%; margin: 0 0 0 -16px; transform-origin: center top; rotate: 90deg; }
  .shelf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .site-header nav a:not(.nav-cta) { display: none; }
  .chapter { padding: 22px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .btn { flex: 1 1 100%; }
  .profile-banner { height: 130px; }
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .profile-avatar { width: 140px; height: 140px; margin-top: -76px; margin-left: 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-title .line > span, .story .step { opacity: 1; transform: none; }
  .step::after { transform: scaleX(1); opacity: 1; }
  .act-quote span { background-size: 100% 3px, 100% 45%; }
}
