/* mas0ng.com public pages, November 2026 redesign. */
@font-face {
  font-family: "Geist";
  src: url("/public_assets/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f0f10;
  --surface: #18181a;
  --surface-hover: #202023;
  --text: #ecebe8;
  --muted: #9d9c97;
  --accent: #5b9cff;
  --radius: 12px;
  --gutter: max(20px, env(safe-area-inset-left));
  --gutter-r: max(20px, env(safe-area-inset-right));
  --max: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; border-radius: 8px; background: var(--text); color: var(--bg);
  text-decoration: none; font-weight: 500;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* Public navigation is shared through navigation.css. */

/* Footer */
.footer { margin-top: 96px; padding-bottom: env(safe-area-inset-bottom); view-transition-name: site-footer; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; }
.footer-copy { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 -10px; padding: 0; list-style: none; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px;
  border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px;
  transition: color .15s var(--ease);
}
.footer-links a:hover { color: var(--text); }
.footer-links svg { width: 16px; height: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0;
  font: 500 15px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-quiet { background: var(--surface); color: var(--text); }
.btn-quiet:hover { background: var(--surface-hover); }
.btn svg { width: 18px; height: 18px; }

/* Home */
.home { display: grid; place-items: center; min-height: calc(100dvh - 64px - 104px - env(safe-area-inset-top)); padding: 24px 0; }
.home-page .footer { margin-top: 0; }
.home-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 40px; }
/* Each letter's weight is driven by home.js from pointer distance; 300 is the resting weight. */
.mark {
  display: flex; align-items: baseline; justify-content: center;
  font-size: clamp(48px, 13.5vw, 168px); font-weight: 300; line-height: 1; white-space: nowrap;
  cursor: default; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.mark .ch { display: inline-block; font-weight: var(--w, 300); color: var(--text); }
.mark .ch-dot { color: var(--accent); }
.btn-accent { background: var(--accent); color: #08101d; }
.btn-accent:hover { background: #7aafff; }
.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 899px) { .home { padding-top: 24px; } }

/* Bio */
.bio { padding: 40px 0 0; }
.bio-grid { display: grid; gap: 32px; }
.bio-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.bio-avatar { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; background: var(--surface); }
.bio-name { font-size: 26px; }
.bio-handle { color: var(--muted); }
.bio-about { color: var(--muted); max-width: 36ch; margin-top: 10px; }
.bio-links { display: grid; gap: 8px; }
.bl-link {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px;
  min-height: 64px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--surface); text-decoration: none;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.bl-link:hover { background: var(--surface-hover); }
.bl-link:active { transform: scale(.99); }
.bl-ico {
  width: 22px; height: 22px; justify-self: center; background: var(--text);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.bl-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bl-text strong { font-weight: 500; }
.bl-text small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-arrow { color: var(--muted); font-size: 18px; transition: transform .15s var(--ease), color .15s var(--ease); }
.bl-link:hover .bl-arrow { color: var(--text); transform: translate(2px, -2px); }

.bio-page .footer { margin-top: 56px; }

@media (min-width: 900px) {
  .bio { padding-top: 72px; }
  .bio-grid { grid-template-columns: 320px 1fr; gap: 72px; align-items: start; }
  .bio-profile { position: sticky; top: 112px; align-items: flex-start; text-align: left; }
  .bio-avatar { width: 128px; height: 128px; }
  .bio-name { font-size: 34px; }
  .bio-links { grid-template-columns: 1fr 1fr; gap: 12px; }
  .bl-link { min-height: 76px; padding: 16px 20px; }
  .bio-page .footer { margin-top: 120px; }
}

@media (max-width: 899px) {
  .bio .wrap { max-width: 520px; }
}

/* In-app browser handoff (bio) */
.bh {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 16px) var(--gutter-r) calc(env(safe-area-inset-bottom) + 24px) var(--gutter);
  background: var(--bg); overflow-y: auto;
}
.bh[hidden] { display: none; }
html.bh-open { overflow: hidden; }
.bh-pointer { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 18px; display: flex; flex-direction: column; align-items: flex-end; color: var(--accent); }
.bh-dots { font-size: 22px; letter-spacing: 2px; line-height: 1; }
.bh-arrow-svg { margin-right: 18px; transform: scaleX(-1) rotate(8deg); }
.bh-close { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.bh-close:hover { color: var(--text); }
.bh-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin: auto 0; padding-top: 80px; }
.bh-icon { width: 44px; height: 44px; margin-bottom: 8px; background: var(--text); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.bh-label { font-size: 26px; }
.bh-handle { color: var(--muted); }
.bh-lead { margin: 16px 0 8px; max-width: 32ch; }
.bh-steps { display: grid; gap: 10px; margin: 8px 0 24px; padding: 0; list-style: none; text-align: left; }
.bh-steps li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.bh-step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bh-copy { min-height: 48px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.bh-copy-status { min-height: 1.6em; color: var(--muted); font-size: 14px; }

/* Legal */
.legal-head { padding: 56px 0 40px; }
.legal-head h1 { font-size: clamp(34px, 5vw, 52px); max-width: 18ch; }
.legal-lead { margin-top: 16px; max-width: 58ch; color: var(--muted); font-size: 18px; }
.legal-updated { margin-top: 20px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.legal-body { display: grid; gap: 40px; }
.toc { font-size: 14px; }
.toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border-radius: var(--radius); background: var(--surface); cursor: pointer; list-style: none; font-weight: 500; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.toc[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.toc nav { display: flex; flex-direction: column; padding: 8px 0; }
.toc a { display: block; padding: 9px 16px; border-radius: 0; color: var(--muted); text-decoration: none; line-height: 1.4; transition: color .15s var(--ease); }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.prose { max-width: 70ch; }
.prose section { scroll-margin-top: 88px; }
.prose section + section { margin-top: 48px; }
.prose h2 { font-size: 24px; margin-bottom: 14px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol, .prose table, .prose dl { margin: 0 0 14px; color: #cfcec9; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: #5b5a57; text-underline-offset: 3px; transition: text-decoration-color .15s var(--ease); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; }
.prose th { color: var(--text); font-weight: 500; background: var(--surface); }
.prose tr:nth-child(even) td { background: #141416; }
.prose blockquote { margin: 0 0 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); }

@media (min-width: 960px) {
  .legal-head { padding: 88px 0 56px; }
  .legal-body { grid-template-columns: 240px minmax(0, 1fr); gap: 80px; align-items: start; }
  .toc { position: sticky; top: 88px; max-height: calc(100dvh - 120px); overflow-y: auto; }
  .toc summary { display: none; }
  .toc nav { padding: 0; }
  .toc a { padding: 7px 14px; }
}

/* Legal index */
.policy-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.policy-list a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 24px;
  min-height: 72px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  text-decoration: none; transition: background-color .15s var(--ease);
}
.policy-list a:hover { background: var(--surface-hover); }
.policy-list strong { font-weight: 500; font-size: 17px; }
.policy-list span { grid-column: 1; color: var(--muted); font-size: 15px; }
.policy-list svg { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; color: var(--muted); transition: transform .15s var(--ease); }
.policy-list a:hover svg { transform: translateX(3px); color: var(--text); }
.legal-contact { margin-top: 48px; color: var(--muted); }
.legal-contact a { color: var(--text); text-underline-offset: 3px; }
@media (min-width: 760px) { .policy-list { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* 404 */
.lost { display: grid; place-items: center; padding: 96px 0 0; text-align: center; }
.lost h1 { font-size: clamp(40px, 7vw, 72px); font-variant-numeric: tabular-nums; }
.lost p { margin: 14px auto 28px; color: var(--muted); max-width: 36ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .mark .orbit { animation: none; }
  @view-transition { navigation: none; }
}

/* Home background: animated dot field drawn by home.js. Content sits above it. */
.home-bg { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.home-page .nav, .home-page main, .home-page .footer { position: relative; z-index: 1; }
.home-page .nav { position: sticky; z-index: 20; background: var(--bg); }
