/* CosmoCircle shared design tokens + primitives.
   Layout: phone-first single column (max 520px app / 1080px marketing), bottom nav in the app. */
:root {
  --bg: #FFF7F9;
  --surface: #FFFFFF;
  --blush: #FCE6EC;
  --pink: #F4B6C8;
  --rose: #C2416B;
  --rose-ink: #FFFFFF;
  --ink: #2E1622;
  --muted: #7A5F6C;
  --line: #F2DCE4;
  --mark: #6B5452;
  --good: #2C8A66;
  --warn: #A86A12;
  --bad: #C0392F;
  --shadow: 0 1px 2px rgba(46, 22, 34, .05), 0 8px 24px rgba(46, 22, 34, .06);
  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-body: "Figtree", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  /* Liquid glass: translucent surface, bright top edge, soft refraction blur */
  --glass: rgba(255, 255, 255, .34);
  --glass-strong: rgba(255, 255, 255, .56);
  --glass-thick: rgba(255, 250, 252, .86);
  --glass-shade: rgba(46, 22, 34, .14);
  --glass-edge: rgba(255, 255, 255, .6);
  --glass-hi: rgba(255, 255, 255, .9);
  --glass-tint: rgba(244, 182, 200, .16);
  --amb-1: rgba(244, 182, 200, .55);
  --amb-2: rgba(194, 65, 107, .16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #160D12; --surface: #22151C; --blush: #3A2230; --pink: #E8A2B8; --rose: #F08DAE; --rose-ink: #2A0F1C;
    --ink: #FBEFF3; --muted: #C2A6B3; --line: #3A2832; --mark: #EBCBD5; --good: #5CC79A; --warn: #E3AC52; --bad: #EF7A73;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --glass: rgba(46, 28, 38, .34); --glass-strong: rgba(46, 28, 38, .56); --glass-thick: rgba(34, 21, 28, .88); --glass-shade: rgba(0, 0, 0, .5); --glass-edge: rgba(255, 255, 255, .1); --glass-hi: rgba(255, 255, 255, .14); --glass-tint: rgba(240, 141, 174, .08);
    --amb-1: rgba(240, 141, 174, .2); --amb-2: rgba(232, 162, 184, .1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #160D12; --surface: #22151C; --blush: #3A2230; --pink: #E8A2B8; --rose: #F08DAE; --rose-ink: #2A0F1C;
  --ink: #FBEFF3; --muted: #C2A6B3; --line: #3A2832; --mark: #EBCBD5; --good: #5CC79A; --warn: #E3AC52; --bad: #EF7A73;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --glass: rgba(46, 28, 38, .34); --glass-strong: rgba(46, 28, 38, .56); --glass-thick: rgba(34, 21, 28, .88); --glass-shade: rgba(0, 0, 0, .5); --glass-edge: rgba(255, 255, 255, .1); --glass-hi: rgba(255, 255, 255, .14); --glass-tint: rgba(240, 141, 174, .08);
    --amb-1: rgba(240, 141, 174, .2); --amb-2: rgba(232, 162, 184, .1);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--rose); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

.logo { display: inline-flex; align-items: center; gap: calc(var(--logo-h, 24px) * .25); text-decoration: none; color: var(--mark); line-height: 1; }
.logo svg { flex: none; display: block; }
.logo b { font-family: "Quicksand", var(--f-body); font-weight: 400; font-size: calc(var(--logo-h, 24px) * .9); letter-spacing: .01em; white-space: nowrap; }
.logo b span { font-weight: 700; }
.logo .tm { font-family: var(--f-body); font-weight: 500; font-size: .42em; vertical-align: top; position: relative; top: -.1em; margin-left: .08em; }
svg { flex-shrink: 0; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rose) 80%, #fff), var(--rose) 72%);
  color: var(--rose-ink); font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .06), 0 1px 2px rgba(46, 22, 34, .12);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1), box-shadow .3s ease, filter .3s ease, background-color .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { filter: brightness(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), inset 0 -1px 0 rgba(0, 0, 0, .06), 0 1px 2px rgba(46, 22, 34, .12), 0 3px 8px rgba(46, 22, 34, .08); }
  .btn.ghost:not(:disabled):hover, .btn.danger:not(:disabled):hover { filter: none; background-color: color-mix(in srgb, var(--surface) 88%, transparent); }
  .btn.soft:not(:disabled):hover { filter: none; background-color: color-mix(in srgb, var(--blush) 75%, var(--pink)); }
  .btn.glass:not(:disabled):hover { filter: none; background-color: color-mix(in srgb, var(--surface) 30%, transparent); }
}
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; }
/* Liquid glass, iOS-style: clear tint, a bright rim that catches light from the top, soft depth.
   Real blur only on floating bars and panels that content scrolls beneath (blur is the most expensive effect to draw). */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 55%), var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 1px var(--glass-hi), inset 0 -1px 1px rgba(255, 255, 255, .06), 0 1px 2px rgba(46, 22, 34, .04), 0 12px 32px -14px var(--glass-shade);
}
.glass::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, var(--glass-hi), transparent 32%, transparent 68%, color-mix(in srgb, var(--glass-hi) 55%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass.strong { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 55%), var(--glass-strong); }
header.top .glass, nav.tabs .glass, .sheet.glass { -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
.sheet.glass.strong { background: var(--glass-thick); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.top .glass, nav.tabs .glass { background: var(--glass-thick); }
}
}
/* Soft pink light behind glass so it has something to refract */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(40vmax 40vmax at 8% 4%, var(--amb-1), transparent 70%),
  radial-gradient(36vmax 36vmax at 96% 38%, var(--amb-2), transparent 70%),
  radial-gradient(44vmax 44vmax at 30% 100%, var(--amb-1), transparent 70%); }
.btn.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%), var(--glass-strong); color: var(--ink); box-shadow: inset 0 1px 1px var(--glass-hi), 0 1px 2px rgba(46, 22, 34, .06); }
.btn:not(:disabled):active { transform: scale(.96); filter: brightness(.96); transition-duration: .12s; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), 0 1px 2px rgba(46, 22, 34, .05); }
.btn.soft { background: var(--blush); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 2px rgba(46, 22, 34, .05); }
.btn.danger { background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--bad); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }


.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg);
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 18%, transparent); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--blush); color: var(--ink); white-space: nowrap; }
.chip.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chip.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Motion: scroll reveals that animate only opacity and transform. Content stays readable at every frame. */
.rv:not(.in) { opacity: .2; transform: translateY(10px); }
.rv.in { animation: ccRise .7s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms) both; }
@keyframes ccRise { from { opacity: .2; transform: translateY(10px); } }
@keyframes ccFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rv:not(.in) { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Public bio page (shared by bio.html and the in-app preview) */
.bio { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; text-align: center; }
.bio-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bio-av { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: var(--ink); font-family: var(--f-display); font-size: 38px; overflow: hidden; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.bio-av img { width: 100%; height: 100%; object-fit: cover; }
.bio-head h1 { font-size: 32px; margin-top: 8px; }
.bio-head .title { color: var(--muted); font-size: 15px; }
.bio-loc { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14px; }
.bio-loc svg { color: var(--rose); flex: none; }
.bio-url { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--rose); padding: 5px 12px; border-radius: 999px; margin-top: 4px; }
.bio-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--r-md); padding: 14px 6px; }
.bio-stats div + div { border-left: 1px solid var(--line); }
.bio-stats b { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 500; line-height: 1.1; }
.bio-stats span { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.bio-links { display: grid; gap: 10px; }
.bio { position: relative; }
.bio-banner { margin: 0 0 -58px; border-radius: 24px; overflow: hidden; aspect-ratio: 3 / 1.1; max-width: 100%; background: var(--blush); box-shadow: 0 1px 2px rgba(46, 22, 34, .06), 0 10px 30px -14px rgba(46, 22, 34, .3); }
.bio-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-head { position: relative; isolation: isolate; }
.bio:not(.has-banner) .bio-head::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -36px; width: 300px; height: 220px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--rose) 26%, transparent), transparent); }
.bio-av { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5.5px color-mix(in srgb, var(--rose) 45%, transparent) !important; }
.bio-links a.bio-link { display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; align-items: center; gap: 14px; min-height: 68px; padding: 8px 18px 8px 8px; border-radius: 18px; color: var(--ink); text-decoration: none; text-align: left; transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; }
.bio-links a.bio-link:hover { transform: translateY(-2px); }
.bio-links a.bio-link:hover .bio-go { transform: translateX(2px); color: var(--ink); }
.bio-links a.bio-link:active { transform: scale(.985); transition-duration: .1s; }
.bio-txt { min-width: 0; display: grid; gap: 2px; }
.bio-txt b { font-weight: 600; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.bio-txt small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bio-txt small:empty { display: none; }
.bio-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--tile, color-mix(in srgb, var(--rose) 12%, var(--surface))); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 16px -10px var(--tile, rgba(46, 22, 34, .35)); }
.bio-ico.ig { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); --tile: #D6249F; }
.bio-ico img { width: 24px; height: 24px; display: block; }
.bio-ico.brand img.logo { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.bio-ico.brand.dark-logo img.logo { filter: brightness(0); }
.bio-ico img.fav { border-radius: 6px; }
.bio-ico .bio-glyph { color: var(--rose); }
.bio-ico.brand .bio-glyph { color: #fff; }
.bio-go { justify-self: end; display: grid; place-items: center; color: var(--muted); transition: transform .3s cubic-bezier(.2, .8, .2, 1), color .2s ease; }
.bio-about { text-align: left; border-radius: var(--r-md); padding: 16px 18px; white-space: pre-line; overflow-wrap: anywhere; }
.bio-sec { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.bio-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.bio-skills .chip { background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.bio-skills .chip b { color: var(--rose); font-weight: 700; }
.bio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: var(--r-md); overflow: hidden; }
.bio-grid button { all: unset; cursor: pointer; aspect-ratio: 1; max-width: 100%; background: var(--blush); position: relative; }
.bio-grid button:focus-visible { outline: 2px solid var(--rose); outline-offset: -2px; }
.bio-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio-empty { padding: 22px; border: 1.5px dashed var(--line); border-radius: var(--r-md); color: var(--muted); font-size: 14px; }
.bio-foot { display: flex; justify-content: center; padding-top: 6px; font-size: 12px; color: var(--muted); }
