/* Broken Bit: moody, dark-by-default, toxic mint + magenta glitch accents */
:root {
  --bg: #0b0e1a; --bg2: #121729; --card: #151b30; --ink: #e8ebf7; --muted: #a3abc7; --line: #2a3250;
  --accent: #3dffb5; --accent-ink: #04130d; --glitch: #ff3ea5; --link: #3dffb5; --link-hover: #c8ffe9; --focus: #ff3ea5;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef0f7; --bg2: #e2e6f2; --card: #ffffff; --ink: #11142b; --muted: #4a5170; --line: #b9c0d9;
    --accent: #007a52; --accent-ink: #ffffff; --glitch: #c4106f; --link: #006b47; --link-hover: #c4106f; --focus: #c4106f;
    color-scheme: light;
  }
}
body { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; background-color: var(--bg); }
body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 0%, transparent 0, var(--bg) 75%); opacity: .93; pointer-events: none; z-index: -1; }
.site-header { padding: 1rem 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: "Silkscreen", monospace; font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1rem; }
.brand img { width: 32px; height: 32px; }
.site-header nav { display: flex; gap: 1.2rem; font-family: "Silkscreen", monospace; font-size: .85rem; }
.site-header nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-color: var(--glitch); }

.hero { padding: clamp(1.5rem, 6vw, 4rem) 0 clamp(2.5rem, 7vw, 5rem); text-align: center; }
.hero .logo { margin: 0 auto 1.5rem; width: 192px; height: 192px; position: relative; }
.glitch-logo { position: relative; width: 100%; height: 100%; }
.glitch-logo img, .glitch-logo::before, .glitch-logo::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.glitch-logo::before, .glitch-logo::after { content: ""; background: url("/assets/logo/logo.svg") center / contain no-repeat; image-rendering: pixelated; opacity: 0; }
.glitch-logo::before { filter: hue-rotate(250deg) saturate(2); mix-blend-mode: screen; animation: gl1 5s steps(1) infinite; }
.glitch-logo::after { filter: hue-rotate(-60deg) saturate(2.5); mix-blend-mode: screen; animation: gl2 5s steps(1) infinite; }
.glitch-logo img { animation: tw 5s steps(1) infinite; }
@keyframes gl1 { 0%, 84%, 100% { opacity: 0; } 85% { opacity: .9; transform: translateX(-8px); clip-path: inset(18% 0 62% 0); } 88% { opacity: .9; transform: translateX(10px); clip-path: inset(55% 0 20% 0); } 91% { opacity: 0; } }
@keyframes gl2 { 0%, 86%, 100% { opacity: 0; } 87% { opacity: .9; transform: translateX(8px); clip-path: inset(40% 0 38% 0); } 90% { opacity: .9; transform: translateX(-12px); clip-path: inset(8% 0 78% 0); } 93% { opacity: 0; } }
@keyframes tw { 0%, 84%, 94%, 100% { transform: none; } 85% { transform: translate(4px, 0); } 87% { transform: translate(-4px, 4px); } 89% { transform: translate(0, -4px); } 91% { transform: none; } }
.wordmark { font-size: clamp(2.2rem, 10vw, 4.4rem); text-shadow: 3px 0 var(--glitch), -3px 0 var(--accent); margin-bottom: .3em; letter-spacing: .04em; }
.tagline { font-family: "VT323", monospace; font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.2; margin: 0 auto; max-width: 28ch; color: var(--ink); }
.hero .cta { margin-top: 1.8rem; }
.btn { display: inline-block; font-family: "Silkscreen", monospace; font-weight: 700; font-size: .95rem; padding: .85rem 1.3rem; background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 0; box-shadow: 4px 4px 0 var(--glitch); cursor: pointer; transition: transform .08s; }
.btn:hover { color: var(--accent-ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--glitch); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--glitch); }

section { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.card { background: var(--card); border: 2px solid var(--line); padding: 1.4rem; box-shadow: 6px 6px 0 rgba(0,0,0,.35); }
.app-card { display: grid; gap: 1.4rem; align-items: center; grid-template-columns: 1fr; text-decoration: none; color: inherit; }
@media (min-width: 640px) { .app-card { grid-template-columns: 200px 1fr; } }
.app-card .pup-stage { background: #c7ebd1; height: 200px; display: grid; place-items: end center; overflow: hidden; border: 2px solid var(--line); }
.app-card h3 { font-size: 1.4rem; margin-bottom: .3em; }
.app-card .badge { display: inline-block; font-family: "VT323", monospace; font-size: 1.2rem; background: var(--glitch); color: #fff; padding: 0 .5rem; margin-left: .4rem; vertical-align: middle; }
.pup { --u: 8px; width: calc(var(--u) * 16); height: calc(var(--u) * 16); background: url("/assets/sprites/puppy-breathing-16x.png") 0 0 / calc(var(--u) * 32) calc(var(--u) * 16) no-repeat; image-rendering: pixelated; transform-origin: 50% 100%; animation: breathe 1.6s steps(1) infinite, bob 1.6s steps(2) infinite; }
@keyframes breathe { 0% { background-position: 0 0; } 50% { background-position: calc(var(--u) * -16) 0; } }
@keyframes bob { 0%, 50% { transform: scale(1, 1); } 25% { transform: scale(1.04, .96); } 75% { transform: scale(1.04, .96); } }
.about p { max-width: 60ch; }
.sig { font-family: "Silkscreen", monospace; color: var(--accent); }
.contact a.mail { font-family: "VT323", monospace; font-size: 2rem; color: var(--accent); word-break: break-all; }
.legal-head { padding: 2rem 0 .5rem; }
.updated { color: var(--muted); font-size: .95rem; }
.notfound { text-align: center; padding: 3rem 0; }
.notfound .big { font-family: "Silkscreen", monospace; font-size: clamp(4rem, 22vw, 9rem); line-height: 1; text-shadow: 5px 0 var(--glitch), -5px 0 var(--accent); margin: 0; }
.logo.small { width: 96px; height: 96px; margin: 1rem auto; position: relative; }
