/* phones: a home screen of apps, one per section. Work, Skills and Ideas are native phone apps built by
   ART.msheet; the rest are their desktop sheets restyled to a single column. Only applies under 820px. */
@media (max-width: 819px) {
  body.m { overflow: hidden; height: 100svh; background: #fbe3cf; -webkit-tap-highlight-color: transparent; }
  .m .frame, .m #grid, .m #view, .m .notes, .m .fid, .m .next-rule, .m .spacer { display: none !important; }
  .m button { -webkit-user-select: none; user-select: none; }

  .m-status { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 50px; padding: env(safe-area-inset-top, 0) 26px 0 30px; box-sizing: content-box; font: 600 15px -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--f-sans); color: #17140f; pointer-events: none; }
  .m-status span { display: flex; gap: 6px; align-items: center; }
  .m-status svg { height: 11px; width: auto; fill: currentColor; }

  /* the home screen */
  .m-home { position: fixed; inset: 0; overflow: hidden; display: flex; flex-direction: column; padding-bottom: 40px; background: radial-gradient(120% 70% at 10% 0%, #ffd8bd 0%, transparent 60%), radial-gradient(90% 60% at 100% 30%, #e6dcff 0%, transparent 65%), radial-gradient(100% 70% at 30% 100%, #d7f1e8 0%, transparent 60%), #fbe9dc; transition: transform .5s cubic-bezier(.32,.72,0,1), filter .5s; }
  body.m-in-app .m-home { transform: scale(.94); filter: brightness(.9); }
  .m-widget { all: unset; position: relative; display: block; margin: 18px 20px 0; padding: 22px 22px 20px; border-radius: 26px; background: rgba(255,255,255,.62); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 12px 30px -18px rgba(90,50,20,.45); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); cursor: pointer; transition: transform .2s; }
  .m-widget:active, .m-icon:active .m-glyph { transform: scale(.96); }
  .m-widget small { font: 500 12px var(--f-sans); color: rgba(23,20,15,.55); }
  .m-widget b { display: block; margin-top: 6px; font: 400 44px/1 var(--f-display); letter-spacing: -.02em; color: #17140f; }
  .m-widget b em { font-style: normal; color: #e8551f; }
  .m-widget-cta { display: inline-block; margin-top: 16px; padding: 9px 16px; border-radius: 999px; background: #17140f; color: #fff; font: 600 13px var(--f-sans); }
  .m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 8px; margin: 30px 20px 0; }
  .m-icon { all: unset; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
  .m-glyph { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 16px; box-shadow: 0 8px 18px -12px rgba(40,20,10,.55), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .2s; }
  .m-glyph svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .m-icon small { max-width: 80px; font: 500 11.5px var(--f-sans); color: #2a2320; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-hint { margin: auto 0 0; text-align: center; font: 500 12px var(--f-sans); color: rgba(23,20,15,.4); }

  /* the app frame: opens out of its icon and closes back into it */
  .m-app { position: fixed; inset: 0; z-index: 20; overflow: hidden; transition: clip-path .52s cubic-bezier(.32,.72,0,1); }
  .m-app.closing { transition-duration: .42s; }
  .m-app-status { position: absolute; left: 0; right: 0; top: 0; }
  .m-app[data-i="3"] .m-app-status { color: #e6edf3; }
  .m-app-body { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; transition: opacity .3s .12s; }
  .m-app.closing .m-app-body { opacity: 0; transition: opacity .2s; }
  .m-app-home { all: unset; position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; height: 34px; padding-bottom: env(safe-area-inset-bottom, 0); display: grid; place-items: center; cursor: pointer; touch-action: none; }
  .m-app-home i { width: 134px; height: 5px; border-radius: 3px; background: rgba(23,20,15,.85); }
  .m-app[data-i="3"] .m-app-home i { background: rgba(230,237,243,.8); }

  /* restyled desktop sheets inside the frame */
  .m .m-app-body > .sheet { position: relative; width: 100%; height: auto; min-height: 100%; box-sizing: border-box; padding: 64px 20px 64px; overflow: hidden; background: var(--ground); }
  .m .stmt, .m .evidence { position: relative; left: auto; top: auto; width: auto; height: auto; }
  .m .stmt h2 { margin-top: 18px; font-size: 38px; }
  .m .stmt .sub { font-size: 15.5px; }
  .m .evidence { margin-top: 28px; }
  .m .evidence > * { position: relative; }

  /* 00 hello: the auto layout stack, with the cursor demo still running over it */
  .m .cv { position: relative; inset: auto; display: block; }
  .m .cv-layers, .m .photo-layer { display: none !important; }
  .m .cv-auto { width: auto; margin: 0; padding-top: 6svh; gap: 24px; }
  .m .cv h1 { font-size: 60px; }
  .m .cv p { font-size: 15.5px; }

  /* 02 education: the sketched cards stack */
  .m .art[data-i="2"] .evidence > .sk { position: relative !important; left: auto !important; top: auto !important; width: auto !important; height: auto !important; margin-bottom: 22px; }
  .m .art[data-i="2"] .deg h3 { font-size: 24px !important; }
  .m .art[data-i="2"] .redline-note { position: relative !important; left: auto !important; top: auto !important; width: auto !important; margin: -6px 0 18px 8px; }
  .m .art[data-i="2"] .checks { columns: 1; padding: 8px 18px 18px; }

  /* 04 ethos: the statement, then the dial scaled to the width with the active belief inside the ring */
  .m .bp { position: relative; inset: auto; height: auto; padding-top: var(--mh, 440px); touch-action: pan-y; }
  .m .bp .e-wheel { inset: auto; left: 0; top: 0; width: 800px; height: 696px; transform-origin: 428px 348px; transform: translate(var(--mtx), var(--mty)) scale(var(--ms)); }
  .m .e-orbit { inset: auto; left: 0; top: 0; width: 800px; height: 696px; transform: translate(var(--mtx), var(--mty)) scale(var(--ms)) rotate(var(--rot)); }
  .m .e-label, .m .e-hint { display: none; }
  .m .e-core { left: 50%; top: calc(var(--mh, 440px) / 2); width: calc(292px * var(--ms, .75)); transform: translate(-50%, -50%); }
  .m .e-num { font-size: 30px; }
  .m .e-num i { font-size: 9px; vertical-align: 15px; }
  .m .e-step { margin-top: 6px; font-size: 8.5px; }
  .m .e-core h3 { margin-top: 4px; font-size: 13.5px; }
  .m .e-core p { margin-top: 5px; font-size: 11.5px; line-height: 1.45; }
  .m .art[data-i="4"] .stmt { width: auto; }

  /* 06 off the clock: one column, the watchlist under the hobbies */
  .m .rh { position: relative; inset: auto; display: block; padding: 0; }
  .m .rh-value { font-size: 28px; }
  .m .rh-chart { margin-top: 30px; height: 150px; }
  .m .rh-ranges { overflow-x: auto; scrollbar-width: none; }
  .m .rh-ranges button { flex: none; }
  .m .rh-holdings { grid-template-columns: 1fr; }
  .m .rh-watch { margin-top: 26px; }
  .m .rh-w { flex: none; min-height: 60px; grid-template-columns: 36px minmax(0, 1fr) 64px; }
  .m .rh-w .rh-spark { display: none; }

  /* 07 contact: the ask, the message, the ways to reach */
  .m .evidence .compose { position: relative; left: auto; top: auto; width: auto; }
  .m .compose textarea { height: 150px; }
  .m .compose footer { flex-direction: column; align-items: stretch; gap: 12px; }
  .m .reach { position: relative; left: auto; top: auto; width: auto; margin-top: 16px; grid-template-columns: 1fr; }
  .m .art[data-i="7"] .stmt { top: auto; }

  /* ───────────── native apps: shared phone patterns ───────────── */
  .m .m-app-body > .m-native { height: 100%; min-height: 0; padding: 0; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--f-sans); -webkit-font-smoothing: antialiased; }
  .mst { position: absolute; inset: 0; overflow: hidden; }
  .mst-screen { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--ground); transition: transform .46s cubic-bezier(.32,.72,0,1), filter .46s; }
  .mst-screen.mst-in { transform: translateX(100%); }
  .mst-screen.mst-under { transform: translateX(-28%); filter: brightness(.93); }
  .mn-page { padding: 54px 16px 72px; }
  .mn-large { padding: 22px 4px 14px; }
  .mn-large small { font: 600 12px var(--f-sans); letter-spacing: .02em; color: rgba(23,20,15,.5); }
  .mn-large h1 { margin: 2px 0 0; font: 700 32px/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", var(--f-sans); letter-spacing: -.02em; color: #17140f; }
  .mn-large h1 em { font-style: normal; color: #e8551f; }
  .mn-group { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(40,20,90,.06); }
  .mn-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 14px; cursor: pointer; transition: background .15s; }
  .mn-row + .mn-row, .mn-kv + .mn-kv { box-shadow: inset 0 1px 0 rgba(23,20,15,.07); }
  .mn-row:active { background: rgba(23,20,15,.05); }
  .mn-row > span { flex: 1; min-width: 0; }
  .mn-row b { display: block; font-size: 16px; font-weight: 600; color: #17140f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mn-row small { display: block; margin-top: 1px; font-size: 13px; color: rgba(23,20,15,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mn-row em { font-style: normal; font-size: 13px; color: rgba(23,20,15,.45); font-variant-numeric: tabular-nums; }
  .mn-chev { flex: none; width: 8px; height: 14px; fill: none; stroke: rgba(23,20,15,.3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mn-logo { width: 40px !important; height: 40px !important; flex: none; box-sizing: border-box; padding: 4px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(23,20,15,.08); object-fit: contain; }
  .mn-bar { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 44px; align-items: center; box-sizing: content-box; height: 44px; padding: 50px 8px 0; background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(23,20,15,.06); }
  .mn-bar button { all: unset; display: flex; align-items: center; gap: 4px; justify-self: start; padding: 8px; font-size: 16px; color: var(--mn-accent, #e8551f); cursor: pointer; }
  .mn-back { width: 10px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .mn-bar b { max-width: 190px; font-size: 16px; font-weight: 600; color: #17140f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mn-bar + .mn-page { padding-top: 14px; }
  .mn-h { margin: 26px 4px 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: rgba(23,20,15,.5); }
  .mn-kv { display: flex; justify-content: space-between; gap: 16px; padding: 13px 14px; font-size: 15px; color: inherit; text-decoration: none; }
  .mn-kv span { color: rgba(23,20,15,.55); }
  .mn-kv b { font-weight: 500; text-align: right; color: #17140f; }
  .mn-kv .mn-link { color: var(--mn-accent, #e8551f); }
  .mn-next { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 26px; padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(40,20,90,.06); cursor: pointer; }
  .mn-next small { font-size: 13px; color: rgba(23,20,15,.5); }
  .mn-next b { flex: 1; font-size: 16px; font-weight: 600; color: #17140f; }
  .mn-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 10px; background: rgba(118,118,128,.16); }
  .mn-seg button { all: unset; padding: 7px 0; border-radius: 8px; text-align: center; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .2s, box-shadow .2s; }
  .mn-seg button.on { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); }

  /* 01 work: a list of roles that drills into each one */
  .m-native[data-i="1"] { --ground: #f2eefc; --mn-accent: #6d4fe0; }
  .mw-title { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
  .mw-logo { width: 56px !important; height: 56px !important; flex: none; box-sizing: border-box; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(23,20,15,.07), 0 4px 12px -6px rgba(40,20,90,.25); object-fit: contain; }
  .mw-title h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #17140f; }
  .mw-title p { margin: 2px 0 0; font-size: 15px; color: rgba(23,20,15,.6); }
  .mw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
  .mw-stats div { padding: 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(40,20,90,.06); }
  .mw-stats b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: #17140f; font-variant-numeric: tabular-nums; }
  .mw-stats span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.3; color: rgba(23,20,15,.55); }
  .mw-wins { list-style: none; margin: 0; padding: 4px 14px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(40,20,90,.06); }
  .mw-wins li { position: relative; padding: 12px 0 12px 22px; font-size: 15px; line-height: 1.45; color: #2b2622; animation: swap .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--k) * 50ms + 120ms); }
  .mw-wins li + li { box-shadow: inset 0 1px 0 rgba(23,20,15,.07); }
  .mw-wins li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--mn-accent); }
  .mw-chips { display: flex; flex-wrap: wrap; gap: 7px; }
  .mw-chips span { padding: 6px 11px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(40,20,90,.06); font-size: 13px; color: #2b2622; }

  /* 03 skills: a repo browser in GitHub's dark theme */
  .m-native[data-i="3"] { --ground: #0d1117; --mn-accent: #4493f8; color: #e6edf3; }
  .mg .mn-large small, .mg .mn-h { color: #7d8590; }
  .mg .mn-large h1, .mg .mn-bar b, .mg .mn-row b { color: #e6edf3; }
  .mg .mn-group { background: #161b22; box-shadow: 0 0 0 1px #30363d; }
  .mg .mn-row + .mn-row { box-shadow: inset 0 1px 0 #30363d; }
  .mg .mn-row small { color: #7d8590; }
  .mg .mn-chev { stroke: #6e7681; }
  .mg .mn-bar { box-shadow: 0 1px 0 #30363d; }
  .mg-desc { margin: 0 4px 16px; font-size: 15px; line-height: 1.45; color: #9198a1; }
  .mg .mn-row .si { width: 22px; height: 22px; flex: none; }
  .mg-ts { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 4px; background: #3178c6; color: #fff; font: 700 9px var(--f-mono); font-style: normal; }
  .mg-dir { width: 22px; height: 20px; flex: none; fill: #7d8590; }
  .mg-readme { margin-top: 18px; border-radius: 16px; background: #0d1117; box-shadow: 0 0 0 1px #30363d; overflow: hidden; }
  .mg-readme header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #161b22; box-shadow: 0 1px 0 #30363d; font-size: 14px; }
  .mg-readme header .si { width: 18px; height: 18px; }
  .mg .readme { padding: 18px 16px 8px; }
  .mg .readme h1 { font-size: 30px; }
  .mg .mn-seg { background: #21262d; }
  .mg .mn-seg button { color: #e6edf3; }
  .mg .mn-seg button.on { background: #30363d; box-shadow: none; }
  .mg-file .readme { padding: 18px 4px 8px; }
  .mg-code { display: none; margin: 16px 0 0; padding: 12px 0; overflow-x: auto; border-radius: 12px; background: #161b22; box-shadow: 0 0 0 1px #30363d; font: 12.5px/20px Menlo, "SF Mono", var(--f-mono); color: #e6edf3; }
  .mg-code > span { display: block; padding-right: 16px; white-space: pre; }
  .mg-code em { display: inline-block; width: 34px; margin-right: 10px; text-align: right; font-style: normal; color: #6e7681; }
  .mg-code .k { color: #ff7b72; } .mg-code .v { color: #d2a8ff; } .mg-code .s { color: #a5d6ff; } .mg-code .c { color: #8b949e; }
  .mg-file.show-code .mg-code { display: block; }
  .mg-file.show-code .mg-preview { display: none; }

  /* 05 ideas: swipe through the finished screens; each resolves from its sketch as it lands */
  .m-native[data-i="5"] { --ground: #dff4ee; overflow-y: auto !important; }
  .mi { padding: 54px 0 72px; }
  .mi .mn-large { padding: 22px 20px 16px; }
  .mi-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 18px; scrollbar-width: none; }
  .mi-track::-webkit-scrollbar { display: none; }
  .mi-slide { flex: none; width: 78%; scroll-snap-align: center; }
  .mi-card { position: relative; height: 430px; overflow: hidden; border-radius: 30px; background: #fff; box-shadow: 0 0 0 7px #17140f, 0 20px 40px -24px rgba(15,40,34,.6); margin: 7px; }
  .mi-card .ui { transform: scale(var(--s, .75)); }
  .m .mi-pitch { position: static; padding: 18px 20px 0; border-top: 0; }
  .mi-pitch.swap { animation: swap .45s cubic-bezier(.2,.7,.2,1); }
  .m .mi-pitch h3 { font-size: 26px; }
  .m .mi-pitch p { font-size: 16px; }
}
