{"version":3,"file":"CaseStudyNav.C1nAHsLL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/FaQR14f9VKfdM33Vu4q2/N32WfSwTlvjdZAft06E1/CaseStudyNav.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";/**\n * Fixed top bar for case study pages, with a scroll-progress rail.\n *\n * Case study pages on this site are dead ends: no nav, no footer, and in most\n * cases zero links on the whole page. Anyone arriving from a shared link (an\n * application, LinkedIn) reaches the bottom with nowhere to go. This gives\n * every page a way back into the site from any scroll position.\n *\n * Because the Framer MCP appends new nodes at the END of a page and cannot\n * reorder existing ones, this is placed last in the document and rendered\n * with position:fixed so it still paints at the top of the viewport.\n */const INK=\"rgb(31, 58, 45)\";const CSS=`\n@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Inter:wght@400;500;600&display=swap');\n\n.csn-spacer { height: 0; }\n.csn-bar {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  z-index: 900;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  padding: 14px 40px;\n  box-sizing: border-box;\n  background: rgba(249, 244, 224, 0.88);\n  backdrop-filter: saturate(140%) blur(12px);\n  -webkit-backdrop-filter: saturate(140%) blur(12px);\n  border-bottom: 1px solid rgba(31, 58, 45, 0.1);\n  transform: translateY(0);\n  transition: transform 260ms ease, box-shadow 260ms ease;\n}\n.csn-bar[data-hidden=\"1\"] { transform: translateY(-104%); }\n.csn-bar[data-scrolled=\"1\"] { box-shadow: 0 6px 24px rgba(31, 58, 45, 0.08); }\n\n.csn-back {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  font-family: 'Inter', sans-serif;\n  font-size: 14px;\n  font-weight: 500;\n  color: ${INK};\n  text-decoration: none;\n  padding: 8px 14px 8px 10px;\n  border-radius: 999px;\n  transition: background 160ms ease, gap 160ms ease;\n  white-space: nowrap;\n}\n.csn-back:hover { background: rgba(31, 58, 45, 0.08); gap: 12px; }\n.csn-back span[data-arrow] { transition: transform 160ms ease; }\n.csn-back:hover span[data-arrow] { transform: translateX(-3px); }\n\n.csn-name {\n  font-family: 'Caveat', cursive;\n  font-weight: 700;\n  font-size: 24px;\n  color: ${INK};\n  text-decoration: none;\n  line-height: 1;\n  white-space: nowrap;\n}\n\n.csn-links { display: flex; align-items: center; gap: 4px; }\n.csn-link {\n  font-family: 'Inter', sans-serif;\n  font-size: 14px;\n  font-weight: 500;\n  color: ${INK};\n  text-decoration: none;\n  padding: 8px 14px;\n  border-radius: 999px;\n  transition: background 160ms ease;\n  white-space: nowrap;\n}\n.csn-link:hover { background: rgba(31, 58, 45, 0.08); }\n.csn-link[data-cta] {\n  background: ${INK};\n  color: rgb(249, 244, 224);\n  font-weight: 600;\n}\n.csn-link[data-cta]:hover { opacity: 0.88; background: ${INK}; }\n\n.csn-rail {\n  position: absolute;\n  left: 0;\n  bottom: -1px;\n  height: 2px;\n  background: rgb(143, 168, 94);\n  width: 0%;\n  transition: width 90ms linear;\n}\n\n@media (max-width: 720px) {\n  .csn-bar { padding: 10px 16px; gap: 8px; }\n  .csn-name { display: none; }\n  .csn-back { font-size: 13px; padding: 8px 10px; }\n  .csn-link { font-size: 13px; padding: 7px 10px; }\n  .csn-link[data-secondary] { display: none; }\n}\n`;export default function CaseStudyNav(props){const name=props.name||\"Maitreyi\";const backLabel=props.backLabel||\"All work\";const backHref=props.backHref||\"/#featured-work\";const resumeHref=props.resumeHref||\"https://files.catbox.moe/b35sbs.pdf\";const[progress,setProgress]=useState(0);const[scrolled,setScrolled]=useState(false);const[hidden,setHidden]=useState(false);useEffect(()=>{let last=window.scrollY;let frame=0;const onScroll=()=>{if(frame)return;frame=requestAnimationFrame(()=>{frame=0;const y=window.scrollY;const max=document.documentElement.scrollHeight-window.innerHeight;setProgress(max>0?Math.min(100,y/max*100):0);setScrolled(y>8);// Reveal on any upward scroll; hide only when moving down well\n// past the hero, so the bar is never in the way of reading.\nif(y<120)setHidden(false);else if(y>last+4)setHidden(true);else if(y<last-4)setHidden(false);last=y;});};onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>{window.removeEventListener(\"scroll\",onScroll);if(frame)cancelAnimationFrame(frame);};},[]);return /*#__PURE__*/_jsxs(\"div\",{className:\"csn-spacer\",children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsxs(\"nav\",{className:\"csn-bar\",\"data-hidden\":hidden?\"1\":\"0\",\"data-scrolled\":scrolled?\"1\":\"0\",\"aria-label\":\"Case study navigation\",children:[/*#__PURE__*/_jsxs(\"a\",{className:\"csn-back\",href:backHref,children:[/*#__PURE__*/_jsx(\"span\",{\"data-arrow\":true,\"aria-hidden\":true,children:\"←\"}),backLabel]}),/*#__PURE__*/_jsx(\"a\",{className:\"csn-name\",href:\"/\",children:name}),/*#__PURE__*/_jsxs(\"div\",{className:\"csn-links\",children:[/*#__PURE__*/_jsx(\"a\",{className:\"csn-link\",\"data-secondary\":true,href:\"/#aboutme\",children:\"About\"}),/*#__PURE__*/_jsx(\"a\",{className:\"csn-link\",\"data-secondary\":true,href:resumeHref,target:\"_blank\",rel:\"noreferrer\",children:\"Resume\"}),/*#__PURE__*/_jsx(\"a\",{className:\"csn-link\",\"data-cta\":true,href:\"mailto:mn3817@nyu.edu\",children:\"Get in touch\"})]}),/*#__PURE__*/_jsx(\"div\",{className:\"csn-rail\",style:{width:progress+\"%\"},\"aria-hidden\":true})]})]});}CaseStudyNav.defaultProps={width:1200,height:1};addPropertyControls(CaseStudyNav,{name:{type:ControlType.String,title:\"Name\",defaultValue:\"Maitreyi\"},backLabel:{type:ControlType.String,title:\"Back label\",defaultValue:\"All work\"},backHref:{type:ControlType.String,title:\"Back link\",defaultValue:\"/#featured-work\"},resumeHref:{type:ControlType.String,title:\"Resume link\",defaultValue:\"https://files.catbox.moe/b35sbs.pdf\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CaseStudyNav\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CaseStudyNav.map"],"mappings":"sMAsGE,SAAwB,EAAa,EAAM,CAAC,IAAM,EAAK,EAAM,MAAM,WAAiB,EAAU,EAAM,WAAW,WAAiB,EAAS,EAAM,UAAU,kBAAwB,EAAW,EAAM,YAAY,sCAA2C,CAAC,EAAS,GAAaA,EAAS,CAAC,EAAO,CAAC,EAAS,GAAaA,EAAS,EAAK,EAAO,CAAC,EAAO,GAAWA,EAAS,EAAK,EAE5F,OAF8F,MAAc,CAAC,IAAI,EAAK,EAAO,QAAY,EAAM,EAAQ,MAAa,CAAI,AAAa,IAAM,0BAA0B,CAAC,EAAM,EAAE,IAAM,EAAE,EAAO,QAAc,EAAI,SAAS,gBAAgB,aAAa,EAAO,YAAY,EAAY,EAAI,EAAE,KAAK,IAAI,IAAI,EAAE,EAAI,GAAG,EAAE,CAAC,EAAE,EAAY,EAAE,CAAC,EAEroB,EAAE,IAAI,EAAU,EAAK,EAAU,EAAE,EAAK,EAAE,EAAU,EAAI,EAAU,EAAE,EAAK,GAAE,EAAU,EAAK,EAAE,EAAK,CAAE,CAAC,CAAE,EAAuE,OAArE,EAAS,EAAE,EAAO,iBAAiB,SAAS,EAAS,CAAC,QAAQ,EAAI,CAAC,MAAY,CAAC,EAAO,oBAAoB,SAAS,CAAQ,EAAK,GAAM,qBAAqB,CAAK,CAAE,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAM,MAAM,CAAC,UAAU,aAAa,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,CAAG,CAAC,CAAC,EAAe,EAAM,MAAM,CAAC,UAAU,UAAU,cAAc,EAAO,IAAI,IAAI,gBAAgB,EAAS,IAAI,IAAI,aAAa,wBAAwB,SAAS,CAAc,EAAM,IA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