/* Shared reset + mechanics used by every theme. Visual styling lives in the theme files. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .5rem .75rem; background: #fff; color: #000; text-decoration: none; font: 500 14px/1 system-ui, sans-serif;
}
.skip:focus { top: 1rem; }

/* Scroll reveal (only when JS is running; see site.js) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Brands marquee mechanics */
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; flex: none; align-items: center; margin: 0; animation: marquee var(--marquee-dur, 60s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; flex: 1; }
  .marquee-track.is-clone { display: none; }
}

/* Skills bar mechanics: width comes from --v (0–100) */
.skill-bar { position: relative; display: block; overflow: hidden; }
.skill-bar > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); }
.js .skills:not(.is-in) .skill-bar > span { width: 0; }
.js .skill-bar > span { transition: width 1.2s cubic-bezier(.2,.7,.2,1); }

/* Theme + font switcher (preview hosts only) */
.theme-switcher {
  position: fixed; right: 16px; bottom: 16px; z-index: 70;
  display: grid; gap: 4px; padding: 4px;
  font: 500 12px/1 system-ui, -apple-system, sans-serif; letter-spacing: 0;
  background: rgba(20,20,20,.86); color: #aaa; border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.25);
  max-width: calc(100vw - 32px);
}
.ts-row { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ts-row > span { flex: none; width: 64px; padding-left: 10px; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; color: #777; }
.theme-switcher a { flex: none; padding: 7px 11px; border-radius: 999px; text-decoration: none; color: #ddd; }
.theme-switcher a:hover { background: rgba(255,255,255,.08); }
.theme-switcher a[aria-current] { background: #fff; color: #000; }
@media (max-width: 960px) {
  .theme-switcher { top: 8px; bottom: auto; right: 8px; left: 8px; max-width: none; }
}

/* Mobile menu button: only themes that use it show it */
.menu-toggle { display: none; }

/* Signature draws itself in when revealed */
.js .signature.reveal path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s cubic-bezier(.45,.05,.35,1) .35s; }
.js .signature.reveal.is-in path { stroke-dashoffset: 0; }

/* Decorative-only elements some themes use */
.ornaments { display: none; }
.pull-sticker { display: none; }
@media (max-width: 960px) {
  html[data-menu="bar"] .theme-switcher { top: auto; bottom: 8px; }
}
