{"version":3,"file":"AppleNav.Beq0ll89.mjs","names":["useState","useRef","startTransition","p"],"sources":["https:/framerusercontent.com/modules/qiV0843EdsS1Tlhe6cNy/dojU9G9HBRaX5uJ9l9rv/AppleNav.js"],"sourcesContent":["// Apple-style global nav for the portfolio: a thin (52px) frosted-glass bar\n// with the ink-portrait mark on the left and quiet 13px text links on the\n// right, set in Inter like the rest of the site. Same component at every width\n// (no breakpoint variants): links stay on one line down to phone size. The mark\n// always goes to the home page (and glides back to the top when you're already\n// there). In-page links smooth-scroll with an offset for the bar; external links\n// open in a new tab. \"Work\" opens a menu of every project: on hover or keyboard\n// focus with a mouse, and on tap on touch screens (where the first tap opens the menu).\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const INK=\"#1D1D1F\";const MUTED=\"#6E6E73\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AppleNav(props){const{logo,logoAlt,homeHref,navLinks:items,workList:projects}=props;const home=homeHref||\"/\";const[open,setOpen]=useState(false);const menuRef=useRef(null);// Close the project menu on Escape or a click anywhere else\nuseEffect(()=>{if(!open||typeof window===\"undefined\")return;const onKey=e=>e.key===\"Escape\"&&startTransition(()=>setOpen(false));const onDown=e=>{if(menuRef.current&&!menuRef.current.contains(e.target))startTransition(()=>setOpen(false));};window.addEventListener(\"keydown\",onKey);window.addEventListener(\"pointerdown\",onDown);return()=>{window.removeEventListener(\"keydown\",onKey);window.removeEventListener(\"pointerdown\",onDown);};},[open]);const reduceMotion=()=>typeof window!==\"undefined\"&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;const canHover=()=>typeof window!==\"undefined\"&&window.matchMedia(\"(hover: hover)\").matches;const go=(e,href)=>{if(!href.startsWith(\"#\")||typeof window===\"undefined\")return;const el=document.getElementById(href.slice(1));if(!el)return;e.preventDefault();const y=el.getBoundingClientRect().top+window.scrollY-52;window.scrollTo({top:y,behavior:reduceMotion()?\"auto\":\"smooth\"});};const goHome=e=>{if(typeof window===\"undefined\")return;const target=new URL(home,window.location.href);if(target.pathname===window.location.pathname){e.preventDefault();window.scrollTo({top:0,behavior:reduceMotion()?\"auto\":\"smooth\"});}};const hasMenu=projects&&projects.length>0;return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Main\",style:{position:\"relative\",width:\"100%\",height:\"100%\",background:\"rgba(255, 255, 255, 0.72)\",backdropFilter:\"saturate(180%) blur(20px)\",WebkitBackdropFilter:\"saturate(180%) blur(20px)\",borderBottom:\"1px solid rgba(0, 0, 0, 0.08)\",fontFamily:'\"Inter\", \"Inter Placeholder\", -apple-system, BlinkMacSystemFont, sans-serif'},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .an-link { color: ${INK}; opacity: .8; text-decoration: none; transition: opacity .2s ease; }\n                .an-link:hover { opacity: 1; }\n                .an-home { transition: opacity .2s ease; }\n                .an-home:hover { opacity: .7; }\n                .an-link:focus-visible, .an-home:focus-visible, .an-item:focus-visible { outline: none; border-radius: 6px; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0071E3; }\n                .an-inner { max-width: 1024px; margin: 0 auto; height: 100%; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }\n                .an-list { display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; list-style: none; }\n                .an-work { position: relative; }\n                .an-caret { display: inline-block; margin-left: 4px; font-size: 9px; vertical-align: 1px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }\n                .an-work[data-open=\"true\"] .an-caret { transform: rotate(180deg); }\n                /* Invisible bridge so the pointer can travel from \"Work\" to the menu without it closing */\n                .an-menu { position: absolute; top: 100%; left: 50%; padding-top: 6px; transform: translate(-50%, -6px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1), visibility 0s linear .25s; z-index: 20; }\n                .an-work[data-open=\"true\"] .an-menu { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1), visibility 0s; }\n                .an-panel { width: 300px; padding: 8px; margin: 0; list-style: none; border-radius: 18px; background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 18px 48px rgba(0,0,0,0.12); }\n                .an-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: ${INK}; transition: background .15s ease; }\n                .an-item:hover { background: rgba(0,0,0,0.05); }\n                .an-item-title { font-size: 14px; font-weight: 600; line-height: 1.3; }\n                .an-item-meta { font-size: 12px; line-height: 1.35; color: ${MUTED}; }\n                /* Phones: the menu spans the bar's width, 16px in from each edge */\n                @media (max-width: 809px) {\n                    .an-inner { padding: 0 16px; } .an-list { gap: 22px; }\n                    .an-work { position: static; }\n                    .an-menu { left: 16px; right: 16px; transform: translate(0, -6px); }\n                    .an-work[data-open=\"true\"] .an-menu { transform: translate(0, 0); }\n                    .an-panel { width: auto; }\n                }\n                @media (prefers-reduced-motion: reduce) { .an-menu, .an-caret { transition: none !important; } }\n            `}),/*#__PURE__*/_jsxs(\"div\",{className:\"an-inner\",children:[/*#__PURE__*/_jsx(\"a\",{className:\"an-home\",href:home,onClick:goHome,\"aria-label\":\"Karina Su, home\",style:{display:\"flex\",alignItems:\"center\",minWidth:44,minHeight:44},children:logo&&/*#__PURE__*/_jsx(\"img\",{src:logo,alt:logoAlt,style:{width:30,height:30,objectFit:\"contain\",mixBlendMode:\"multiply\"}})}),/*#__PURE__*/_jsx(\"ul\",{className:\"an-list\",children:items.map(item=>{const external=/^https?:/.test(item.href);const isWork=hasMenu&&item.label.toLowerCase()===\"work\";const link=/*#__PURE__*/_jsxs(\"a\",{className:\"an-link\",href:item.href,onClick:e=>{// Touch screens: first tap opens the menu instead of scrolling\nif(isWork&&!canHover()&&!open){e.preventDefault();startTransition(()=>setOpen(true));return;}if(isWork)startTransition(()=>setOpen(false));go(e,item.href);},target:external?\"_blank\":undefined,rel:external?\"noopener noreferrer\":undefined,\"aria-haspopup\":isWork?\"true\":undefined,\"aria-expanded\":isWork?open:undefined,style:{fontSize:13,lineHeight:\"44px\",display:\"inline-block\"},children:[item.label,isWork&&/*#__PURE__*/_jsx(\"span\",{className:\"an-caret\",\"aria-hidden\":\"true\",children:\"▾\"})]});if(!isWork)return /*#__PURE__*/_jsx(\"li\",{children:link},item.label);return /*#__PURE__*/_jsxs(\"li\",{ref:menuRef,className:\"an-work\",\"data-open\":open?\"true\":\"false\",onMouseEnter:()=>canHover()&&startTransition(()=>setOpen(true)),onMouseLeave:()=>canHover()&&startTransition(()=>setOpen(false)),onFocus:()=>startTransition(()=>setOpen(true)),onBlur:e=>{if(!e.currentTarget.contains(e.relatedTarget))startTransition(()=>setOpen(false));},children:[link,/*#__PURE__*/_jsx(\"div\",{className:\"an-menu\",children:/*#__PURE__*/_jsx(\"ul\",{className:\"an-panel\",\"aria-label\":\"Projects\",children:projects.map(p=>/*#__PURE__*/_jsx(\"li\",{children:/*#__PURE__*/_jsxs(\"a\",{className:\"an-item\",href:p.href,onClick:()=>startTransition(()=>setOpen(false)),children:[/*#__PURE__*/_jsx(\"span\",{className:\"an-item-title\",children:p.title}),p.meta&&/*#__PURE__*/_jsx(\"span\",{className:\"an-item-meta\",children:p.meta})]})},p.href))})})]},item.label);})})]})]});}AppleNav.defaultProps={logo:\"https://framerusercontent.com/images/Zuhw1UOtI1bDBh5Ji5grp7eM.png\",logoAlt:\"\",homeHref:\"/\",// \"Resume\" opens the one-page resume at /resume, where visitors can read it or save it as a PDF.\n// Renamed from \"links\" so an older panel list (pointing at the Drive PDF) no longer overrides this one.\nnavLinks:[{label:\"Work\",href:\"#work\"},{label:\"Painting\",href:\"/painting\"},{label:\"Resume\",href:\"/resume\"},{label:\"LinkedIn\",href:\"https://www.linkedin.com/in/karinasu/\"}],// Same order, names and impact numbers as the home page's \"Selected work\". Renamed from \"projects\" so an\n// older panel list (with Jobscan, in the old order) no longer overrides this one. The Solayer Pay rebrand page\n// (/brand) stays published but is kept out of the menu and the home page on request.\nworkList:[{title:\"Binance fraud detection\",meta:\"Enterprise \\xb7 2\\xd7 daily case reviews\",href:\"/binance\"},{title:\"Solayer Pay\",meta:\"Fintech \\xb7 +38% card sign-ups, +25% spend\",href:\"/solayer\"},{title:\"Solayer AI Pay\",meta:\"AI agent \\xb7 purchases from 6 steps to 4\",href:\"/solayer-ai\"},{title:\"Margin Trade\",meta:\"DEX \\xb7 $1M+ daily volume, 14+ countries\",href:\"/margin-trade\"},{title:\"Margin Trade Simple Mode\",meta:\"Mobile \\xb7 +15% trading volume\",href:\"/simple-mode\"},{title:\"Microsoft Word AI Co-Agent\",meta:\"Enterprise AI \\xb7 +8.3% PM work efficiency\",href:\"/microsoft\"}]};addPropertyControls(AppleNav,{logo:{type:ControlType.String,title:\"Logo URL\"},logoAlt:{type:ControlType.String,title:\"Logo Alt\"},homeHref:{type:ControlType.String,title:\"Home Link\",defaultValue:\"/\"},navLinks:{type:ControlType.Array,title:\"Links\",control:{type:ControlType.Object,controls:{label:{type:ControlType.String,title:\"Label\"},href:{type:ControlType.String,title:\"Link\"}}}},// Shown in the menu under \"Work\"\nworkList:{type:ControlType.Array,title:\"Projects\",control:{type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\"},meta:{type:ControlType.String,title:\"Detail\"},href:{type:ControlType.String,title:\"Link\"}}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AppleNav\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AppleNav.map"],"mappings":"0MAWG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAA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