/* ============================================================
   cjcombs.com — shared styles
   FLASHBANG / WITNESS PROTECT — CJ's theme system
   FLASHBANG = light. Bright. Loud. Visible.
   WITNESS PROTECT = dark. Quiet. Hidden. Untraceable.
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --text-muted: #86868b;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-hover: #f9f9fb;
  --border: #e5e5ea;
  --border-soft: #f0f0f3;
  --chip-border: #d2d2d7;
  --accent: #007aff;
  --accent-bg: #007aff;
  --accent-hover: #f0f7ff;
  --high: #ff3b30;
  --med: #ff9500;
  --question: #af52de;
  --ok: #34c759;
  --shadow: 0 0 0 transparent;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0c;
  --text: #f2f2f4;
  --text-muted: #8e8e93;
  --surface: #18181b;
  --surface-2: #1f1f23;
  --surface-hover: #232328;
  --border: #2a2a30;
  --border-soft: #232328;
  --chip-border: #3a3a40;
  --accent: #0a84ff;
  --accent-bg: #0a84ff;
  --accent-hover: #1a2a3f;
  --high: #ff453a;
  --med: #ff9f0a;
  --question: #bf5af2;
  --ok: #30d158;
  --shadow: 0 1px 0 rgba(255,255,255,0.02) inset;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; }

.mono {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

/* ---- cursor spotlight ---- */
#spotlight {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 15%) var(--my, 10%),
    color-mix(in srgb, var(--accent) 9%, transparent), transparent 80%);
  transition: background 0.25s ease;
}
@media (pointer: coarse) { #spotlight { display: none; } }

/* ---- skip link ---- */
.skip {
  position: absolute; left: 0; top: 0; z-index: 99;
  transform: translateX(-110%);
  background: var(--accent-bg); color: #fff;
  padding: 10px 16px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: 0 0 10px 0; text-decoration: none;
}
.skip:focus-visible { transform: translateX(0); }

/* ---- FLASHBANG / WITNESS PROTECT toggle ---- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.theme-toggle button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.theme-toggle button.active { background: var(--accent-bg); color: white; }
.theme-toggle button:not(.active):hover { color: var(--text); }


/* ---- home layout ---- */
.frame {
  position: relative; z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

header.side h1 {
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
header.side h1 .dot { color: var(--accent); }
header.side h2 {
  margin-top: 14px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
header.side .sub {
  margin-top: 12px;
  max-width: 22rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

nav.jump { display: none; }
nav.jump ul { list-style: none; margin-top: 40px; }
nav.jump a {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 0; text-decoration: none;
  color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
nav.jump a .line {
  width: 32px; height: 1px; background: var(--chip-border);
  transition: width 0.2s ease, background 0.2s ease;
}
nav.jump a .count { color: var(--chip-border); font-size: 11px; font-weight: 600; }
nav.jump a:hover, nav.jump a.active { color: var(--text); }
nav.jump a:hover .line, nav.jump a.active .line { width: 64px; background: var(--accent); }
nav.jump a:hover .count, nav.jump a.active .count { color: var(--accent); }

.socials { display: flex; gap: 18px; margin-top: 22px; list-style: none; }
.socials a {
  display: block; color: var(--text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
}
.socials a:hover { color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 24px; height: 24px; display: block; }

@media (min-width: 1024px) {
  .frame { padding: 0 48px; }
  .layout { display: flex; justify-content: space-between; gap: 24px; }
  header.side {
    position: sticky; top: 0;
    display: flex; flex-direction: column; justify-content: space-between;
    width: 44%; max-height: 100vh;
    padding: 96px 0;
  }
  nav.jump { display: block; }
  main.feed { width: 52%; padding: 96px 0; }
}
@media (max-width: 1023px) {
  .frame { padding-top: 96px; }
  main.feed { padding-top: 24px; }
}

/* ---- sections ---- */
section { margin-bottom: 96px; scroll-margin-top: 104px; }

.msec {
  position: sticky; top: 52px; z-index: 20;
  margin: 0 -24px 18px; padding: 16px 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.msec h2 {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
@media (min-width: 1024px) {
  .msec { position: static; margin: 0 0 8px; padding: 0; background: none; backdrop-filter: none; }
  .msec h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.lede { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 34px; max-width: 34rem; }
.lede strong { color: var(--text); font-weight: 600; }

/* ---- app rows ---- */
.rows { list-style: none; }
.row {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: 14px;
  padding: 18px; margin: 0 -18px 18px;
  border-radius: 16px;
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
@media (hover: hover) {
  .rows:hover .row:not(:hover) { opacity: 0.45; }
  .row:hover {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border-soft), var(--shadow);
  }
}


.row h3 {
  font-size: 1.02rem; font-weight: 650; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.row h3 .plat {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--chip-border); border-radius: 999px;
  padding: 2px 8px; white-space: nowrap;
}
.row p { margin-top: 6px; font-size: 0.9rem; color: var(--text-muted); }
.row p b { color: var(--text); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; list-style: none; padding: 0; }
.tags li {
  font-size: 11.5px; font-weight: 600; line-height: 1;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border-radius: 999px; padding: 6px 11px;
}

/* row links (story pages) */
.rowlink { text-decoration: none; color: inherit; }
.rowlink::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.row h3 .arrow {
  width: 0.85em; height: 0.85em; margin-left: 2px; align-self: center;
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
.row:hover h3 .arrow { transform: translate(2px, -2px); color: var(--accent); }

/* ---- skill cards ---- */
.skillgrid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .skillgrid { grid-template-columns: 1fr 1fr; } }
.skillcard {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.skillcard:hover { border-color: var(--chip-border); transform: translateY(-2px); }
.skilltop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.skilltop .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dotc, var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--dotc, var(--accent)) 60%, transparent);
}
.cats { display: flex; gap: 6px; }
.cat {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--chip-border);
  border-radius: 6px; padding: 3px 7px; white-space: nowrap;
}
.cat.pop { color: #fff; background: var(--med); border-color: var(--med); }
.skillcard h3 { font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; }
.skillcard h3 .sl { color: var(--accent); margin-right: 5px; }
.skillcard .role { margin-top: 3px; font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.skillcard .desc { margin-top: 12px; font-size: 0.86rem; }
.feats { list-style: none; margin-top: 10px; }
.feats li {
  position: relative; padding-left: 15px;
  font-size: 0.83rem; color: var(--text-muted); margin-top: 6px;
}
.feats li::before {
  content: ''; position: absolute; left: 1px; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--dotc, var(--accent)); opacity: 0.85;
}
.works { margin-top: 12px; font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.fmt {
  margin-top: auto; padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 5px;
}
.skillcard .fmt { margin-top: 16px; }
.fmt span {
  display: flex; align-items: center; gap: 7px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
}
.fmt i { width: 5px; height: 5px; border-radius: 50%; background: var(--dotc, var(--accent)); }
.dl { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dlbtn {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; font-weight: 600; text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dlbtn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.dlbtn .ar { margin-right: 4px; }

/* ---- footer ---- */
footer { max-width: 34rem; font-size: 0.85rem; color: var(--text-muted); }
footer p + p { margin-top: 12px; }
footer .fb { color: var(--text); font-weight: 650; }
footer .wp { color: var(--accent); font-weight: 650; }
footer a { color: var(--text); font-weight: 600; text-decoration: none; }
footer a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- reveal-on-scroll ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   v3 — ambient background, 3D screenshot decks,
   floating writing card, pricing banner
   ============================================================ */

/* ambient generated background (bg-dark.jpg / bg-light.jpg) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url('bg-light.jpg') center / cover no-repeat;
  opacity: 0.5; transition: opacity 0.3s ease;
}
html[data-theme="dark"] body::before { background-image: url('bg-dark.jpg'); opacity: 0.45; }

/* rows carry a bigger, uncropped 3D deck */
@media (min-width: 640px) {
  .row { grid-template-columns: 250px 1fr; gap: 22px; align-items: center; }
}
.dmedia { perspective: 1100px; display: flex; justify-content: center; }
.deck {
  position: relative; width: 100%; max-width: 250px; height: 330px;
  perspective: 1000px;
  transition: transform 0.25s ease;
}
@media (max-width: 639px) { .deck { max-width: 235px; height: 300px; margin: 0 auto; } }
.deckcard {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.35));
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.25, 1), opacity 0.55s ease;
  will-change: transform;
}
html[data-theme="light"] .deckcard { filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.2)); }
.deckcard[data-pos="0"] { transform: translateX(0) translateZ(0); opacity: 1; z-index: 3; }
.deckcard[data-pos="1"] { transform: translateX(9%) translateZ(-70px) rotateY(-8deg) rotateZ(2.2deg); opacity: 0.85; z-index: 2; }
.deckcard[data-pos="2"] { transform: translateX(-9%) translateZ(-140px) rotateY(7deg) rotateZ(-2.2deg); opacity: 0.65; z-index: 1; }
.deck[data-n="1"] .deckcard { position: relative; inset: auto; }

/* floating writing card — desktop sidebar */
.writecard { display: none; }
@media (min-width: 1024px) {
  .writecard {
    display: block; margin-top: 44px; max-width: 23rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 74%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-radius: 18px; padding: 16px 16px 6px;
    box-shadow: 0 22px 50px -26px rgba(0, 0, 0, 0.45), var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
  }
  .writecard:hover { transform: translateY(-3px); border-color: var(--chip-border); }
  .mobilewrite { display: none; }
}
.writecard.static {
  display: block; margin-top: 0; max-width: none;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 18px; padding: 16px 16px 6px;
}
.wchead {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); padding: 2px 4px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.wchead .mono { color: var(--accent); }
.wlist { list-style: none; max-height: 36vh; overflow-y: auto; scrollbar-width: thin; }
.writecard.static .wlist { max-height: none; }
.wlist li + li { border-top: 1px dashed var(--border-soft); }
.wlist a { display: block; padding: 10px 4px; text-decoration: none; }
.wlist a b { display: block; font-size: 0.8rem; font-weight: 600; line-height: 1.35; }
.wlist a span { display: block; margin-top: 2px; font-size: 0.7rem; color: var(--text-muted); }
.wlist a:hover b { color: var(--accent); }

/* pricing banner (AI section) */
.aibanner {
  margin-top: 22px; display: grid; gap: 18px; align-items: center;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 16px; padding: 18px; box-shadow: var(--shadow);
}
@media (min-width: 700px) { .aibanner { grid-template-columns: 5fr 4fr; } }
.aibanner img { width: 100%; border-radius: 10px; border: 1px solid var(--border-soft); }
.aibanner h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.aibanner p { margin-top: 6px; font-size: 0.87rem; color: var(--text-muted); }
.aibanner a { color: var(--accent); font-weight: 600; text-decoration: none; }
.aibanner a:hover { text-decoration: underline; }

/* sidebar can scroll internally when the writing card makes it tall */
@media (min-width: 1024px) {
  header.side { overflow-y: auto; scrollbar-width: none; }
  header.side::-webkit-scrollbar { display: none; }
  .wlist { max-height: 30vh; }
}

/* ---- Summit NA callout ---- */
.summitcard {
  margin-top: 40px; max-width: 23rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--surface);
  border-radius: 18px; padding: 16px 16px 6px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent),
              0 18px 44px -18px color-mix(in srgb, var(--accent) 30%, transparent),
              var(--shadow);
}
@media (max-width: 1023px) { .summitcard { max-width: 34rem; margin-top: 36px; } }
.schead {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
  animation: sumpulse 2.2s ease-out infinite;
}
@keyframes sumpulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.simg { display: block; }
.simg img {
  width: 100%; display: block; border-radius: 12px;
  border: 1px solid var(--border-soft);
  transition: transform 0.25s ease;
}
.simg:hover img { transform: scale(1.015); }
.sblurb { margin-top: 12px; font-size: 0.82rem; color: var(--text-muted); }
.sblurb b { color: var(--text); font-weight: 650; }
.slist { list-style: none; margin-top: 6px; }
.slist li + li { border-top: 1px dashed var(--border-soft); }
.slist a { display: block; padding: 12px 2px; text-decoration: none; }
.stag {
  display: inline-block; font-size: 9px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 5px; padding: 3px 7px; margin-bottom: 6px;
  color: #fff; background: var(--accent-bg);
}
.stag.teach { background: var(--med); }
.slist a b { display: block; font-size: 0.8rem; font-weight: 650; line-height: 1.35; }
.slist a > span:last-child { display: block; margin-top: 3px; font-size: 0.7rem; color: var(--text-muted); }
.slist a:hover b { color: var(--accent); }

/* ---- TestFlight status note (app rows) ---- */
.tfnote {
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border-radius: 12px; padding: 10px 10px 8px;
}
.tfhead {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.tfnote img {
  width: 100%; display: block; border-radius: 8px;
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease;
}

/* tfnote spans the full row width, underneath deck + text */
.row > .tfnote { grid-column: 1 / -1; margin-top: 4px; padding: 12px 12px 10px; }
.tfshot {
  display: block; width: 100%;
  border: 0; padding: 0; background: none;
  cursor: zoom-in; border-radius: 8px;
}
.tfshot:hover img { transform: scale(1.005); }
.tfshot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- image lightbox ---- */
dialog.lightbox {
  position: relative;
  border: none; padding: 0; background: transparent;
  max-width: none; max-height: none;
  margin: auto;
}
dialog.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
dialog.lightbox img {
  display: block;
  max-width: min(94vw, 1280px); max-height: 88vh;
  width: auto; height: auto;
  border-radius: 12px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
}
.lbclose {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 20px; line-height: 1; font-family: inherit;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lbclose:hover { background: rgba(0, 0, 0, 0.8); }

/* ---- retired app treatment ---- */
.plat.retired {
  color: var(--med);
  border-color: color-mix(in srgb, var(--med) 45%, var(--chip-border));
  text-decoration: none;
}
a.plat.retired:hover { background: color-mix(in srgb, var(--med) 10%, transparent); }
.row.retired .deckcard { filter: grayscale(0.55) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.3)); opacity: 0.9; }
.row.retired:hover .deckcard { filter: grayscale(0.1) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.35)); opacity: 1; }

/* ---- top bar: the blueprint friend #1 expects ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-soft);
}
.brand {
  font-size: 16px; font-weight: 800; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap;
}
.brand .dot {
  color: var(--accent); display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .dot { transform: translateY(-3px); }
.menu { position: relative; display: flex; align-items: center; gap: 18px; }
.mlinks { display: flex; align-items: center; gap: 22px; list-style: none; }
.mlinks a {
  position: relative; display: block; text-decoration: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); padding: 6px 0;
  transition: color 0.2s ease;
}
.mlinks a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--accent);
  transition: right 0.25s ease;
}
.mlinks a:hover { color: var(--text); }
.mlinks a:hover::after { right: 0; }
.mbtn { display: none; }
@media (min-width: 1024px) {
  .topbar { padding: 12px 32px; }
  .m-only { display: none; }
}
@media (max-width: 1023px) {
  .mlinks {
    position: absolute; top: calc(100% + 12px); right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    min-width: 200px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 22px 50px -20px rgba(0, 0, 0, 0.45);
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .menu.open .mlinks { opacity: 1; transform: none; pointer-events: auto; }
  .mlinks { z-index: 5; }
  .mlinks a { padding: 11px 14px; border-radius: 9px; }
  .mlinks a::after { content: none; }
  .mlinks a:hover { background: var(--surface-hover); }
  .mbtn {
    display: grid; gap: 4.5px; place-content: center;
    width: 38px; height: 38px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer;
  }
  .mbtn span {
    display: block; width: 16px; height: 2px; border-radius: 2px;
    background: var(--text); transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .menu.open .mbtn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu.open .mbtn span:nth-child(2) { opacity: 0; }
  .menu.open .mbtn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}
@media (max-width: 480px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .menu { gap: 10px; }
  .brand { font-size: 15px; }
  .theme-toggle { padding: 2px; }
  .theme-toggle button { font-size: 9.5px; padding: 5px 7px; letter-spacing: 0.2px; }
  .mbtn { width: 34px; height: 34px; }
}
